對於集羣環境的安裝,能夠參照以前寫的《FusionInsight LibrA V100R002C80SPC300安裝指南》。node
其中50G的是操做系統盤,其餘三個100G的用於GuassDB。web
[root@hd06 ~]# cd /opt/ [root@hd06 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
而後解壓下面三個軟件包:redis
[root@hd06 opt]# tar -xzf FusionInsight_Manager_6.5.1_RHEL.tar.gz [root@hd06 opt]# tar -xzf FusionInsight_SetupTool_6.5.1.tar.gz [root@hd06 opt]# tar -xzf GaussDB_200_6.5.1_RHEL.tar.gz
解壓完成後,分別將除Manager外的其餘部件包拷貝至「/opt/FusionInsight_Manager/software/packs」路徑下(如同時安裝其餘部件,須要一塊兒拷貝):centos
[root@hd06 opt]# cp FusionInsight_BASE_6.5.1_RHEL.tar.gz FusionInsight_MPPDB_6.5.1_RHEL.tar.gz FusionInsight_Manager/software/packs/
[root@hd06 opt]# mount /dev/sr0 /media/
[root@hd06 opt]# cp -r /opt/FusionInsight_SetupTool/preset . [root@hd06 opt]# sh preset/preset.sh start to preSet success to preSet.
[root@hd06 opt]# chown omm: /opt/FusionInsight_Manager/ -R [root@hd06 opt]# chown omm: /opt/FusionInsight_SetupTool -R
節點的操做系統配置文件包含操做系統配置文件(「preinstall.ini」)、節點的分區配置文件(「host0.ini」),根據樣例手動生成各文件,修改相應參數,並上傳到各節點相應位置。安全
[root@hd06 opt]# cd FusionInsight_SetupTool/preinstall [root@hd06 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"
[root@hd06 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
以上參數的具體意義,請參考官方文檔。此步驟執行完成後,會掛載相應的分區,以下圖:ide
進入preinstall執行目錄,並執行preinstall腳本,此時須要輸入用戶密碼。網站
[root@hd06 preinstall]# cd .. [root@hd06 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
[root@hd06 ~]# cd /opt/FusionInsight_Manager/software [root@hd06 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爲集羣數據目錄,可自定義。ui
[root@hd06 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.
GaussDB 200默認部署方案至少須要3個節點,如需部署單機版須要在安裝集羣前,運行單機版配置腳本,將各服務實例的最小配置實例數改成1。執行單機版配置腳本後,須要重啓controller生效。編碼
[root@hd06 ~]# su - omm Last login: Wed Oct 23 11:08:25 CST 2019 [omm@hd06 ~]$ sh ${BIGDATA_HOME}/om-server/om/sbin/enable_single_host_cluster.sh [omm@hd06 ~]$ 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 [omm@hd06 ~]$
使用第5步生成的訪問地址登錄到FusionInsight Manager系統,初次登錄須要更改admin密碼,初始密碼爲Admin@123。點擊"建立集羣",以下圖:
集羣的名稱能夠自定義,產品類型爲默認,認證模式模式爲安全模式。
輸入本機的IP信息,以及root密碼,點擊查找。
選中MPPDB,下一步。
勾選上全部角色,下一步。操作系統
使用命令檢查,以下:
[omm@hd06 ~]$ source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile [omm@hd06 ~]$ 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 [omm@hd06 ~]$