Centos6系统安装gpperfmon-cc-web监控

2016-03-11 14:30:36   作者:MangoCool   来源:MangoCool

之前集群安装的开源版的Greenplum,在安装gpperfmon-cc-web时候,遇到的问题始终解决不了,于是就暂时放弃了安装。

后来从pivotal公司工程师那里得知,只有商业版的Greenplum才能配合安装gpperfmon-cc-web,这次成功了!

启用收集系统代理:

1、首先用gpadmin用户登录:

$ su - gpadmin

2、在master主机上执行source:

$ source /usr/local/greenplum-db/greenplum_path.sh
3、使用gpperfmon_install命令,安装后会建立gpperfmon数据库,默认用户gpmon:
$ gpperfmon_install --enable --password changeme --port 5432

4、重启数据库:

$ gpstop -r
5、使用ps命令检查数据收集进程是否运行:
$ ps -ef | grep gpmmon
6、执行命令检查数据收集进程是否写入命令中心数据库:
$ psql gpperfmon -c 'SELECT * FROM system_now;'


配置standby master主机:

1、复制 $MASTER_DATA_DIRECTORY/pg_hba.conf 文件从你的master主机到standby主机:

$ gpscp -h smdw /home/gpamdin/masterdata/gpseg-1/pg_hba.conf =:$MASTER_DATA_DIRECTORY/
2、复制 ~/.pgpass 文件从你的master主机到standby主机:

$ gpscp -h smdw ~/.pgpass =:~/
注:.pgpass 权限必须要设置成600。


正式安装Greenplum Command Center Console:

1、下载地址:

官网下载:https://network.pivotal.io/products/pivotal-gpdb#/releases/1533/file_groups/26

云盘下载:http://pan.baidu.com/s/1hqZU72W

2、解压安装:

这里我以greenplum-cc-web-2.0.0为例:

$ unzip greenplum-cc-web-2.0.0-build-32-RHEL5-x86_64.zip
$ ./greenplum-cc-web-2.0.0-build-32-RHEL5-x86_64.bin

注:因为默认安装路径是/usr/local,避免权限问题,可以先用root安装,再修改成gpadmin访问权限;或者先修改/usr/local路径gpadmin用户的访问权限,再直接用gpadmin用户安装。

安装过程中可根据提示作出自己的选择和修改,首先得接受pivotal的协议。

我的安装过程如下:


3、使环境变量生效,执行source:

$ source /usr/local/greenplum-db/greenplum_path.sh
$ source /usr/local/greenplum-cc-web/gpcc_path.sh

4、用gpadmin用户,执行 gpccinstall 命令安装 Command Center 到所有的主机上:

$ gpccinstall -f all_hosts


设置Command Center环境:

1、添加 GPPERFMONHOME 环境变量到~/.bashrc:

GPPERFMONHOME=/usr/local/greenplum-cc-web-2.0.0-build-32
source $GPPERFMONHOME/gpcc_path.sh

2、保存和source .bashrc:

$ source ~/.bashrc


设置Command Center控制台实例:

1、配置SSL:

这里我省略了。

2、创建 Command Center 实例:

以下是我的设置,可以根据自己的实际情况设置:

[gpadmin@mdw ~]$ gpcmdr --setup

An instance name is used by the Greenplum Command Center as
a way to uniquely identify a Greenplum Database that has the monitoring
components installed and configured.  This name is also used to control
specific instances of the Greenplum Command Center web UI.  Instance names
can contain letters, digits and underscores and are not case sensitive.

Please enter a new instance name:
> gpmon
The web component of the Greenplum Command Center can connect to a
monitor database on a remote Greenplum Database.


Is the master host for the Greenplum Database remote? Yy|Nn (default=N):
> n
The display name is shown in the web interface and does not need to be
a hostname.


What would you like to use for the display name for this instance:
> linux1024
What port does the Greenplum Database use? (default=5432):
>
Creating instance schema in GPDB.  Please wait ...
The display name is shown in the web interface and does not need to be
a hostname.



Would you like to install workload manager? Yy|Nn (default=N):
> n
Skipping installation of workload manager.
The Greenplum Command Center runs a small web server for the UI and web API.
This web server by default runs on port 28080, but you may specify any available port.

What port would you like the web server to use for this instance? (default=28080):
>
Users logging in to the Command Center must provide database user
credentials.  In order to protect user names and passwords, it is recommended
that SSL be enabled.


Do you want to enable SSL for the Web API Yy|Nn (default=N):
>

Do you want to enable ipV6 for the Web API Yy|Nn (default=N):
>

Do you want to enable Cross Site Request Forgery Protection for the Web API Yy|Nn (default=N):
>

Do you want to copy the instance to a standby master host Yy|Nn (default=Y):
> n

Done writing lighttpd configuration to /usr/local/greenplum-cc-web/./instances/gpmon/conf/lighttpd.conf
Done writing web UI configuration to /usr/local/greenplum-cc-web/./instances/gpmon/conf/gpperfmonui.conf
Done writing web UI clustrs configuration to /usr/local/greenplum-cc-web/./instances/gpmon/conf/clusters.conf

Greenplum Command Center UI configuration is now complete.  If
at a later date you want to change certain parameters, you can
either re-run 'gpcmdr --setup' or edit the configuration file
located at /usr/local/greenplum-cc-web/./instances/gpmon/conf/gpperfmonui.conf.

The web UI for this instance is available at http://mdw:28080/

You can now start the web UI for this instance by running: gpcmdr --start gpmon
No instances

期间你可能会遇到报错:FATAL:  no pg_hba.conf entry for host "::1"。可以参考文章:http://mangocool.com/1457509181285.html

设置成功,这是提示信息告诉你可以通过地址http://mdw.28080访问了。服务名:linux1024,用户gpmon,密码我没有,登录时随便填。

登录成功:

本文就到此结束,小伙伴参考过程中遇到问题,欢迎来扰,一起交流学习!

标签: Greenplum gpperfmon-cc-web

分享:

上一篇Error: Cannot find configuration directory: /etc/hadoop

下一篇Centos6系统安装Greenplum集群版

关于我

一个喜欢唱歌,热衷旅行,爱好电子产品的码农。没事,跟三五好友吼上几嗓子,约上几个背着行囊去露营或者宅在家里抱着孩子敲代码。

座右铭:当你的才华还撑不起你的野心的时候,你就应该静下心来学习,永不止步!

            人生之旅历途甚长,所争决不在一年半月,万不可因此着急失望,招精神之萎葸。


Copyright 芒果酷(mangocool.com) All rights reserved. 湘ICP备14019394号

免责声明:本网站部分文章转载其他媒体,意在为公众提供免费服务。如有信息侵犯了您的权益,可与本网站联系,本网站将尽快予以撤除。