一,安装web监控界面

  01,准备

  下载greenplum cc包,>>

  解压缩

  02,安装前配置

vim /greenplum/data/master/gpseg-/pg_hba.conf
local gpperfmon gpmon trust
host all gpmon 127.0.0.1/ trust
host all gpmon ::/ trust 配置 export PGDATA=/greenplum/data/master/gpseg-1/

  03,安装

./gpccinstall-4.1.1

GreenPlum 大数据平台--web监控-LMLPHP

缺少用户,执行以下命令

gpperfmon_install --enable --password 123456 --port 5432

然后继续执行安装命令

[gpadmin@greenplum01 greenplum-cc-web-4.6.-LINUX-x86_64]$ ./gpccinstall-4.6.
*** IMPORTANT INFORMATION - PLEASE READ CAREFULLY *** PIVOTAL GREENPLUM DATABASE END USER LICENSE AGREEMENT IMPORTANT - READ CAREFULLY: This Software contains computer programs and
other proprietary material and information, the use of which is subject to
and expressly conditioned upon acceptance of this End User License
Agreement ("EULA"). .................(慢慢点跳过)
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 agree to the Pivotal Greenplum Command Center End User License Agreement? Yy/Nn (Default=Y)
Y Where would you like to install Greenplum Command Center? (Default=/usr/local)
/home/gpadmin/greenplum-web Path not exist, create it? Yy/Nn (Default=Y)
y What would you like to name this installation of Greenplum Command Center? (Default=gpcc) What port would you like gpcc webserver to use? (Default=) Would you like to enable kerberos? Yy/Nn (Default=N) Would you like enable SSL? Yy/Nn (Default=N) Please choose a display language (Default=English)
. English
. Chinese // :: GPCC [version 4.6.] may not be fully compatible with GPDB [installed version 5.16].
Please reference the version compatibility in the GPCC documentation (gpcc.docs.pivotal.io/) Installation in progress...
// ::
Successfully installed Greenplum Command Center.
gpscp -h greenplum02 $MASTER_DATA_DIRECTORY/pg_hba.conf =:$MASTER_DATA_DIRECTORY/
gpscp -h greenplum02 ~/.pgpass =:~/

  04,查看

[gpadmin@greenplum01 greenplum-cc-web-4.6.-LINUX-x86_64]$ psql -d '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 | di
sk_wo_rate | disk_rb_rate | disk_wb_rate | net_rp_rate | net_wp_rate | net_rb_rate | net_wb_rate
-------+----------+-----------+----------+-----------------+-----------------+------------+-----------+------
--------+---------------+----------+---------+----------+-------+-------+-------+---------+--------------+---
-----------+--------------+--------------+-------------+-------------+-------------+-------------
( rows) [gpadmin@greenplum01 greenplum-cc-web-4.6.-LINUX-x86_64]$

二,配置环境变量

  01,所有机器:

.bash_profile里面添加

source /home/gpadmin/greenplum-web/greenplum-cc-web-4.6./gpcc_path.sh
然后
source .bashrc

  02,启动服务

gpcc start

添加允许客户端

host     all         gpmon        192.168.0.221/     md5

  03,访问

GreenPlum 大数据平台--web监控-LMLPHP

GreenPlum 大数据平台--web监控-LMLPHP

账号:gpmon 密码123456

GreenPlum 大数据平台--web监控-LMLPHP

 常用:

 

 gpstart 默认安装完成会自动开启,启动数据库

 gpstate{-f 查看standby状态} 查看数据库状态

 gpstop 关闭数据库

 psql -l 列出所有数据库

 gpstop -M fast 快速关闭

 gpstop –r 重启

 gpstop –u 重新加载配置文件

 createdb -p  -e -U gpadmin dbname 创建数据库

 gpconfig -c 参数名称 -v 参数值(若果master和segment不一样,name在后面指定-m master参数值) 批量修改系统配置文件参数
 alter role gpadmin with password '123456'; --户名创建密码

 select * from gp_segment_configuration; --查看segment配置

 select * from pg_filespace_entry; --查看文件系统

 \d+ <tablename> --查看表结构

 \dt --显示表

 \l --显示数据库

 \q 退出

  

05-03 21:32