GaussDB 200單機實例安裝使用教程【入門必看】

寫在前面

GaussDB的產品,最初GaussDB的產品定義有三大產品線系列GaussDB 100、GaussDB 200、GaussDB300,簡單介紹下:

1)GaussDB 100:主要以OLTP爲主。目前該產品已經應用在招商銀行。在 2020年6月,將會開源單機版本;

2)GaussDB 200:以OLAP爲主,兼顧OLTP。該產品以 PostgreSQL 爲出發點,面向 MPP 研發,目前已經在工商銀行得到上線應用。

3)GaussDB 300:以 HTAP 爲方向,是企業級分佈式HTAP數據庫(Hybrid Transaction and Analytical Process,混合事務和分析處理),民生銀行嘗試使用。

2019年10月左右,華爲 GaussDB 的命名再次調整:

GaussDB 100 ,更名爲 GaussDB T ,以 OLTP 和集羣爲方向;

GaussDB 200 合併 300 的部分設計,更名爲 GaussDB A,以分析型爲主方向;

GaussDB 300,型號取消,涉及功能併入 100 或 200 。

以下是官網下載地址:

https://support.huawei.com/enterprise/zh/software/index.html

01環境準備

說說我的環境:windows10開虛機,CentOS7.4(目前最高支持到此版本,請特別注意版本) ,大約10G內存 ,4 core

你要是是CentOS系統的話,可以使用命令:

[root@GaussDB200 ~]# cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 
[root@GaussDB200 ~]# 

再次說明請特別注意版本,不然後面還是白搭!!!

CentOS-7-x86_64-DVD-1708.iso (我是使用的這個 直接谷歌就方便下載到)

[root@localhost ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           9.4G        165M        9.1G        8.5M        136M        9.0G
Swap:           15G          0B         15G
[root@localhost ~]# 

[root@localhost ~]#  cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 
      4  Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
[root@localhost ~]#

1.1 軟件準備:
在這裏插入圖片描述

1.2 修改主機名:(修改後reboot一下)
在這裏插入圖片描述
1.3 修改hosts文件:
在這裏插入圖片描述

1.4 修改OS參數:
vim /etc/sysctl.conf
vm.min_free_kbytes = (free -k|grep Mem|awk ‘{print $2}’)*5%
在這裏插入圖片描述

官方解釋:強制Linux虛擬內存保留空閒空間的最小值,系統總內存的5%

1.5 安裝依賴包:(防止缺包情況)

yum install -y OpenIPMI openldap \
openldap-clients openldap-servers perl-Perlilog procmail python-dateutil \
python-dmidecode python-gudev python-simplejson pytz \
sdparm

提示:官方要求GaussDB200至少需要3個節點來安裝,但此爲測試練手使用,所以修改了參數文件的節點數,如需要部署多節點,配置文件請使用官方配置文件生成器進行生成

1.6 檢查OS編碼格式是否爲en_US.UTF-8

否的話,需要修改vim /etc/locale.conf
在這裏插入圖片描述
修改之後,reboot一下生效。

1.7 掛載操作系統鏡像(補充):以root用戶登錄主機,執行命令:mount 虛擬光盤文件名 /media/ -o loop

如:sudo mount -t iso9660 -o loop /opt/softs/CentOS-7-x86_64-DVD-1708.iso /media/
在這裏插入圖片描述
注意:掛在使用的鏡像必須與服務器系統同版本,如掛載提示readonly方式掛載,可在命令前加sudo 進行重試。根節點下media內有文件則證明掛載成功。

02安裝GaussDB 200

2.1 解壓/opt/softs 目錄下準備的幾個文件到/opt

[root@GaussDB200 softs]# tar -zxvf GaussDB_200_6.5.1_RHEL.tar.gz -C ../
[root@GaussDB200 softs]# tar -zxvf FusionInsight_Manager_6.5.1_RHEL.tar.gz -C ../
[root@GaussDB200 softs]# tar -zxvf FusionInsight_SetupTool_6.5.1.tar.gz -C ../

查看解壓結果
在這裏插入圖片描述

2.2 拷貝安裝包
將除Manager外的其他部件包拷貝至/opt/FusionInsight_Manager/software/packs 路徑下

使用
mkdir -p /opt/FusionInsight_Manager/software/packs 創建目錄結果

[root@GaussDB200 opt]# cp FusionInsight_MPPDB_6.5.1_RHEL.tar.gz /opt/FusionInsight_Manager/software/packs/
[root@GaussDB200 softs]# cp FusionInsight_BASE_6.5.1_RHEL.tar.gz /opt/FusionInsight_Manager/software/packs/

得到如下結果:
在這裏插入圖片描述

2.3 進行預安裝配置
將要安裝GaussDB 200的節點上的“/opt/FusionInsight_SetupTool/preset”文件夾拷貝至節點的“/opt”目錄下,此步驟爲必須強制執行,並執行sh /opt/preset/preset.sh命令 如:

[root@GaussDB200 ~]# cd /opt/
[root@GaussDB200 opt]# ll
total 502672
drwxrwxr-x. 3 root  root         22 Aug  2  2019 FusionInsight_Manager
-rw-rw-r--. 1 20007 20007 514736059 Aug  1  2019 FusionInsight_MPPDB_6.5.1_RHEL.tar.gz
drwxr-xr-x. 7 root  root        146 Jul 10  2019 FusionInsight_SetupTool
drwxr-xr-x. 2 root  root        178 May 22 10:59 softs
[root@GaussDB200 opt]# cp -r /opt/FusionInsight_SetupTool/preset/ /opt/
[root@GaussDB200 opt]# ll
total 502672
drwxrwxr-x. 3 root  root         22 Aug  2  2019 FusionInsight_Manager
-rw-rw-r--. 1 20007 20007 514736059 Aug  1  2019 FusionInsight_MPPDB_6.5.1_RHEL.tar.gz
drwxr-xr-x. 7 root  root        146 Jul 10  2019 FusionInsight_SetupTool
drwxr-xr-x. 4 root  root        100 May 22 11:34 preset
drwxr-xr-x. 2 root  root        178 May 22 10:59 softs
[root@GaussDB200 opt]# sh /opt/preset/preset.sh
start to preSet
success to preSet.
[root@GaussDB200 opt]# 

2.4 編輯FusionInsight_SetupTool相關配置文件

執行命令:vim /opt/FusionInsight_SetupTool/preinstall/preinstall.ini

## Description: FusionInsight Preinstall Configuration

## Type:        List
## Default:     ""
#
# Description: A list of host names or IP addresses.
# Examples:
#   g_hosts="10.18.40.[1-5]"
#   g_hosts="10.18.[10-12].[1-200],192.188.45.[1-5,40],host[1-100]"
#
g_hosts="192.168.31.72"

## Type:        Integer 
## Default:     0
#
#
# Description: Disk formatting options.
#              0 Don't Format
#              1 Format the disk (Don't force)
#              2 Force to format the disk
#              3 Don't Format, Just install diskmgt
#
g_parted=0

## Type:        List
## Default:     ""
#
# Description: Disk format configuration.
#              if g_parted is 1 or 2, g_parted_conf not null
# Examples:
#
#   g_parted_conf="
#   10.18.40.[1-3]:master.ini;
#   10.18.40.[4-10],host[1-100]:slave.ini;
#   host[101-200]:test.ini
#   "
#   g_parted_conf="10.18.40.[4-5]:master.ini;10.18.40.[6-7]:slave.ini;10.18.40.8:null.ini"
#
# Remarks: 1.Partition configuration file (master.ini, slave.ini, null.ini ..) 
#            in partition/ini directory. 
#
#          2.Partition configuration file support custom.
#
#          3.Nodes this don't need to format must be configured to null.ini.
g_parted_conf="192.168.31.72:null.ini"

## Type:        List
## Default:     ""
#
# Description: hostname configuration. g_hostname_conf not null
# Examples:
#
#   g_hostname_conf="
#   10.18.40.1:10.18.41.1:host1;
#   10.18.40.2:10.18.41.2:;
#   10.18.40.3:10.18.41.3:host3;
#   "
#   g_hostname_conf="10.18.40.1:10.18.41.1:host1;10.18.40.2:10.18.41.2:;10.18.40.3:10.18.41.3:host3;"
#
# Remarks: 1. g_hostname_conf="OMIP:BusinessIP:HostName"
#
#          2. If you do not intend to configure the host name , then set the host name empty.
#             g_hostname_conf="OMIP:BusinessIP:"
#             g_hostname_conf=";10.18.40.2:10.18.41.2:"
#
g_hostname_conf="192.168.31.72:192.168.31.72:GaussDB200"

## Type:        Boolean 
## Default:     1
#               
#
# Description: Add missing RPM packages.
#              0  No.
#              1  Yes.
#
g_add_pkg=1

## Type:        Directory
## Default:     ""
#
# Description: The Source of RPM packages
#              if g_add_pkg is 1, g_pkgs_dir not null.
# Examples:
#
#   g_pkgs_dir="redhat-6.4:/media/redhat/;suse-11.1:/media/suse11-1/"
#
#   g_pkgs_dir="redhat-6.4:/media/"
#
#   g_pkgs_dir="suse-11.1:/media/"
#
#   g_pkgs_dir="centos-6.4:/media/"
#
#   g_pkgs_dir="euleros-2.0sp2:/media/"
#
#   g_pkgs_dir="euleros-2.0:/media/"
#
# Remarks: Mount iso file command:
#          mount rhel-server-6.4-x86_64-dvd.iso /media/ -o loop
#
g_pkgs_dir="centos-7.4:/media/"

## Type:        Boolean 
## Default:     1
#               
#
# Description: turn off swap.
#              0  No, do nothing.
#              1  Yes, will turn off swap.
#
g_swap_off=1

## Type:        String
## Default:     "root"
#
# Description:  SSH service login name.
#
g_user_name="root"

## Type:        Integer
## Default:     22
#
# Description: SSH service port.
#
g_port=22

## Type:        File 
## Default:     "/tmp/fi-preinstall.log"
#
# Description:  Log file.
#
g_log_file="/opt/guassdb-log/fi-preinstall.log"

## Type:        Boolean 
## Default:     1
#               
#
# Description: check before preinstall.
#              0  No.
#              1  Yes.
#
g_check=1

## Type:        Boolean 
## Default:     1
#  
#
# Description: Open the debug mode.
#              0  No.
#              1  Yes.
#
g_debug=0

## Type:        Boolean
## Default:     0
#
# Description: disable/enable WCE
#              0 disable WCE
#              1 enable WCE
#
g_wce_conf=0

## Type:        String
## Default:     ""
#
# Description:  Check the processor type.
#
# Examples:
#
#   g_platform="x86_64"
#
#   g_platform="aarch64"
#
g_platform="x86_64"

## Type:        String
## Default:     ""
#
# Description:  install products type.
#
# Examples:
#
#   g_optimize="default"
#
#
g_optimize="default"

## Type:        Boolean
## Default:     "0"
#
# Description:  use kms encrypt luks
#               0 no
#               1 yes
#
# Examples:
#   g_kms_conf=0
#
g_kms_conf=0

## Type:        Boolean
# Default:      0
#
#
# Description: open the core dump
#              0  No
#              1  Yes
g_core_dump=0

## Type:        String
# Default:      "/var/log/core"
#
#
# Description: core dump file dir
# e.g. "/var/log/core"
#
g_core_dump_dir="/var/log/core"

2.5 配置並檢查安裝環境

[root@host0 FusionInsight_SetupTool]# cd /opt/FusionInsight_SetupTool
# 執行自動檢測腳本
[root@host0 FusionInsight_SetupTool]# ./setuptool.sh preinstall -n

一定要加-n 參數,setuptool.sh 腳本中有解釋該選項作用

when the -n parameter is used, the precheck.sh script will not be
executed after the preinstall.sh script is executed。

如果這裏不加-n 會自動調用 precheck.sh,因爲本案例是單服務器安裝GaussDB 200,不滿足官方推薦的 3個節點,故無法通過precheck.sh預安裝驗證,所以要加-n跳過。

在這裏插入圖片描述

2.6 安裝FusionInsight_Manager

2.6.1 進入Manager安裝目錄

[root@GaussDB200 ~]#  cd /opt/FusionInsight_Manager/software
[root@GaussDB200 software]# vim install.ini
[HA]
    ha_mode=single
    local_ip1=172.20.10.6
    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=
    #配置集羣服務的home目錄 
    bigdata_home=/opt/GaussDB200/app
    #配置集羣的數據目錄
    bigdata_data_home=/opt/GaussDB200/data
    cluster_nodes_scale=
    tls_protocol_min=
    realm_parse_ip=
    kerberos_realm=
[/HA]

2.6.2 創建上述目錄
[root@GaussDB200 ~]# mkdir -p /opt/GaussDB200/app
[root@GaussDB200 ~]# mkdir -p /opt/GaussDB200/data
[root@GaussDB200 ~]#

2.6.3 執行如下命令開始安裝
高能預警:這一步比較吃內存和cpu

./install.sh -f /opt/FusionInsight_Manager/software/install.ini

在這裏插入圖片描述
上面這一步,我在公司的時候沒能跑出來結果,CPU溫度一直很高,跑失敗了
沒錯,這裏我回到了家裏(注意IP發生了變化,其餘操作一樣)。就出現了這樣的場景
在這裏插入圖片描述
這個物理外掛效果還是蠻不錯滴~

2.6.4 切換至OMM用戶
su - omm

  • 執行單機實例配置腳本
sh ${BIGDATA_HOME}/om-server/om/sbin/enable_single_host_cluster.sh

  • 重啓controller
sh ${BIGDATA_HOME}/om-server/om/sbin/restart-controller.sh

在這裏插入圖片描述

03 進入登錄界面,安裝集羣與服務

輸入上面提示的集羣鏈接:http://192.168.31.72:8080/web/ 默認密碼admin/Admin@123
第一步會提示修改密碼,請按步驟操作
在這裏插入圖片描述
第二步點擊創建集羣,
在這裏插入圖片描述
請參照圖片進行配置,如無特殊操作,默認下一步。
在這裏插入圖片描述
點擊下一步,接着,查找主機(輸入你的IP和root的密碼)
在這裏插入圖片描述

設置機架(默認就好)
在這裏插入圖片描述

安裝服務
在這裏插入圖片描述

分配角色
在這裏插入圖片描述
在這裏插入圖片描述

[omm@GaussDB200 ~]$ cat /opt/FusionInsight_SetupTool/preinstall/partition/ini-plugin/conf/mppdb1.conf
ver=1.0
name=mppdb
dir=/srv/BigData/mppdb/data1
size=max  #unit: G
filesystem=default #ext3/ext4
user=2000
group=wheel
permission=700
notify=mpp_notify.sh
notifytimeout=120    #unit: second
raid=nonraid         #nonraid#raid0#raid1
description=
  [omm@GaussDB200 ~]$ 

/srv/BigData/mppdb/data1

在這裏插入圖片描述

在這裏插入圖片描述
在這裏插入圖片描述

靜靜等待~
在這裏插入圖片描述

在這裏插入圖片描述

在這裏插入圖片描述
至此,GaussDB200單機部署實例已完成。

04 GaussDB的連接與使用

說明:這裏的操作參考官方文檔,文檔你可以直接在官網獲取,跟着文檔操作也是可以的。我這裏也是一樣的。
在這裏插入圖片描述
4.1 確認連接信息
用戶omm登錄安裝有MPPDB服務的任一主機,執行命令啓動環境變量:

[omm@GaussDB200 ~]$ source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile 
[omm@GaussDB200 ~]$ 

4.2 執行命令查詢集羣各實例情況:
gs_om -t status --detail

[omm@GaussDB200 ~]$ gs_om -t status --detail
[  CMServer State   ]

node          node_ip         instance                                    state
---------------------------------------------------------------------------------
1  GaussDB200 192.168.31.148  1    /opt/GaussDB200/app/mppdb/cm/cm_server Primary

[   Cluster State   ]

cluster_state   : Normal
redistributing  : No
balanced        : Yes

[ Coordinator State ]

node          node_ip         instance                                          state
---------------------------------------------------------------------------------------
1  GaussDB200 192.168.31.148  5001 /opt/GaussDB200/data/mppdb/data1/coordinator Normal

[ Central Coordinator State ]

node          node_ip         instance                                          state
---------------------------------------------------------------------------------------
1  GaussDB200 192.168.31.148  5001 /opt/GaussDB200/data/mppdb/data1/coordinator Normal

[     GTM State     ]

node          node_ip         instance                           state     
---------------------------------------------------------------------------
1  GaussDB200 192.168.31.148  1001 /opt/GaussDB200/app/mppdb/gtm P Primary 
[  Datanode State   ]

node          node_ip         instance                              state
---------------------------------------------------------------------------------------
1  GaussDB200 192.168.31.148  6001 /srv/BigData/mppdb/data1/master1 P Primary Normal
1  GaussDB200 192.168.31.148  6002 /srv/BigData/mppdb/data1/master2 P Primary Normal
1  GaussDB200 192.168.31.148  6003 /srv/BigData/mppdb/data1/master3 P Primary Normal
1  GaussDB200 192.168.31.148  6004 /srv/BigData/mppdb/data1/master4 P Primary Normal
1  GaussDB200 192.168.31.148  6005 /srv/BigData/mppdb/data1/master5 P Primary Normal
1  GaussDB200 192.168.31.148  6006 /srv/BigData/mppdb/data1/master6 P Primary Normal
[omm@GaussDB200 ~]$ 

4.3 確認CN的端口號
在2查到的CN數據路徑下的postgresql.conf文件中查看端口號信息。

示例如下:
cat /opt/GaussDB200/data/mppdb/data1/coordinator/postgresql.conf | grep port
查看如下:25308爲CN的端口號

在這裏插入圖片描述

4.4 gsql連接使用

1.用戶omm登錄CN所在主機,執行命令啓動環境變量:

[omm@GaussDB200 ~]$ source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile
[omm@GaussDB200 ~]$

2.連接數據庫

gsql -d postgres -p 25308

其中,postgres爲集羣安裝完成後默認生成的數據庫。
一開始可以連接到此數據庫 進行 新數據庫的創建。
25308爲CN的端口號,需根據集羣的實際情況做替換。
在這裏插入圖片描述

3.創建數據庫用戶

默認只有集羣安裝時 創建的管理員用戶 可以訪問 初始數據庫。
創建自己的數據庫用戶帳號:

postgres=# CREATE USER liuge WITH PASSWORD "Bigdata@123";
CREATE ROLE
postgres=# 

如上,顯示CREATE ROLE表示成功
在這裏插入圖片描述

4.創建數據庫

postgres=# CREATE DATABASE db_liugedata;
CREATE DATABASE
postgres=# 

如上,顯示CREATE DATABASE表示成功

  1. 切換用戶和數據庫

創建完 db_liugedata 數據庫後,就可以 \q 退出postgres數據庫,使用新用戶 liuge 連接到新數據庫 db_liugedata 執行接下來的創建表等操作。

當然,也可以選擇繼續在默認的postgres數據庫下做後續的操作。

postgres=#\q   
[omm@GaussDB200 ~]$ gsql -d db_liugedata -p 25308 -U liuge -W Bigdata@123            
gsql ((GaussDB Kernel V300R002C00 build 8a9c1eb6) compiled at 2019-08-01 18:47:38 commit 6093 last mr 10175 )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.

db_liugedata=> 
  1. 創建表

建一個名稱爲mytable,只有一列的表。字段名爲firstcol,字段類型爲integer。

db_liugedata=> CREATE TABLE mytable (firstcol int);
NOTICE:  The 'DISTRIBUTE BY' clause is not specified. Using 'firstcol' as the distribution column by default.
HINT:  Please use 'DISTRIBUTE BY' clause to specify suitable data distribution column.
CREATE TABLE
db_liugedata=> 

未使用“DISTRIBUTE BY”指定分佈列時,系統默認會指定第一列爲分佈列,且給出提示系統返回信息以“CREATE TABLE”結束,表示創建表成功。

  1. 插入數據
db_liugedata=> SELECT * from mytable;
 firstcol 
----------
(0 rows)

db_liugedata=> INSERT INTO mytable values (36);
INSERT 0 1
db_liugedata=> SELECT * from mytable;
 firstcol 
----------
       36
(1 row)

db_liugedata=> 

以上就是一些簡單的數據庫操作,更多的操作,可以會直接看官方文檔。

4.5 遠程連接使用

1.以操作系統用戶omm登錄CN所在主機,執行命令啓動環境變量:

[omm@GaussDB200 ~]$  source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile
[omm@GaussDB200 ~]$ 

a.使用如下命令查看CN目前的listen_addresses配置:

gs_guc check -Z coordinator -I all -c "listen_addresses"

得到如下效果:

[omm@GaussDB200 ~]$ gs_guc check -Z coordinator -I all -c "listen_addresses"
expected guc information: GaussDB200: listen_addresses=NULL: [/opt/GaussDB200/data/mppdb/data1/coordinator/postgresql.conf]
gs_guc check: GaussDB200: listen_addresses='localhost,192.168.31.148': [/opt/GaussDB200/data/mppdb/data1/coordinator/postgresql.conf]

Total GUC values: 1. Failed GUC values: 0.
The value of parameter listen_addresses is same on all instances.
    listen_addresses='localhost,192.168.31.148'

[omm@GaussDB200 ~]$ 

b. 使用如下命令把要添加的IP追加到listen_addresses後面,多個配置項之間用英文逗號分隔。例如,追加IP地址192.168.31.35。

gs_guc set -I all -Z coordinator -c "listen_addresses='localhost,192.168.0.100,192.168.31.35'"

得到如下效果:
在這裏插入圖片描述

c. 執行如下命令重啓集羣

gs_om -t stop && gs_om -t start

此時,請求主機的ip已被放入白名單中,接下來需要配置下連接配置。

  1. 配置每個用戶請求每個數據庫的配置信息

背景:如果 本地主機需要遠程連接數據庫,必須在數據庫系統的配置文件中增加此主機的信息,並且進行客戶端接入認證。

配置文件(默認名稱爲pg_hba.conf)存放在數據庫的數據目錄裏。
hba(host-based authentication)表示是基於主機的認證。

基於主機的認證:服務器端根據客戶端的IP地址、用戶名及要訪問的數據庫來查看配置文件從而判斷用戶是否通過認證。
“pg_hba.conf”文件的格式是一行寫一條信息,表示一個認證規則,空白和註釋(以#開頭)被忽略。

示例:
以操作系統用戶omm登錄CN所在主機,執行命令啓動環境變量:

source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile

配置客戶端認證方式,允許客戶端以“liuge”用戶連接到本機,此處遠程連接禁止使用“omm”用戶。

例如,下面示例中配置允許IP地址爲192.168.31.35的客戶端訪問本機。

gs_guc set -Z coordinator -N all -I all -h "host all jack 192.168.31.35/32 sha256

o -Z coordinator表示實例類型爲coordinator。
o -N all表示集羣的所有主機。
o -I all表示主機的所有實例。
o -h表示指定需要在“pg_hba.conf”增加的語句。
o all表示允許客戶端連接到任意的數據庫。
o test表示連接數據庫的用戶
o sha256爲加密算法(加密密碼)

使用Data_Studio 連接工具進行連接(我這裏沒有下載這個工具,後面再測試~)

05常用命令介紹

[root@GaussDB200 ~]# su - omm
Last login: Fri May 22 23:26:36 CST 2020
[omm@GaussDB200 ~]$ cd /opt/GaussDB200/app/om-server
[omm@GaussDB200 om-server]$ status_app
IAM is not running.
CEP is not running.
PMS is not running.
FMS is not running.
[omm@GaussDB200 om-server]$ 
[omm@GaussDB200 om-server]$ cd om/sbin/
[omm@GaussDB200 sbin]$ ./status-oms.sh 
HAMode 
single 

NodeName                                 HostName                                 HAVersion                StartTime                HAActive             HAAllResOK           HARunPhase          
192-168-31-72                            GaussDB200                               V100R001C01              2020-05-23 08:50:02      active               normal               Activing            

NodeName                                 ResName                                  ResStatus                ResHAStatus              ResType             
192-168-31-72                            acs                                      Unknown                  Unknown                  Single_active       
192-168-31-72                            aos                                      Unknown                  Unknown                  Single_active       
192-168-31-72                            cep                                      Unknown                  Unknown                  Single_active       
192-168-31-72                            controller                               Unknown                  Unknown                  Single_active       
192-168-31-72                            feed_watchdog                            Normal                   Normal                   Double_active       
192-168-31-72                            floatip                                  Normal                   Normal                   Single_active       
192-168-31-72                            fms                                      Unknown                  Unknown                  Single_active       
192-168-31-72                            gaussDB                                  Active_normal            Normal                   Active_standby      
192-168-31-72                            heartBeatCheck                           Normal                   Normal                   Single_active       
192-168-31-72                            httpd                                    Abnormal                 Non_steady               Single_active       
192-168-31-72                            iam                                      Unknown                  Unknown                  Single_active       
192-168-31-72                            ntp                                      Active_normal            Normal                   Active_standby      
192-168-31-72                            okerberos                                Unknown                  Unknown                  Double_active       
192-168-31-72                            oldap                                    Raising_active           Non_steady               Active_standby      
192-168-31-72                            pms                                      Unknown                  Unknown                  Single_active       
192-168-31-72                            tomcat                                   Unknown                  Unknown                  Single_active       
[omm@GaussDB200 sbin]$ 

重啓manager:

[omm@GaussDB200 sbin]$ sh restart-oms.sh
[2020-05-23 08:53:55] [INFO] Enter into stop-oms.sh with user omm  
stop HA successfully.
[2020-05-23 08:54:23] [INFO] End stop-oms.sh with user omm  
[2020-05-23 08:54:23] [INFO] Enter into start-oms.sh with user omm  
Warning: HA monitor has been running already.
start HA successfully.
[2020-05-23 08:55:22] [INFO] End start-oms.sh with user omm  
[omm@GaussDB200 sbin]$ 

刷一遍

[omm@GaussDB200 sbin]$ sh ${BIGDATA_HOME}/om-server/om/sbin/enable_single_host_cluster.sh
[omm@GaussDB200 sbin]$ sh ${BIGDATA_HOME}/om-server/om/sbin/restart-controller.sh
Restarting controller service using configuration /opt/GaussDB200/app/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 15475.
End into start-controller.sh
[omm@GaussDB200 sbin]$ 

參考:https://mp.weixin.qq.com/s/srqkcw2jUUgCluw_rlGlog
http://www.shidunkai.cn/articles/2020/05/03/1588481450482.html#toc_h3_11

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章