安装GP CCC(Greenplum Command Center Console)

gpperfmon_install执行完成后,创建了gpperfmon数据库、gpmon超级用户;下面正式进入Greenplum Command Center Console安装;

1.      下载、解压缩软件

unzip greenplum-cc-web-versionx.x-PLATFORM.zip

2.       登录gpadmin,安装

$ /bin/bash greenplum-cc-web-versionx.x-PLATFORM.bin

默认安装在/usr/local,通常gpadmin没有权限;解决方法是使用root用户安装,安装完成后,通过chown,chmod命令获得相应权限;

$ chown -R gpadmin:gpadmin greenplum-cc-web-versionx.x

$ chmod -R 755 greenplum-cc-web-versionx.x

3.       设置gpadmin的环境变量

$ source /usr/local/greenplum-db/greenplum_path.sh

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

4.       在GPDB所有主机上安装CC

$ gpccinstall -f hostfilename

5.       设置gpadmin环境变量,~/.bashrc 或者~/.bash_profile

GPPERFMONHOME=/usr/local/greenplum-cc-web-versionx.x

source $GPPERFMONHOME/gpcc_path.sh

6.       设置CC实例

$ gpcmdr --setup

Gpcmdr设置了CCC实例名、实例显示名称、CCCweb服务器端口号(默认为28080)、ssl、ipv6、standby设置等等;

7.       启动CC实例

gpcmdr --start "instance_name"

8.       登录GP CCC

https://master_host_name:28080/

操作实例:

  • 执行安装
[root@gp1 ~]# ./greenplum-cc-web-1.3.0.0-build-91-RHEL5-x86_64.bin 
。。。。
。。。。 一堆协议内容已省略
Rev: Pivotal_GPDB_EULA_03182014.txt

I HAVE READ AND AGREE TO THE TERMS OF THE ABOVE PIVOTAL GREENPLUM DATABASE
END USER LICENSE AGREEMENT.

********************************************************************************
Do you accept the Pivotal Greenplum Database end user license
agreement? [yes | no]
********************************************************************************
yes
********************************************************************************
Provide the installation path for Greenplum Command Center or 
press ENTER to accept the default installation path: /usr/local/greenplum-cc-web-1.3.0.0-build-91
********************************************************************************

********************************************************************************
Install Greenplum Command Center into ? [yes | no]
********************************************************************************
yes
********************************************************************************
/usr/local/greenplum-cc-web-1.3.0.0-build-91 does not exist.
Create /usr/local/greenplum-cc-web-1.3.0.0-build-91 ? [ yes | no ]
(Selecting no will exit the installer)
********************************************************************************
yes
Extracting product to /usr/local/greenplum-cc-web-1.3.0.0-build-91
********************************************************************************
Installation complete.
Greenplum Command Center is installed in /usr/local/greenplum-cc-web-1.3.0.0-build-91

To complete the environment configuration, please ensure that the
gpcc_path.sh file is sourced.
********************************************************************************
  • 手动更改属主与权限
[root@gp1 local]# chown -R gpadmin:gpadmin greenplum-cc-web-1.3.0.0-build-91/
[root@gp1 local]# chown -R gpadmin:gpadmin greenplum-cc-web
  • 设置环境变量
[root@gp1 ~]# source /usr/local/greenplum-cc-web/gpcc_path.sh
  • 在所有主机上安装CC
[root@gp1 ~]# gpccinstall -f /home/gpadmin/all_hosts_uniq 
20150831:11:29:29:020093 gpccinstall:gp1:root-[INFO]:-Installation Info:
link_name greenplum-cc-web
binary_path /usr/local/greenplum-cc-web-1.3.0.0-build-91
binary_dir_location /usr/local
binary_dir_name greenplum-cc-web-1.3.0.0-build-91
rm -f /usr/local/greenplum-cc-web-1.3.0.0-build-91.tar; rm -f /usr/local/greenplum-cc-web-1.3.0.0-build-91.tar.gz
cd /usr/local; tar cf greenplum-cc-web-1.3.0.0-build-91.tar greenplum-cc-web-1.3.0.0-build-91
gzip /usr/local/greenplum-cc-web-1.3.0.0-build-91.tar
20150831:11:29:30:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp1): mkdir -p /usr/local
20150831:11:29:30:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp2): mkdir -p /usr/local
20150831:11:29:30:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp3): mkdir -p /usr/local
20150831:11:29:31:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp1): rm -rf /usr/local/greenplum-cc-web-1.3.0.0-build-91
20150831:11:29:31:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp2): rm -rf /usr/local/greenplum-cc-web-1.3.0.0-build-91
20150831:11:29:31:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp3): rm -rf /usr/local/greenplum-cc-web-1.3.0.0-build-91
20150831:11:29:31:020093 gpccinstall:gp1:root-[INFO]:-scp software to remote location
20150831:11:29:32:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp1): gzip -f -d /usr/local/greenplum-cc-web-1.3.0.0-build-91.tar.gz
20150831:11:29:32:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp2): gzip -f -d /usr/local/greenplum-cc-web-1.3.0.0-build-91.tar.gz
20150831:11:29:32:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp3): gzip -f -d /usr/local/greenplum-cc-web-1.3.0.0-build-91.tar.gz
20150831:11:29:33:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp1): cd /usr/local; tar xf greenplum-cc-web-1.3.0.0-build-91.tar
20150831:11:29:33:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp2): cd /usr/local; tar xf greenplum-cc-web-1.3.0.0-build-91.tar
20150831:11:29:33:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp3): cd /usr/local; tar xf greenplum-cc-web-1.3.0.0-build-91.tar
20150831:11:29:33:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp1): rm -f /usr/local/greenplum-cc-web-1.3.0.0-build-91.tar
20150831:11:29:33:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp2): rm -f /usr/local/greenplum-cc-web-1.3.0.0-build-91.tar
20150831:11:29:33:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp3): rm -f /usr/local/greenplum-cc-web-1.3.0.0-build-91.tar
20150831:11:29:34:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp1): cd /usr/local; rm -f greenplum-cc-web; ln -fs greenplum-cc-web-1.3.0.0-build-91 greenplum-cc-web
20150831:11:29:34:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp2): cd /usr/local; rm -f greenplum-cc-web; ln -fs greenplum-cc-web-1.3.0.0-build-91 greenplum-cc-web
20150831:11:29:34:020093 gpccinstall:gp1:root-[INFO]:-runPoolCommand on (gp3): cd /usr/local; rm -f greenplum-cc-web; ln -fs greenplum-cc-web-1.3.0.0-build-91 greenplum-cc-web
20150831:11:29:34:020093 gpccinstall:gp1:root-[INFO]:-Verifying installed software versions
20150831:11:29:35:020093 gpccinstall:gp1:root-[INFO]:-remote command: . /usr/local/greenplum-cc-web/./gpcc_path.sh; /usr/local/greenplum-cc-web/./bin/gpcmdr --version
20150831:11:29:38:020093 gpccinstall:gp1:root-[INFO]:-remote command: . /usr/local/greenplum-cc-web-1.3.0.0-build-91/gpcc_path.sh; /usr/local/greenplum-cc-web-1.3.0.0-build-91/bin/gpcmdr --version
20150831:11:29:43:020093 gpccinstall:gp1:root-[INFO]:-SUCCESS -- Requested commands completed
  • 执行gpcmdr,配置
[root@gp1 ~]# su - gpadmin
[gpadmin@gp1 ~]$ 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:
> gpcc
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:
> gpcc
What port does the Greenplum Database use? (default=5432):

Creating instance schema in GPDB.  Please wait ...
ERROR:  relation "gp_toolkit.__gp_log_master_ext" does not exist
CONTEXT:  SQL statement "CREATE EXTERNAL WEB TABLE public.gp_log_master_ext (LIKE gp_toolkit.__gp_log_master_ext) EXECUTE E'find $GP_SEG_DATADIR/pg_log/ -name "gpdb*.csv" | sort -r | head -n 2 | xargs cat' ON MASTER FORMAT 'csv' (delimiter E',' null E'' escape E'"' quote E'"') ENCODING 'UTF8'"
PL/pgSQL function "create_master_log_tbl" line 5 at SQL statement


Error: instance gpcc localhost 5432 not fully installed. Failed to setup tmp_schema

报错为 ERROR:  relation "gp_toolkit.__gp_log_master_ext" does not exist,数据库gppfermon中gp_toolkit schema中无内容,可能是template0,1中的gp_toolkit内容丢失;没办法,手动补:
psql -f  $GPHOME/share/postgresql/gp_toolkit.sql gpperfmon
[gpadmin@gp1 greenplum-cc-web]$ psql -f  $GPHOME/share/postgresql/gp_toolkit.sql gpperfmon
BEGIN
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE EXTERNAL TABLE
GRANT
CREATE EXTERNAL TABLE
GRANT
CREATE VIEW
GRANT
CREATE EXTERNAL TABLE
psql:/usr/local/greenplum-db/./share/postgresql/gp_toolkit.sql:270: NOTICE:  no privileges could be revoked from role PUBLIC on object __gp_log_segment_ext
REVOKE
CREATE EXTERNAL TABLE
psql:/usr/local/greenplum-db/./share/postgresql/gp_toolkit.sql:317: NOTICE:  no privileges could be revoked from role PUBLIC on object __gp_log_master_ext
REVOKE
CREATE VIEW
psql:/usr/local/greenplum-db/./share/postgresql/gp_toolkit.sql:335: NOTICE:  no privileges could be revoked from role PUBLIC on object gp_log_system
REVOKE
CREATE VIEW
psql:/usr/local/greenplum-db/./share/postgresql/gp_toolkit.sql:352: NOTICE:  no privileges could be revoked from role PUBLIC on object gp_log_database
REVOKE
CREATE VIEW
psql:/usr/local/greenplum-db/./share/postgresql/gp_toolkit.sql:399: NOTICE:  no privileges could be revoked from role PUBLIC on object gp_log_master_concise
REVOKE
CREATE VIEW
psql:/usr/local/greenplum-db/./share/postgresql/gp_toolkit.sql:430: NOTICE:  no privileges could be revoked from role PUBLIC on object gp_log_command_timings
REVOKE
CREATE TYPE
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE TYPE
CREATE FUNCTION
GRANT
CREATE TYPE
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE VIEW
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE EXTERNAL TABLE
CREATE VIEW
GRANT
CREATE FUNCTION
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
psql:/usr/local/greenplum-db/./share/postgresql/gp_toolkit.sql:1528: NOTICE:  no privileges could be revoked from role PUBLIC on object gp_size_of_table_uncompressed
REVOKE
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
psql:/usr/local/greenplum-db/./share/postgresql/gp_toolkit.sql:1680: NOTICE:  no privileges could be revoked from role PUBLIC on object gp_size_of_table_and_indexes_licensing
REVOKE
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE FUNCTION
GRANT
CREATE TYPE
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE VIEW
GRANT
CREATE FUNCTION
REVOKE
CREATE FUNCTION
REVOKE
CREATE FUNCTION
REVOKE
COMMIT

再次执行gpcmdr --setup,
[gpadmin@gp1 greenplum-cc-web]$ 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:
> gpcc1
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:
> gpcc1
What port does the Greenplum Database use? (default=5432):

Creating instance schema in GPDB.  Please wait ...
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):
> n

Do you want to enable ipV6 for the Web API Yy|Nn (default=N):
> 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):

What is the hostname of the standby master host? [smdw]: 

Done writing lighttpd configuration to /usr/local/greenplum-cc-web/./instances/gpcc1/conf/lighttpd.conf

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

Copying instance 'gpcc1' to host 'smdw'...

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/gpcc1/conf/gpperfmonui.conf.

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

You can now start the web UI for this instance by running: gpcmdr --start gpcc1
No instances
  • 启动实例
[gpadmin@gp1 greenplum-cc-web]$ gpcmdr --start gpcc1
Starting instance gpcc1...
Greenplum Command Center UI for instance 'gpcc1' - [RUNNING on PORT:  28080]
登录:
http://gp1:28080/





来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16976507/viewspace-1787566/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/16976507/viewspace-1787566/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值