Greenplum-6.12安装gpcc
https://blog.csdn.net/u010895512/article/details/125580431
一. 下载软件
下载地址
在搜索栏中输入关键词进行搜索
选择对应的版本,点击下载(需要登录账号)
上传到/opt目录下
二. 安装
root用户登录master机器操作
#解压
[root@mdw opt]# unzip greenplum-cc-web-6.0.0-rhel7_x86_64.zip
Archive: greenplum-cc-web-6.7.1-gp6-rhel7-x86_64.zip
creating: greenplum-cc-web-6.7.1-gp6-rhel7-x86_64/
inflating: greenplum-cc-web-6.7.1-gp6-rhel7-x86_64/gpccinstall-6.0.0
[root@mdw opt]# ls
greenplum-cc-web-6.7.1-gp6-rhel7-x86_64 greenplum-cc-web-6.7.1-gp6-rhel7-x86_64.zip greenplum-cc-web-6.7.1-gp6-rhel7-x86_64.rpm rh
[root@mdw opt]#
#目录赋权限给gpadmin
[root@mdw opt]# chown -R gpadmin:gpadmin /opt/greenplum-cc-web-6.7.1-gp6-rhel7-x86_64
#切换用户安装
[root@mdw greenplum-cc-web-6.7.1-gp6-rhel7-x86_64]# su - gpadmin
[gpadmin@mdw ~]$ cd /opt/greenplum-cc-web-6.7.1-gp6-rhel7-x86_64/
[gpadmin@mdw greenplum-cc-web-6.7.1-gp6-rhel7-x86_64]$ ./gpccinstall-6.0.0
...
#同意
Do you agree to the Pivotal Greenplum Command Center End User License Agreement? Yy/Nn (Default=Y)
y
#指定安装路径greenplum
Where would you like to install Greenplum Command Center? (Default=/usr/local)
/greenplum
#默认回车
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)
#输入n
Would you like enable SSL? Yy/Nn (Default=N)
n
#输入2
Please choose a display language (Default=English)
1. English
2. Chinese
3. Korean
4. Russian
5. Japanese
2
INSTALLATION IN PROGRESS...
RELOADING pg_hba.conf. PLEASE WAIT ...
********************************************************************************
* *
* 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. *
* *
********************************************************************************
To manage Command Center, use the gpcc command-line utility.
Usage:
gpcc [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
with [-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
with [-W] option to force password prompt for GPDB user gpmon [optional]
[gpadmin@mdw greenplum-cc-web-6.0.0-rhel7_x86_64]$
三. 设置环境变量
cat >> /home/gpadmin/.bash_profile << EOF
source /greenplum/greenplum-cc-web-6.0.0/gpcc_path.sh
EOF
# 生效环境变量
source /home/gpadmin/.bash_profile
# 新建包含standby主机,segment主机的文件,无多余的空格和换行
[gpadmin@mdw ~]$ vi /tmp/standby_seg_hosts
#添加如下内容
smdw
sdw1
sdw2
保存退出
#分发
gpscp -f /tmp/standby_seg_hosts ~/.bash_profile =:~
四. 修改配置
vi /data/master/gpseg-1/pg_hba.conf
#添加如下内容
host gpperfmon gpmon 0.0.0.0/0 md5
#host all gpmon 0.0.0.0/0 trust
gpscp -f /tmp/hostlist /data/master/gpseg-1/postgresql.conf =/data/master/gpseg-1/postgresql.conf
[gpadmin@mdw gpseg-1]$ scp postgresql.conf gpadmin@192.168.0.113:/data/master/gpseg-1
postgresql.conf 100% 23KB 13.8MB/s 00:00
[gpadmin@mdw gpseg-1]$ scp pg_hba.conf gpadmin@192.168.0.113:/data/master/gpseg-1
pg_hba.conf 100% 4956 4.1MB/s 00:00
[gpadmin@mdw gpseg-1]$
修改postgres.conf
cd /data/master/gpseg-1
vi postgresql.conf
#添加如下内容
gp_enable_gpperfmon=on
gpperfmon_port=8888
gp_external_enable_exec=on
gpperfmon_log_alert_level=warning
保存退出
gpscp -f /tmp/standby_seg_hosts /data/master/gpseg-1/postgresql.conf =/data/master/gpseg-1/postgresql.conf
五. 启动
gpadmin用户在master机器操作
#先刷新下配置pg_hba.conf
[gpadmin@mdw gpseg-1]$ gpstop -u
20220703:03:28:57:037778 gpstop:mdw:gpadmin-[INFO]:-Starting gpstop with args: -u
20220703:03:28:57:037778 gpstop:mdw:gpadmin-[INFO]:-Gathering information and validating the environment...
20220703:03:28:57:037778 gpstop:mdw:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20220703:03:28:57:037778 gpstop:mdw:gpadmin-[INFO]:-Obtaining Segment details from master...
20220703:03:28:57:037778 gpstop:mdw:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 6.18.2 build commit:1242aadf0137d3b26ee42c80e579e78bd7a805c7'
20220703:03:28:57:037778 gpstop:mdw:gpadmin-[INFO]:-Signalling all postmaster processes to reload
.
# 启动
[gpadmin@mdw gpseg-1]$ gpcc start
2022-07-03 03:29:00 Starting the gpcc agents and webserver...
2022-07-03 03:29:10 Agent successfully started on 4/4 hosts
2022-07-03 03:29:10 View Greenplum Command Center at http://mdw:28080
[gpadmin@mdw gpseg-1]$
# 访问
#将http://mdw:28080中的mdw替换成实际的ip地址,用浏览器打开
http://192.168.0.110:28080
gpadmin用户修改gpmon的密码
[gpadmin@mdw gpseg-1]$ psql
psql (9.4.24)
Type "help" for help.
gpdb=# alter user gpmon with password 'gpmon';
ALTER ROLE
gpdb=# \q
[gpadmin@mdw gpseg-1]$
设置密码文件
格式
hostname:port:database:username:password
[gpadmin@mdw gpseg-1]$ more /home/gpadmin/.pgpass
[gpadmin@mdw gpseg-1]$vi /home/gpadmin/.pgpass
将密码修改成
*:5432:gpperfmon:gpmon:gpmon
# 分发
gpscp -f /tmp/hostlist /home/gpadmin/.pgpass =~
用户名密码:gpmon/gpmon,登录
六. 补充
gpdb=# select * from pg_authid;
rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcatupdate | rolcanlogin | rolreplication | rolconnlimit | rolpassword | rolvaliduntil | rolresqueue | rol
createrextgpfd | rolcreaterexthttp | rolcreatewextgpfd | rolresgroup
---------------------+----------+------------+---------------+-------------+--------------+-------------+----------------+--------------+-------------------------------------+---------------+-------------+----
---------------+-------------------+-------------------+-------------
gpadmin | t | t | t | t | t | t | t | -1 | md5d115c26178447dc7986c5e67afcd710b | | 6055 | t
| t | t | 6438
gpcc_basic | f | t | f | f | f | f | f | -1 | | | 6055 | f
| f | f | 6437
gpcc_operator | f | t | f | f | f | f | f | -1 | | | 6055 | f
| f | f | 6437
gpcc_operator_basic | f | t | f | f | f | f | f | -1 | | | 6055 | f
| f | f | 6437
gpmon | t | t | f | t | t | t | f | -1 | md5271fed4320b7ac3aae3ac625420cf73f | | 6055 | f
| f | f | 6438
(5 rows)
gpdb=#
错误:password authentication failed for user “gpmon”
[gpadmin@mdw gpseg-1]$ gpcc stop
2022-07-03 10:40:58 Stopping the gpcc agents and webserver...
2022-07-03 10:40:58 pq: password authentication failed for user "gpmon"
[gpadmin@mdw gpseg-1]$
psql进入修改密码无效
解决:手动修改vi /home/gpadmin/.pgpass。下面命令生效
[gpadmin@mdw gpseg-1]$ gpcc stop
2022-07-03 10:55:34 Stopping the gpcc agents and webserver...
2022-07-03 10:55:35 GPCC webserver and metrics collection agents have been stopped. Use gpcc start to start them again
[gpadmin@mdw gpseg-1]$
[gpadmin@mdw gpseg-1]$ gpcc start
2022-07-03 10:56:31 Starting the gpcc agents and webserver...
2022-07-03 10:56:35 Agent successfully started on 4/4 hosts
2022-07-03 10:56:35 View Greenplum Command Center at http://mdw:28080
[gpadmin@mdw gpseg-1]$

浙公网安备 33010602011771号