安裝GP CCC(Greenplum Command Center Console)

panpong發表於2015-08-31

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使用者安裝,安裝完成後,透過chownchmod命令獲得相應許可權;

$ 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)、sslipv6standby設定等等;

7.       啟動CC例項

gpcmdr --start "instance_name"

8.       登入GP CCC

/>
操作例項:

  • 執行安裝
[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 />
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]
登入:
/>




來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/16976507/viewspace-1787566/,如需轉載,請註明出處,否則將追究法律責任。

相關文章