gpcc 之二 setup

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

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