跳到主要内容

安装流程

一键安装流程​

下述操作以演示目的呈现,实际部署时请根据现场环境修改安装路径、数据目录等参数。演示使用远程终端工具通过 SSH 连接到 Linux 服务器,以 root 用户 执行。

上传安装包与授权文件​

将 Halo 安装包与授权文件上传至服务器 root 用户家目录,确认两个文件均已就位:

ll

正常应能看到安装包与授权文件。实际终端输出(ll)如下:

[root@master ~]# ll
total 1281968
-rw-r--r-- 1 root root 385881945 Aug 11 06:56 halo-1.0.16.x86_64.build260811.tar.gz
-rw-r--r-- 1 halo halo 258 Jun 17 2024 license.lic
[root@master ~]#

解压安装包​

在 root 用户下,将安装包解压到安装目录 /u01/app/halo:

tar -zxvf halo-1.0.16.x86_64.build260811.tar.gz -C /u01/app/halo/

解压过程中会逐行输出大量 product/... 文件路径,实际解压末尾可见并回到提示符:

[root@master ~]# tar -zxvf halo-1.0.16.x86_64.build260811.tar.gz -C /u01/app/halo/
product/...
product/shield/patroni/python/...
product/shield/clustermgr/
product/shield/clustermgr/conf/clustermgr_service.sample
product/shield/clustermgr/conf/clustermgr_config.sh
product/shield/clustermgr/bin/clumgrctl
product/shield/clustermgr/bin/clustermgr
product/halo-1.0.16_installer
[root@master ~]#

说明: 解压尾部能看到 product/halo-1.0.16_installer,即本次部署使用的一键安装脚本。

解压完成后,安装目录下生成 product 目录,进入查看:

cd /u01/app/halo/product

ll

product 目录实际输出如下:

[root@master product]# ll
total 132
drwxrwxr-x 3 halo halo 16 Aug 11 06:58 dbms
-rwxrwxr-x 1 halo halo 135064 Aug 11 06:58 halo-1.0.16_installer
drwxrwxr-x 3 halo halo 54 Jun 29 2023 instantclient_21_11
drwxrwxr-x 5 halo halo 51 Aug 11 06:58 shield
[root@master product]#

product 目录包含数据库程序目录与一键安装脚本(不同交付包的子目录构成可能略有差异,以实际为准):

名称说明
dbmsHalo 数据库程序目录(含 16 版本二进制)
instantclient_21_11客户端组件库(含 Oracle 客户端及 MySQL 兼容等所需的客户端组件,以实际交付包为准)
shield高可用组件目录(clustermgr、patroni 等)
halo-1.0.16_installer一键安装脚本(本次部署的入口程序)

运行一键安装脚本​

在 product 目录下执行一键安装脚本:

./halo-1.0.16_installer

脚本启动后,先检测操作系统并显示横幅,随后进行语言选择。实际终端输出如下:

[root@master product]# ./halo-1.0.16_installer
检测到操作系统: kylin / Detected OS: kylin
==============================================================
HaloDB Cluster Installation Script
HaloDB 集群安装脚本
==============================================================
请选择语言 / Please select language (cn/en): en

说明: 脚本横幅显示 "HaloDB Cluster Installation Script"。1.0.16 起单机与集群组件使用同一安装脚本,单机部署在下一步"安装类型"中选择 halodb 即可。

随后依次进入安装类型、安装路径、数据库角色等参数交互。