os: centos 7.4
gp: gpdb-5.7.0
gpcc: greenplum-cc-web-4.0.0
os 设置
gpcc 是安装在 master 机器上的,如果安装在一台独立的机器上,会报错
$ ./gpccinstall-4.0.0
Failed to connect to database: dial tcp 127.0.0.1:5432: connect: connection refused
gpcc 需要安装在集群所有节点上,所以需要在集群所有节点都创建 gpcc 目录
# mkdir -p /usr/local/greenplum-gpcc;
chown -R gpadmin:gpadmin /usr/local/greenplum-gpcc;
下载安装
先执行gpperfmon_install,参考<<gpcc 之一 gpperfmon_install>>
gpcc 4.0.0 下载地址
https://network.pivotal.io/products/pivotal-gpdb/#/releases/110342/file_groups/1007
修改密码,需与执行 gpperfmon_install 的密码相同.
# su - gpadmin
$ psql postgres
psql (8.3.23)
Type "help" for help.
postgres=#
postgres=# alter user gpmon with password 'gpmongpmon';
ALTER ROLE
解压安装(集群所有节点都创建 gpcc 目录)
$ rz
$ ls -l
-rw-r--r-- 1 gpadmin gpadmin 25318350 Sep 6 11:36 greenplum-cc-web-4.0.0-LINUX-x86_64.zip
$ unzip ./greenplum-cc-web-4.0.0-LINUX-x86_64.zip
Archive: ./greenplum-cc-web-4.0.0-LINUX-x86_64.zip
creating: greenplum-cc-web-4.0.0-LINUX-x86_64/
inflating: greenplum-cc-web-4.0.0-LINUX-x86_64/gpccinstall-4.0.0
$ ls -l
drwxr-xr-x 2 gpadmin gpadmin 31 Mar 29 2018 greenplum-cc-web-4.0.0-LINUX-x86_64
-rw-r--r-- 1 gpadmin gpadmin 25318350 Sep 6 11:36 greenplum-cc-web-4.0.0-LINUX-x86_64.zip
$ cd greenplum-cc-web-4.0.0-LINUX-x86_64/
$ ls -l
-rwxr-xr-x 1 gpadmin gpadmin 35721237 Mar 29 2018 gpccinstall-4.0.0
$ ./gpccinstall-4.0.0
一段声明后,出现交互页面.
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
To manage Command Center, use the gpcc utility.
Usage:
gpccinstall-4.0.0 [OPTIONS] <command>
Application Options:
-v, --version Show Greenplum Command Center version
--settings Print the current configuration settings
Help Options:
-h, --help Show this help message
Available commands:
help Print list of commands
krbdisable Disables kerberos authentication
krbenable Enables kerberos authentication
start Starts Greenplum Command Center webserver and metrics collection agents [-W] option to force password prompt for GPDB user gpmon [optional]
status Print agent status with [-W] option to force password prompt for GPDB user gpmon [optional]
stop Stops Greenplum Command Center webserver and metrics collection agents [-W] option to force password prompt for GPDB user gpmon [optional]
查看 master,standby 节点 pg_hba.conf 中 gpmon 的 配置
gpmon 不能配置成 trust 方式
local gpperfmon gpmon md5
host all gpmon 127.0.0.1/28 md5
host all gpmon ::1/128 md5
host all gpmon 0.0.0.0/0 md5
配置
$ cd /usr/local/greenplum-gpcc/greenplum-cc-web-4.0.0/
$ ls -l
total 4
drwxrwxr-x 2 gpadmin gpadmin 69 Sep 6 14:32 bin
drwxrwxr-x 2 gpadmin gpadmin 22 Sep 6 14:32 conf
-rw-rw-r-- 1 gpadmin gpadmin 114 Sep 6 14:32 gpcc_path.sh
修改 master,standby 节点 gpadmin 用户配置文件,追加 gpcc 环境变量信息
# su - gpadmin
$ vi ~/.bashrc
source /usr/local/greenplum-gpcc/greenplum-cc-web-4.0.0/gpcc_path.sh
$ vi ~/.bash_profile
source /usr/local/greenplum-gpcc/greenplum-cc-web-4.0.0/gpcc_path.sh
启动 gpcc
$ which gpcc
/usr/local/greenplum-gpcc/greenplum-cc-web-4.0.0/bin/gpcc
$ gpcc --settings
Install path: /usr/local/greenplum-gpcc
Display Name: gpcc
GPCC port: 28080
Kerberos: disabled
SSL: disabled
$ gpcc status
2019/09/06 15:21:10 GPCC webserver: stopped
2019/09/06 15:21:10 GPCC agents: 0/4 agents running
$ gpcc start
Starting the gpcc agents and webserver…
2019/09/06 15:21:13 Unable to start metrics collection agent on this gpdb cluster
2019/09/06 15:21:13 Please refer webserver log in /usr/local/greenplum-gpcc/greenplum-cc-web-4.0.0/logs for details
2019/09/06 15:21:13 View Greenplum Command Center at http://mas:28080
$ gpcc status
2019/09/06 15:53:23 GPCC webserver: running
2019/09/06 15:53:24 GPCC agents: 0/4 agents running
2019/09/06 15:53:24 Agent is stopped on seg1
2019/09/06 15:53:24 Agent is stopped on seg2
2019/09/06 15:53:24 Agent is stopped on sla
2019/09/06 15:53:24 Agent is stopped on mas
为啥 agent 都没有起来,难道需要在每个节点再单独起 agent ?
浏览器里输入 http://192.168.56.99:28080
user:gpmon
pwd:gpmongpmon
参考:
https://network.pivotal.io/products/pivotal-gpdb/#/releases/110342/file_groups/1007
http://gpcc.docs.pivotal.io/400/welcome.html