【GP】greenplum监控软件Greenplum-cc-web的安装

1 基本准备

  1. 在GreenplumMaster节点操作:
  2.    
  3.    1) 使用gpadmin用户登录
  4.     linux116:~# su - gpadmin
  5.    
  6.    2) 执行 gpperfmon_install 命令
  7.    gpadmin@linux116:~> gpperfmon_install--enable --password 1qaz2wsx --port 5432
  8. 命令执行后,会创建gpmon角色,以及设置了密码,这个用户可以登录到数据库里面,也可用于登录页面。
  9.      3) 重启greenplum 数据库

       gpadmin@linux116:~> gpstop -r

       

       4) 查看gpmon进程,是否已经启用

       gpadmin@linux116:~> ps -ef | grep gpmmon |grep -v grep

       gpadmin  27036 27027  0 16:18 ?        00:00:00/usr/local/greenplum-db/bin/gpmmon -D /data/master/gpseg-1/gpperfmon/conf/gpperfmon.conf-p 5432

     

       5) 查看数据收集进程是否正常(需要等大约30s左右才可以查看到)

       gpadmin@linux116:~> psql 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

       ---------------------+----------+-------------+-------------+-----------------+-----------------+-------------+-----------+--------------+---------------+----------+---------+----

       ------+-------+-------+-------+---------+--------------+--------------+--------------+--------------+-------------+-------------+-------------+-------------

        2014-05-19 16:21:30 | linux113| 25202618368 | 21777362944 |     7865163776 |     17337454592|  2154979328 |  23846912 |            0 |             0 |     1.68 |   1.89 |   

       96.18 |  0.07 |  0.08 | 0.09 |      15 |            0 |           13 |            0 |       135518 |          13 |          15 |        1776 |        2110

        2014-05-19 16:21:30 | linux116| 25202618368 | 17788657664 |     2744700928 |     22457917440|  2154979328 |  22982656 |            0 |             0 |     0.71 |   0.22 |   

       98.56 |   0.1 |  0.16 | 0.06 |      15 |            0 |            7 |            0 |        84269 |          51 |          54 |       11435 |       32212

        2014-05-19 16:21:30 | NOAS252  | 50609725440 | 40639737856 |      9263038464 |     41346686976 | 25777983488 |         0 |            0 |             0 |     1.61 |   1.84 |   

       96.32 |  0.39 |  0.42 | 0.36 |      15 |            0 |           46 |            0 |       454920 |          80 |          75 |      204981 |      183732

       (3 rows)

       

    下面配置GreenplumStandby Master节点:

        在primarymaster上面执行:

       1) 将primary master上面的$MASTER_DATA_DIRECTORY/pg_hba.conf拷贝到standby master的$MASTER_DATA_DIRECTORY/pg_hba.conf

       gpadmin@linux116:~> scp $MASTER_DATA_DIRECTORY/pg_hba.confgpadmin@linux113:$MASTER_DATA_DIRECTORY/pg_hba.conf

       

       2) 将primary master上面的~/.pgpass拷贝到standby master的~/.pgpass,并且文件权限修改为0600

       gpadmin@linux116:~> scp ~/.pgpass gpadmin@linux113:~/.pgpass

       gpadmin@linux116:~> ssh gpadmin@linux113 -C "chmod 0600~/.pgpass"


2  下载安装

  1. 1、下载地址:

  2. 官网下载:https://network.pivotal.io/products/pivotal-gpdb#/releases/1533/file_groups/26

  3. 云盘下载:http://pan.baidu.com/s/1hqZU72W

  4. 2、解压安装:

  5. 这里我以greenplum-cc-web-2.0.0为例:
  6. $ unzip greenplum-cc-web-2.0.0-build-32-RHEL5-x86_64.zip
  7. $ ./greenplum-cc-web-2.0.0-build-32-RHEL5-x86_64.bin
  8. 注:因为默认安装路径是/usr/local,避免权限问题,可以先用root安装,再修改成gpadmin访问权限

  9. 安装过程中可根据提示作出自己的选择和修改,首先得接受pivotal的协议。
 

   3、使环境变量生效,执行source:
  $ source /usr/local/greenplum-cc-web/gpcc_path.sh


  4 
添加 GPPERFMONHOME 环境变量到gpadmin的~/.bashrc:
      GPPERFMONHOME=/usr/local/greenplum-cc-web-2.0.0-build-32
source $GPPERFMONHOME/gpcc_path.sh
  5.生效:
     source ./bashrc

  6.执行 gpccinstall 命令安装 Command Center 到所有的主机上:
   [root@RZ-PROD-DB-G7-02 dbbak]# gpccinstall -f all_hosts

?

 3 开始安装

  1. 以下是我的设置,可以根据自己的实际情况设置:
  2. [gpadmin@mdw ~]$ gpcmdr --setup
  3.  
  4. An instance name is used by the Greenplum Command Center as
  5. a way to uniquely identify a Greenplum Database that has the monitoring
  6. components installed and configured. This name is also used to control
  7. specific instances of the Greenplum Command Center web UI. Instance names
  8. can contain letters, digits and underscores and are not case sensitive.
  9.  
  10. Please enter a new instance name:
  11. > gpmon
  12. The web component of the Greenplum Command Center can connect to a
  13. monitor database on a remote Greenplum Database.
  14.  
  15.  
  16. Is the master host for the Greenplum Database remote? Yy|Nn (default=N):
  17. > n
  18. The display name is shown in the web interface and does not need to be
  19. a hostname.
  20.  
  21.  
  22. What would you like to use for the display name for this instance:
  23. > linux1024
  24. What port does the Greenplum Database use? (default=5432):
  25. >
  26. Creating instance schema in GPDB. Please wait ...
  27. The display name is shown in the web interface and does not need to be
  28. a hostname.
  29.  
  30.  
  31.  
  32. Would you like to install workload manager? Yy|Nn (default=N):
  33. > n
  34. Skipping installation of workload manager.
  35. The Greenplum Command Center runs a small web server for the UI and web API.
  36. This web server by default runs on port 28080, but you may specify any available port.
  37.  
  38. What port would you like the web server to use for this instance? (default=28080):
  39. >
  40. Users logging in to the Command Center must provide database user
  41. credentials. In order to protect user names and passwords, it is recommended
  42. that SSL be enabled.
  43.  
  44.  
  45. Do you want to enable SSL for the Web API Yy|Nn (default=N):
  46. >
  47.  
  48. Do you want to enable ipV6 for the Web API Yy|Nn (default=N):
  49. >
  50.  
  51. Do you want to enable Cross Site Request Forgery Protection for the Web API Yy|Nn (default=N):
  52. >
  53.  
  54. Do you want to copy the instance to a standby master host Yy|Nn (default=Y):
  55. > n
  56.  
  57. Done writing lighttpd configuration to /usr/local/greenplum-cc-web/./instances/gpmon/conf/lighttpd.conf
  58. Done writing web UI configuration to /usr/local/greenplum-cc-web/./instances/gpmon/conf/gpperfmonui.conf
  59. Done writing web UI clustrs configuration to /usr/local/greenplum-cc-web/./instances/gpmon/conf/clusters.conf
  60.  
  61. Greenplum Command Center UI configuration is now complete. If
  62. at a later date you want to change certain parameters, you can
  63. either re-run 'gpcmdr --setup' or edit the configuration file
  64. located at /usr/local/greenplum-cc-web/./instances/gpmon/conf/gpperfmonui.conf.
  65.  
  66. The web UI for this instance is available at http://mdw:28080/
  67.  
  68. You can now start the web UI for this instance by running: gpcmdr --start gpmon   安装完后启动!
  69. No instances  

  1. 期间你可能会遇到报错:FATAL: no pg_hba.conf entry for host "::1"
    1. 解决办法:
    2. 在pg_hba.conf中添加:    
    3. host all all ::1/128 trust




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

转载于:http://blog.itpub.net/29096438/viewspace-2144641/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值