Greenplum Greenplum Command Center GPCC (一)GP Web监控工具 安装 部署

1.定义

  Pivotal Greenplum Command Center是Pivotal Greenplum数据库大数据平台的管理工具。这是一个商业版本的组件,开源的GP目前不支持。
 

2.功能

  Greenplum Command Center 监控系统性能指标,分析集群运行状况,并使数据库管理员能够在Greenplum数据库环境中执行管理任务。Greenplum Command Center提供了一个浏览器本地HTML5图形控制台,用于查看Greenplum数据库系统指标和执行某些数据库管理任务。
 

3.创建gpperfmon数据库

前提:
默认已经安装好了GP。
(1)启动收集代理
用gpadmin用户登录gp master主机
su - gpadmin
 
从gp安装目录获取路径文件
source /usr/local/greenplum-db/greenplum_path.sh
 
用gpperfmon_install命令来安装,必须要指定端口,并且为gpmon这个超级用户设置密码(gpmon)
gpperfmon_install --enable --password changeme --port 5432
 
之后重启gp 如果重启不行直接停止数据库
gpstop -M fast
 
运行以下命令以验证gpmon用户是否可以进行身份验证,以及数据收集进程是否正在写入Command Center数据库。如果所有段数据收集代理程序都在运行,则每个段主机应该会看到一行。
psql -U gpmon gpperfmon -c 'SELECT * FROM system_now;'
     
(2)配置Standby主机(如果配置过了可以跳过该步骤)
将$MASTER_DATA_DIRECTORY/pg_hba.conf文件从master拷贝到standby上,这可以保证在standby上也设置了所需的连接选项。(最好是先把host     all         gpmon         192.168.14.46/32    md5
这段话添加到pg_hba.conf中)
scp pg_hba.conf gpadmin@192.168.14.46:$MASTER_DATA_DIRECTORY/pg_hba.conf
 
将gpadmin家目录下的.pgpass 文件从master拷贝到standby上,需要设置权限必须为600
scp /home/gpadmin/.pgpass gpadmin@192.168.14.46:/home/gpadmin/.pgpass
chmod 600 ~/.pgpass
    
(3) gpmon用户身份验证
gpperfmon_install命令会默认把gpmon用户的相关条目添加到pg_hba.conf文件中,这允许gpmon用户与Greenplum集群中的任何数据库建立本地连接
local    gpperfmon   gpmon    md5
host     all         gpmon         127.0.0.1/28    md5
host     all         gpmon         ::1/128         md5
对于Greenplum Command Center,gpmon用户还必须从运行Command Center Web服务器和后端的主机进行主机访问,需要手动添加:
host     all         gpmon         192.168.14.46/32    md5
        

4.安装gpcc

方案一:
  本次安装默认安装在/usr/local目录下,用gpadmin用户来安装
(1) 提前准备
切换为root用户,将/usr/local/的目录拥有者设置为gpadmin 在安装好之后再重新给root
chown gpadmin:gpadmin /usr/local/
 
需要对其他节点做相同的操作,之后需要将权限设置回来
chown root:root /usr/local/
   
(2)安装
unzip greenplum-cc-web-4.5.1-LINUX-x86_64.zip
 
如果需要指定目录可以使用-d
unzip greenplum-cc-web-4.5.1-LINUX-x86_64.zip -d /opt/
 
运行Greenplum Command Center安装程序
cd greenplum-cc-web-4.5.1
./gpccinstall-4.5.1 -W
参数选择默认
 
(3) 设置GPCC环境变量
source /usr/local/greenplum-cc-web-<version>/gpcc_path.sh
 
将这段话添加到gpadmin用户的~/.bashrc中
source ~/.bashrc
 
(4) 启动
推荐在standby主机上启动gpcc
gpcc start
    
(5) 连接到gpcc控制台
打开游览器
http://192.168.14.46:28080
 
方案二:
  本次安装默认安装在/usr/local目录下,用root用户来安装
(1)安装
unzip greenplum-cc-web-4.5.1-LINUX-x86_64.zip
 
如果需要指定目录可以使用-d
unzip greenplum-cc-web-4.5.1-LINUX-x86_64.zip -d /opt/
 
运行Greenplum Command Center安装程序
source /usr/local/greenplum-db/greenplum_path.sh
cd greenplum-cc-web-4.5.1
./gpccinstall-4.5.1
参数选择默认        
 
注:gpccinstall有三个参数
 
-c  <config-file>选项指定用于非交互式安装的安装配置文件的路径。请参阅使用配置文件安装。
-W  选项指示安装程序提示输入gpmon用户的密码。安装程序尝试从PGPASSWORD环境变量(如果已设置)
    或~gpadmin/.pgpass文件(如果存在)中检索gpmon密码。如果这两个选项都不可用,
    请包含-W指示安装程序提示输入密码的选项。
--ssh_path  选项允许您指定自定义ssh程序的完整路径。如果您不提供此选项,安装程序将在路径上使用ssh命令。

(2)权限设置

将/usr/local/greenplum-cc-web-4.5.1目录用户设置为gpadmin(需要将所有节点设置)
chown -R gpadmin:gpadmin /usr/local/greenplum-cc-web-4.5.1
 
(3) 设置GPCC环境变量
source /usr/local/greenplum-cc-web-<version>/gpcc_path.sh
将这段话添加到gpadmin用户的~/.bashrc中
source ~/.bashrc
 
(4)启动
官方推荐在standby master上启动gpcc
ssh 192.168.14.46 gpcc start
日志如下:      
Starting the gpcc agents and webserver…
2019/02/21 11:15:00 Agent successfully started on 3/3 hosts
2019/02/21 11:15:00 View Greenplum Command Center at http://node02:28080
(5)连接到gpcc控制台
打开游览器
http://192.168.14.46:28080
 

5.交互式安装参数列表

安装程序提示
默认
参数
您想在哪里安装Greenplum Command Center?
/usr/local
 
自定义路径
您想为Greenplum Command Center的安装命名一下?
gpcc
自定义名称
您想在哪个端口安装Greenplum Command Center Web服务器?
28080
WEB_PORT
您要启用SSL吗?
false
enable_ssl
请提供SSL证书的文件路径:
/etc/ssl/certs/cert.pem
ssl_cert_file
你想启用Kerberos吗?
false
enable_kerberos
选择Kerberos模式(1.normal / 2.strict / 3.gpmon_only):
1
krb_mode
请提供keytab文件的路径:
 
密钥表
GPDB Kerberos服务的名称是什么?
postgres
krb_service_name
Command Center Web服务器的URL是什么?
gpcc
webserver_url
 
 
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值