簡介:
本文是基於greenplum5.7,greenplum-cc-web4.0安裝的。
一、安裝greenplum監控的數據庫以及創建用戶(在gpadmin用戶下安裝)
1、開啟greenplum數據庫
[gpadmin@master ~]$ gpstart -a
2、安裝gpperfmon數據庫,以及為gpmon用戶創建密碼,端口是greenplum配置的端口
[gpadmin@master ~]$ gpperfmon_install --enable --password gpmon --port 2345
3、重啟數據庫
[gpadmin@master ~]$ gpstop -M fast -a
[gpadmin@master ~]$ gpstart -a
4、檢查gp監控是否啟動
[gpadmin@master ~]$ ps -ef | grep gpmmon
5、檢查gp監控是否監測到greenplum集群中的每台主機
[gpadmin@master ~]$ psql -d 'gpperfmon' -c 'select * from system_now;'
二、正式安裝greenplum-cc-web(在gpadmin用戶下安裝)
1、創建安裝目錄
[gpadmin@master ~]$ gpssh -f /home/gpadmin/conf/hostlist => cd /data/greenplum-db [master1] [slave1] [slave2] [slave3] => mkdir greenplum-cc-web [master1] [slave1] [slave2] [slave3] => exit
2、解壓,安裝
[gpadmin@master ~]$ unzip greenplum-cc-web-4.0.0-LINUX-x86_64.zip [gpadmin@master ~]$ cd greenplum-cc-web-4.0.0-LINUX-x86_64 [gpadmin@master greenplum-cc-web-4.0.0-LINUX-x86_64]$ ./gpccinstall-4.0.0 #一直空格 I HAVE READ AND AGREE TO THE TERMS OF THE ABOVE PIVOTAL GREENPLUM DATABASE END USER LICENSE AGREEMENT. Do you agree to the Pivotal Greenplum Command Center End User License Agreement? Yy/Nn (Default=Y) Where would you like to install Greenplum Command Center? (Default=/usr/local) /opt/greenplum/greenplum-cc-web What would you like to name this installation of Greenplum Command Center? (Default=gpcc) What port would you like gpcc webserver to use? (Default=28080) Would you like to enable kerberos? Yy/Nn (Default=N) Would you like enable SSL? Yy/Nn (Default=N) Installation in progress... Successfully installed Greenplum Command Center. We recommend ssh to standby master before starting GPCC webserver To start the GPCC webserver on the current host, run gpcc start
3、修改環境變量(所有機器)
[gpadmin@master ~]$ vi .bash_profile #添加 source /opt/greenplum/greenplum-cc-web/greenplum-cc-web-4.0.0/gpcc_path.sh [gpadmin@master ~]$ source .bash_profile
4、修改pg_hba.conf文件連接
[gpadmin@master ~]$ vi /data/greenplum-db/gpdata/gpmaster/gpseg-1/pg_hba.conf #在最后一行添加這句 host all gpmon (本機的ip)/24 md5 [gpadmin@master ~]$ gpstop -M fast -a [gpadmin@master ~]$ gpstart -a [gpadmin@master ~]$ gpcc start
三、登錄訪問
1、打開網址訪問http://192.168.12.101:28080/login,密碼為前面設置的密碼
2、常用gpcc命令
gpcc stop
gpcc start