一、 本安裝手冊描述適用於Greenplum4.0以上版本的安裝Greenplum-cc-web操做git
針對Greenplum版本下載對應Greenplum-cc-web包體greenplum-cc-web-x.x.x-LINUX-x86_64.zip;
下載地址: https://network.pivotal.io/products/pivotal-gpdb#/releases/1683/file_groups/26nNum=10web
gpadmin用戶執行以下步驟【僅在master節點】。
3.一、使用gpperfmon_install命令,sql
Greenplum安裝完成後已經包含該命令。安裝後會創建名爲gpperfmon的數據庫,默認使用gpmon用戶。命令行中系統用戶gpmon的密碼。數據庫
[gpadmin@mdw ~]$ gpperfmon_install --enable --password gpmon --port 5432
3.二、重啓GP數據庫bash
[gpadmin@mdw ~]$ gpstop -r
3.三、確認監控採集進程是否已經啓動。服務器
[gpadmin@mdw ~]$ ps -ef |grep gpmmon gpadmin 2285 2276 0 22:04 ? 00:00:00 /gpdb/app/bin/gpmmon -D /data/gpdata/master/gpseg-1/gpperfmon/conf/gpperfmon.conf -p 5432
3.四、確認Performance Monitor數據庫寫入數據是否正常,檢查是否有記錄寫入。app
psql -d gpperfmon -c 'select * from system_now;'
3.五、拷貝Master主機拷貝配置文件到Standby Master的相應目錄【本例未設置smdw;則無需操做】ide
gpscp -h smdw $MASTER_DATA_DIRECTORY/pg_hba.conf =:$MASTER_DATA_DIRECTORY/
gpscp -h smdw ~/.pgpass =:~/
Performance Monitor控制檯一般安裝在Master主機上,也能夠安裝到獨立的服務器上。因爲安裝目錄權限問題,建議先使用root用戶執行。【僅在master節點】
4.一、下載對應的安裝包
查看Greenplum版本;測試
[gpadmin@mdw ~]$ gpstate -s | awk '/Greenplum Version/{print $8}'|awk 'NR==1' 4.3.8.1
其中greenplum-cc-web-3.3.1-LINUX-x86_64.zip是與之對應的
4.二、運行安裝包
安裝包解壓:this
[root@mdw gpdb]# unzip greenplum-cc-web-3.3.1-LINUX-x86_64.zip
運行安裝文件:
[root@mdw gpdb]# ./greenplum-cc-web-3.3.1-LINUX-x86_64.bin I HAVE READ AND AGREE TO THE TERMS OF THE ABOVE PIVOTAL GREENPLUM DATABASE END USER LICENSE AGREEMENT. 必須輸入YES纔可繼續安裝。 ******************************************************************************** Do you accept the Pivotal Greenplum Database end user license agreement? [yes | no] ******************************************************************************** yes 默認GPDB的安裝路徑爲/usr/local/greenplum-cc-web-**,確認須要輸入YES,若是須要安裝到其餘路徑,直接輸入要按照的路徑便可 ******************************************************************************** Provide the installation path for Greenplum Command Center or press ENTER to accept the default installation path: /usr/local/greenplum-cc-web-3.3.1 ******************************************************************************** /gpdb/greenplum-cc-web ******************************************************************************** Install Greenplum Command Center into </gpdb/greenplum-cc-web>? [yes | no] ******************************************************************************** yes ******************************************************************************** /gpdb/greenplum-cc-web does not exist. Create /gpdb/greenplum-cc-web ? [ yes | no ] (Selecting no will exit the installer) ******************************************************************************** yes Extracting product to /gpdb/greenplum-cc-web rm: cannot remove `/gpdb/greenplum-cc-web': Is a directory ******************************************************************************** Installation complete. Greenplum Command Center is installed in /gpdb/greenplum-cc-web - symlink created at /gpdb/greenplum-cc-web to install path Please ensure this installation's gpcc_path.sh file is sourced. (If /gpdb/greenplum-cc-web/gpcc_path.sh is sourced, this is already done.) To migrate existing GPCC instances to this version, run: gpcmdr --migrate To create new GPCC instances, run: gpcmdr --setup ********************************************************************************
固然也能夠先前建立安裝目錄/gpdb/greenplum-cc-web;現已成功安裝greenplum-cc-web。
4.3 Monitor安裝目錄屬主修改:
[root@mdw gpdb]# chown -R gpadmin:gpadmin /gpdb/greenplum-cc-web
4.四、修改Master主機gpadmin的.bashrc配置,增長
source /gpdb/greenplum-cc-web/gpcc_path.sh
4.五、將master的GP監控軟件同時安裝到到其餘任何主機
[gpadmin@mdw ~]$ source .bashrc
[gpadmin@mdw ~]$ gpccinstall -f /gpdb/app/config/seg_host
4.六、修改其它主機gpadmin的.bashrc配置,增長
source /gpdb/greenplum-cc-web/gpcc_path.sh
4.七、 配置gpcc實例
[gpadmin@mdw ~]$ gpcmdr --setup The instance name identifies the GPDB cluster this Greenplum Command Center web UI monitors and controls. Instance names can contain letters, digits, and underscores and are not case sensitive. Please enter the instance name gp_lottu The display name is shown as the "server" in the web interface and does not need to be a hostname.Display names can contain letters, digits, and underscores and ARE case sensitive. Please enter the display name for this instance:(Press ENTER to use instance name) gp_cc_lottu A GPCC instance can be set to manage and monitor a remote Greenplum Database. Is the master host for the Greenplum Database remote? Yy/Nn (default=N) n What port does the Greenplum Database use? (default=5432) Enable kerberos login for this instance? Yy/Nn (default=N) 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 new 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. Enable SSL for the Web API Yy/Nn (default=N) n Copy the instance to a standby master host Yy/Nn (default=Y) n Done writing webserver configuration to /gpdb/greenplum-cc-web/instances/gp_lottu/webserver/conf/app.conf Creating instance at /gpdb/greenplum-cc-web/instances/gp_lottu Greenplum Command Center UI configuration is now complete. To change parameters of this instance, edit the configuration file at /gpdb/greenplum-cc-web/instances/gp_lottu/webserver/conf/app.conf To configure multi-cluster view, edit the configuration file at /gpdb/greenplum-cc-web/instances/gp_lottu/conf/clusters.conf The web UI for this instance is located at http://mdw:28080 You can now start the web UI for this instance by running: gpcmdr --start gp_lottu
4.八、啓動服務
[gpadmin@mdw ~]$ gpcmdr --start gp_lottu Starting instance gp_lottu ... Greenplum Command Center UI for instance 'gp_lottu' - [RUNNING on PORT: 28080, pid 9105]
4.九、測試Performance Monitor前臺鏈接
打開IE輸入Performance Monitor控制檯地址:http://192.168.1.201:28080/