美文网首页
CentOS 7 部署 greenplum-cc-web 4.9

CentOS 7 部署 greenplum-cc-web 4.9

作者: 白面葫芦娃92 | 来源:发表于2020-03-15 11:45 被阅读0次

1 GreenPlum集群安装环境

由虚拟机搭建的一台master两台segment。
(参见文章https://www.jianshu.com/p/8f71515dfd98

2 上传安装包,解压(gpadmin用户下安装)

GreenPlum监控安装包: greenplum-cc-web-4.9.0-gp5-rhel7-x86_64.zip

[gpadmin@hadoop001 greenplum]# rz
[gpadmin@hadoop001 greenplum]# unzip greenplum-cc-web-4.9.0-gp5-rhel7-x86_64.zip

3 修改postgresql.conf配置文件(master)

进入master的文件系统中的gpseg-1文件夹下,编辑postgresql.conf,添加以下参数:

[gpadmin@hadoop001 greenplum]# cd /home/gpadmin/gpdata/gpmaster/gpseg-1/
[gpadmin@hadoop001 gpseg-1]# vi postgresql.conf
gp_enable_gpperfmon=on
gpperfmon_port=8888
gp_external_enable_exec=on
gpperfmon_log_alert_level=warning

4 安装GreenPlum监控的数据库以及创建用户(master)

4.1 安装gpperfmon数据库,以及为gpmon用户创建密码

[gpadmin@hadoop001 ~]$ gpperfmon_install --enable --password gpmon --port 5432

4.2重启数据库

[gpadmin@hadoop001 ~]$ gpstop -r

4.3 检查gp监控是否启动

[gpadmin@hadoop001 ~]$ ps -ef|grep gpmmon
gpadmin  31871 31862  0 16:50 ?        00:00:00 /opt/greenplum/greenplum-db-5.24.2/bin/gpmmon -D /home/gpadmin/gpdata/gpmaster/gpseg-1/gpperfmon/conf/gpperfmon.conf -p 5432
gpadmin  31988 31226  0 16:51 pts/1    00:00:00 grep --color=auto gpmmon

4.4 检查gp监控是否监测到greenplum集群中的每台主机

[gpadmin@hadoop001 ~]$ psql -d 'gpperfmon' -c 'select * from system_now;'
        ctime        | hostname  |  mem_total  |  mem_used  | mem_actual_used | mem_actual_free | swap_total | swap_used | swap_page_in | swap_page_out | cpu_user | cpu_sys | cpu_idle | load0 | load1 | load2
 | quantum | disk_ro_rate | disk_wo_rate | disk_rb_rate | disk_wb_rate | net_rp_rate | net_wp_rate | net_rb_rate | net_wb_rate 
---------------------+-----------+-------------+------------+-----------------+-----------------+------------+-----------+--------------+---------------+----------+---------+----------+-------+-------+------
-+---------+--------------+--------------+--------------+--------------+-------------+-------------+-------------+-------------
 2020-03-14 16:53:00 | hadoop002 |  8201240576 | 3927465984 |       342990848 |      7858249728 |          0 |         0 |            0 |             0 |     0.43 |    0.43 |    99.13 |     0 |  0.01 |  0.05
 |      15 |            0 |            1 |            0 |         9803 |           3 |           3 |        1029 |        1281
 2020-03-14 16:53:00 | hadoop003 |  8201932800 | 3921903616 |       339959808 |      7861972992 |          0 |         0 |            0 |             0 |     0.57 |     0.5 |     98.9 |  0.01 |  0.03 |  0.05
 |      15 |            0 |            2 |            0 |        12526 |           3 |           3 |        1025 |        1242
 2020-03-14 16:53:00 | hadoop001 | 16656961536 | 1334124544 |       318894080 |     16338067456 |          0 |         0 |            0 |             0 |     0.13 |    0.17 |     99.7 |  0.02 |  0.04 |  0.05
 |      15 |            0 |            2 |            0 |        16610 |           7 |           7 |        1915 |        1614
(3 rows)

5 正式安装GreenPlum-CC-Web

5.1 批量创建文件夹备用(master)

[gpadmin@hadoop001 ~]$ gpssh -f /home/gpadmin/conf/hostlist
=> cd /opt/greenplum
[hadoop001]
[hadoop002]
[hadoop003]
=> mkdir greenplum-cc-web
[hadoop001]
[hadoop002]
[hadoop003]
=> exit

5.2 执行安装脚本(master)

greenplum-cc-web默认安装在/usr/local/目录下
安装目录修改为:/opt/greenplum/greenplum-cc-web
其他一直回车

[gpadmin@hadoop001 ~]$ cd /opt/greenplum/greenplum-cc-web-4.9.0-rhel7-x86_64/
[gpadmin@hadoop001 greenplum-cc-web-4.9.0-rhel7-x86_64]$ ll
total 57976
-rwxr-xr-x 1 gpadmin gpadmin 59365568 Dec 13 20:18 gpccinstall-4.9.0
[gpadmin@hadoop001 greenplum-cc-web-4.9.0-rhel7-x86_64]$ ./gpccinstall-4.9.0
I HAVE READ AND AGREE TO THE TERMS OF THE ABOVE PIVOTAL GREENPLUM DATABASE
END USER LICENSE AGREEMENT.
Do you agree to the Pivotal Greenplum Command Center End User License Agreement? Yy/Nn (Default=Y)
y
Do you agree to the Pivotal Greenplum Command Center End User License Agreement? Yy/Nn (Default=Y)
y

Where would you like to install Greenplum Command Center? (Default=/usr/local)
/opt/greenplum/greenplum-cc-web

What would you like to name this installation of Greenplum Command Center? (Default=gpcc)

What port would you like gpcc webserver to use? (Default=28080)

Would you like enable SSL? Yy/Nn (Default=N)

Please choose a display language (Default=English)
1.  English
2.  Chinese
3.  Korean
4.  Russian
5.  Japanese

INSTALLATION IN PROGRESS...
RELOADING pg_hba.conf. PLEASE WAIT ...
20200314:17:01:20:000805 gpconfig:hadoop001:gpadmin-[INFO]:-completed successfully with parameters '127.0.0.1 -c gp_enable_gpperfmon -v off'

********************************************************************************
*                                                                              *
* INSTALLATION COMPLETED SUCCESSFULLY                                          *
*                                                                              *
* Source the gpcc_path.sh or add it to your bashrc file to use gpcc command    *
* utility.                                                                     *
*                                                                              *
* To see the GPCC web UI, you must first start the GPCC webserver.             *
*                                                                              *
* To start the GPCC webserver on the current host, run gpcc start.             *
*                                                                              *
********************************************************************************

******************************* GONFIG UPDATE **********************************
*                                                                              *
* GUC gp_enable_gpperfmon is turned off to get better performance.             *
* Please RESTART GPDB for it to take effective.                                *
*                                                                              *

5.3 修改环境变量(一定注意是所有机器!!!)

[gpadmin@hadoop001 greenplum-cc-web-4.9.0-rhel7-x86_64]$ cd
[gpadmin@hadoop001 ~]$ vi .bash_profile

source /opt/greenplum/greenplum-cc-web/greenplum-cc-web-4.9.0/gpcc_path.sh

[gpadmin@hadoop001 ~]$ source .bash_profile

6 修改pg_hba.conf文件连接(master)

[gpadmin@hadoop001 ~]$ cd /home/gpadmin/gpdata/gpmaster/gpseg-1
[gpadmin@hadoop001 gpseg-1]$ vi pg_hba.conf
host    all     gpmon   172.26.183.103/24       md5

7 重启gp,启动gpcc

[gpadmin@hadoop001 gpseg-1]$ cd
[gpadmin@hadoop001 ~]$ gpstop -M fast -a
[gpadmin@hadoop001 ~]$ gpstart -a
[gpadmin@hadoop001 ~]$ gpcc start
2020-03-14 17:15:01 Starting the gpcc agents and webserver...
2020-03-14 17:15:03 Agent successfully started on 3/3 hosts
2020-03-14 17:15:03 View Greenplum Command Center at http://hadoop001:28080

8 安装完毕,访问

打开浏览器,在地址栏输入http://主机的ip:28080,如果出现以下界面,那么恭喜你,你的greenplum-cc-web全部安装成功!
用户名:gpmon 密码:gpmon


参考链接

http://www.freesion.com/article/715752811/
https://blog.csdn.net/aigu1989/article/details/102241686
https://www.cnblogs.com/ruanjianlaowang/p/11182496.html

相关文章

网友评论

      本文标题:CentOS 7 部署 greenplum-cc-web 4.9

      本文链接:https://www.haomeiwen.com/subject/ygjqehtx.html