对于集群环境的安装,可以参照之前写的 《FusionInsight LibrA V100R002C80SPC300安装指南》。
1、环境信息
其中50G的是操作系统盘,其他三个100G的用于GuassDB。
2、配置软件包
- 软件包准备
从官方网站下载如下软件包,并上传至/opt目录:[[email protected] ~]# cd /opt/ [[email protected] opt]# ls FusionInsight_BASE_6.5.1_RHEL.tar.gz FusionInsight_SetupTool_6.5.1.tar.gz FusionInsight_Manager_6.5.1_RHEL.tar.gz GaussDB_200_6.5.1_RHEL.tar.gz
然后解压下面三个软件包:
[[email protected] opt]# tar -xzf FusionInsight_Manager_6.5.1_RHEL.tar.gz [[email protected] opt]# tar -xzf FusionInsight_SetupTool_6.5.1.tar.gz [[email protected] opt]# tar -xzf GaussDB_200_6.5.1_RHEL.tar.gz
解压完成后,分别将除Manager外的其他部件包拷贝至“/opt/FusionInsight_Manager/software/packs”路径下(如同时安装其他部件,需要一起拷贝):
[[email protected] opt]# cp FusionInsight_BASE_6.5.1_RHEL.tar.gz FusionInsight_MPPDB_6.5.1_RHEL.tar.gz FusionInsight_Manager/software/packs/
- 挂载操作系统镜像
[[email protected] opt]# mount /dev/sr0 /media/
- 确认操作系统编码
操作系统的编码必须为“en_US.UTF-8”或“POSIX”。 - 拷贝预配置文件夹
将要安装GaussDB 200的节点上的“/opt/FusionInsight_SetupTool/preset”文件夹拷贝至节点的“/opt”目录下并在所有节点上执行sh /opt/preset/preset.sh命令。[[email protected] opt]# cp -r /opt/FusionInsight_SetupTool/preset . [[email protected] opt]# sh preset/preset.sh start to preSet success to preSet.
- 修改/opt/FusionInsight_Manager和/opt/FusionInsight_SetupTool属主
[[email protected] opt]# chown omm: /opt/FusionInsight_Manager/ -R [[email protected] opt]# chown omm: /opt/FusionInsight_SetupTool -R
3、修改操作系统配置文件
节点的操作系统配置文件包含操作系统配置文件(“preinstall.ini”)、节点的分区配置文件(“host0.ini”),根据样例手动生成各文件,修改相应参数,并上传到各节点相应位置。
- 修改preinstall.ini文件
[[email protected] opt]# cd FusionInsight_SetupTool/preinstall [[email protected] preinstall]# vi preinstall.ini g_hosts="192.168.120.31" g_parted=2 g_parted_conf="192.168.120.31:host0.ini;" g_hostname_conf="192.168.120.31:192.168.120.31:hd06;" g_add_pkg=1 g_pkgs_dir="centos-7.4:/media/" g_swap_off=1 g_user_name="root" g_port=22 g_log_file="/tmp/fi-preinstall.log" g_check=1 g_debug=0 g_wce_conf=0 g_platform="x86_64" g_optimize="default" g_kms_conf=0 g_core_dump=0 g_core_dump_dir="/var/log/core"
- 创建host0.ini文件
[[email protected] preinstall]# vi partition/ini/host0.ini #mount required care condition dbdata_om.conf y y n backup_om.conf y y n mppdb1.conf y y n
以上参数的具体意义,请参考官方文档。此步骤执行完成后,会挂载相应的分区,如下图:
4、执行preinstall
进入preinstall执行目录,并执行preinstall脚本,此时需要输入用户密码。
[[email protected] preinstall]# cd ..
[[email protected] FusionInsight_SetupTool]# ./setuptool.sh preinstall -n
Please enter cluster SSH password for root:
**FusionInsight PreInstall is starting...
**********************************
*****FusionInsight Preinstall*****
**********************************
***** Time:66s
***** Running:0
***** Success:1
***** Failure:0
***** Total:1
***** Schedule:100%
You can get more information about the preinstall from /tmp/fi-preinstall.log and /tmp/diskmgt/autopart.log
5、安装单机Manager
- 修改install.ini文件
[[email protected] ~]# cd /opt/FusionInsight_Manager/software [[email protected] software]# vi install.ini [HA] ha_mode=single local_ip1=192.168.120.31 local_ip2= local_ip3= local_ip4= peer_ip1= peer_ip2= peer_ip3= peer_ip4= ws_float_ip= ws_float_ip_interface= ws_float_ip_netmask= ws_gateway= om_float_ip= om_float_ip_interface= om_float_ip_netmask= om_gateway= ntp_server_ip= om_mediator_ip= sso_ip= sso_port= bigdata_home=/opt/huawei/Bigdata bigdata_data_home=/srv/BigData cluster_nodes_scale= tls_protocol_min= realm_parse_ip= kerberos_realm= [/HA]
ha_mode默认值为double,这里改为single;
local_ip1为本机的ip;
bigdata_home为集群安装目录,可自定义;
bigdata_data_home为集群数据目录,可自定义。 - 执行安装
[[email protected] software]# ./install.sh -f /opt/FusionInsight_Manager/software/install.ini =================================== Welcome =================================== === STEP 1 Checking the parameters. === STEP 2 Preparing for installation components. [done] === STEP 3 Installing the manager. [done] === STEP 4 Installing the packs. [done] === STEP 5 Starting the OMS. [done] === STEP 6 Waiting for ntp to startup. [done] === STEP 7 Configuring and starting agent. [done] ============================= Install Successfully ============================ Please visit http://192.168.120.31:8080/web/ to continue cluster installation. Installation is successful.
6、执行单机版配置脚本
GaussDB 200默认部署方案至少需要3个节点,如需部署单机版需要在安装集群前,运行单机版配置脚本,将各服务实例的最小配置实例数改为1。执行单机版配置脚本后,需要重启controller生效。
[[email protected] ~]# su - omm Last login: Wed Oct 23 11:08:25 CST 2019 [[email protected] ~]$ sh ${BIGDATA_HOME}/om-server/om/sbin/enable_single_host_cluster.sh [[email protected] ~]$ sh ${BIGDATA_HOME}/om-server/om/sbin/restart-controller.sh Restarting controller service using configuration /opt/huawei/Bigdata/om-server/om/sbin/../etc/om Enter into stop-controller.sh End into stop-controller.sh Enter into start-controller.sh Controller start with process id 11163. End into start-controller.sh [[email protected] ~]$
7、安装单节点GaussDB 200
使用第5步生成的访问地址登陆到FusionInsight Manager系统,初次登陆需要更改admin密码,初始密码为[email protected]。点击"创建集群",如下图:
集群的名称可以自定义,产品类型为默认,认证模式模式为安全模式。
输入本机的IP信息,以及root密码,点击查找。
选中MPPDB,下一步。
勾选上所有角色,下一步。
8、安装后检查
- 检查集群状态
登录FusionInsight Manager系统,检查服务的状态。选择“集群 > 待操作的集群名称 > 服务”,各服务的“运行状态”为“良好”。如下图:
检查节点状态。在FusionInsight Manager页面单击“主机”,各节点的“运行状态”为“良好”。如下图:
使用命令检查,如下:
[[email protected] ~]$ source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile
[[email protected] ~]$ gs_om -t status --detail
[ CMServer State ]
node node_ip instance state
---------------------------------------------------------------------------
1 hd06 192.168.120.31 1 /opt/huawei/Bigdata/mppdb/cm/cm_server Primary
[ Cluster State ]
cluster_state : Normal
redistributing : No
balanced : Yes
[ Coordinator State ]
node node_ip instance state
-------------------------------------------------------------------------
1 hd06 192.168.120.31 5001 /srv/BigData/mppdb/data1/coordinator Normal
[ Central Coordinator State ]
node node_ip instance state
-------------------------------------------------------------------------
1 hd06 192.168.120.31 5001 /srv/BigData/mppdb/data1/coordinator Normal
[ GTM State ]
node node_ip instance state
---------------------------------------------------------------------
1 hd06 192.168.120.31 1001 /opt/huawei/Bigdata/mppdb/gtm P Primary
[ Datanode State ]
node node_ip instance state
---------------------------------------------------------------------------------
1 hd06 192.168.120.31 6001 /srv/BigData/mppdb/data1/master1 P Primary Normal
1 hd06 192.168.120.31 6002 /srv/BigData/mppdb/data1/master2 P Primary Normal
1 hd06 192.168.120.31 6003 /srv/BigData/mppdb/data1/master3 P Primary Normal
1 hd06 192.168.120.31 6004 /srv/BigData/mppdb/data1/master4 P Primary Normal
1 hd06 192.168.120.31 6005 /srv/BigData/mppdb/data1/master5 P Primary Normal
1 hd06 192.168.120.31 6006 /srv/BigData/mppdb/data1/master6 P Primary Normal
[[email protected] ~]$
- 执行健康检查
选择“集群 > 待操作的集群名称” > 选择“更多 > 健康检查”。