1在GreenplumMaster节点操作:
1.1使用gpadmin用户登录
su - gpadmin
1.2执行 gpperfmon_install 命令
[gpadmin@hadoop3 greenplum-db-6.0.0]$ source greenplum_path.sh
[gpadmin@hadoop3 greenplum-db-6.0.0]$ gpperfmon_install--enable --password gpmon --port 5432
初始化gpperfmon监控数据库失败;直接安装gpcc
2正式安装Greenplum Command Center Console
以下操作都在primarymaster节点操作:
2.1下载适合自己服务器的gpcc安装程序
greenplum-cc-web-6.9.0-gp6-rhel7-x86_64.zip
官网上面只能下载到RedHat操作系统的,要求在SuSE操作系统上面安装,可先在RedHat上面安装好之后,将安装目录打包后,再安装到SuSE上,但是配置文件需要根据需要修改。
2.2将获取的GPCC包(greenplum-cc-web-6.9.0-gp6-rhel7-x86_64.zip)上传到primarymaster节点的gpadmin用户家目录下面并完成解压操作
cd /home/gpadmin/
unzip greenplum-cc-web-6.9.0-gp6-rhel7-x86_64.zip
mv greenplum-cc-web-6.9.0-gp6-rhel7-x86_64 gpcc
chown -R gpadmin:gpadmin gpcc
chmod -R 755 gpcc
2.3修改/usr/local/gpcc/greenplum-cc-6.9.0/gpcc_path.sh文件,将GPPERFMONHOME配置为GP监控的实际家目录,如下:
2.4将"source /usr/local/gpcc/greenplum-cc-6.9.0/gpcc_path.sh"加入到~/.bashrc文件并source使环境变量生效:
echo "source /usr/local/gpcc/greenplum-cc-6.9.0/gpcc_path.sh" >> ~/.bashrc
source ~/.bashrc
2.5在集群其它节点/usr/local/目录下创建gpcc目录
mkidr gpcc
chown -R gpadmin:gpadmin gpcc
chmod -R 755 gpcc
修改所有节点的gpcc的目录权限为gpadmin,否则后续安装gpcc会报错(例如:IOError、gpadmin-[CRITICAL]:-gppkg failed. (Reasnotallow='')、Permission denied等):
2.6交互式安装
su - gpadmin
source /usr/local/greenplum-db/greenplum_path.sh
unzip greenplum-cc-web-6.9.0-gp6-rhel7-x86_64.zip
mv greenplum-cc-web-6.9.0-gp6-rhel7-x86_64 gpcc
cd gpcc
./gpccinstall-6.9.0 -W
2.7安装过程:
[gpadmin@mdw1 gpcc]$ ./gpccinstall-6.9.0 -W
Password for GPDB user gpmon:
Where would you like to install Greenplum Command Center? (Default=/usr/local)
Greenplum Command Center will be installed in /usr/local/greenplum-cc-6.9.0
What would you like to name this installation of Greenplum Command Center? (Default=gpcc)
What port would you like the gpcc webserver to use? (Default=28080)
Would you like to enable SSL/TLS? Yy/Nn (Default=Y)
n
********************************************************************************
* WARNING: Your connections to GPCC will be insecure. *
********************************************************************************
Please choose a display language (Default=English)
1. English
2. Chinese
3. Korean
4. Russian
5. Japanese
2
Could not detect [metrics_collector] in shared_preload_libraries
Please add it to enable GPCC metrics collection
Would you like to continue with gpcc installation? Yy/Nn (Default=N)
y
INSTALLATION IN PROGRESS...
********************************************************************************
* *
* INSTALLATION IS ALMOST COMPLETED *
* *
* The last step is to update the metrics_collector extension, which needs to *
* restart the Greenplum Database cluster. Please proceed to $GPCC_HOME and *
* follow the instructions in this file: *
* *
* update-extension.txt *
* *
* Some new features may not be available before the update is done. *
* *
* To use GPCC with the old metrics_collector extension, source gpcc_path.sh *
* and run 'gpcc start'. *
* *
********************************************************************************
2.8升级extension metrics_collector(必须)
echo 'source /usr/local/gpcc/greenplum-cc-6.9.0/gpcc_path.sh' >> ~/.bashrc
source /usr/local/gpcc/greenplum-cc-6.9.0/gpcc_path.sh
cd $GPCC_HOME
cat update-extension.txt
需要做如下的操作:
1.cd /usr/local/gpcc/greenplum-cc-6.9.0/gppkg
2.Stop GPCC: gpcc stop
3.Drop extension: psql gpperfmon -c 'drop extension metrics_collector'
4.Use "gppkg -q --all" to list packages installed.
5.Remove the old version of the metrics_collector: "gppkg -r <name>-<version>"
6.Install the new version: gppkg -i MetricsCollector-6.9.0_gp_6.0.0-<OS>-<ARCH>.gppkg
7.Restart GPDB
8.Restart GPCC: gpcc start
3登陆GPCC页面
URL:http://192.168.1.112:28080
gpmon/gpmon