Greenplum-cc-web监控软件安装

2024-02-22 22:58

本文主要是介绍Greenplum-cc-web监控软件安装,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

一环境列表

操作系统 centos6.5  64

Greenplum版本: greenplum-db-4.3.5.3-build-2-RHEL5-x86_64.tar

Greenplum集群环境搭建:参考http://blog.csdn.net/sunziyue/article/details/49026913

需求:在已经搭建的集群环境中安装Greenplum-cc-web

二操作步骤

1集群环境启动状态(在GreenplumMaster节点操作)

启动集群:

[gpadmin@master~]$su  - gpadmin

[gpadmin@master~]$source/usr/local/greenplum-db/greenplum_path.sh

[gpadmin@master~]$exportMASTER_DATA_DIRECTORY=/gpmaster/gpseg-1

[gpadmin@master~]$gpstart

[gpadmin@master~]$gpstate

2运行gpperfmon_install命令

[gpadmin@master~]$gpperfmon_install  --enable  --password 123456  --port 5432

[gpadmin@master1 ~]$ gpperfmon_install --enable --password 123456 --port 5432

20160302:19:02:21:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/./lib/gpperfmon/gpperfmon3.sql template1 >& /dev/null

20160302:19:02:29:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/./lib/gpperfmon/gpperfmon4.sql gpperfmon >& /dev/null

20160302:19:02:29:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/./lib/gpperfmon/gpperfmon41.sql gpperfmon >& /dev/null

20160302:19:02:32:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/./lib/gpperfmon/gpperfmon42.sql gpperfmon >& /dev/null

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/./lib/gpperfmon/gpperfmonC.sql template1 >& /dev/null

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 psql template1 -c "DROP ROLE IF EXISTS gpmon"  >& /dev/null

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 psql template1 -c "CREATE ROLE gpmon WITH SUPERUSER CREATEDB LOGIN ENCRYPTED PASSWORD '123456'"  >& /dev/null

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-echo "local    gpperfmon         gpmon         md5" >> /gpmaster/gpseg-1/pg_hba.conf

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-echo "host     all         gpmon         127.0.0.1/28    md5" >> /gpmaster/gpseg-1/pg_hba.conf

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-touch /home/gpadmin/.pgpass >& /dev/null

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-mv -f /home/gpadmin/.pgpass /home/gpadmin/.pgpass.1456974141 >& /dev/null

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-echo "*:5432:gpperfmon:gpmon:123456" >> /home/gpadmin/.pgpass

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-cat /home/gpadmin/.pgpass.1456974141 >> /home/gpadmin/.pgpass

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-chmod 0600 /home/gpadmin/.pgpass >& /dev/null

20160302:19:02:34:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 gpconfig -c gp_enable_gpperfmon -v on >& /dev/null

20160302:19:02:42:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 gpconfig -c gpperfmon_port -v 8888 >& /dev/null

20160302:19:02:48:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 gpconfig -c gp_external_enable_exec -v on --masteronly >& /dev/null

20160302:19:02:54:002810 gpperfmon_install:master1:gpadmin-[INFO]:-PGPORT=5432 gpconfig -c gpperfmon_log_alert_level -v warning >& /dev/null

20160302:19:02:59:002810 gpperfmon_install:master1:gpadmin-[INFO]:-gpperfmon will be enabled after a full restart of GPDB

 gpperfmon_install 做以下工作:

    创建greenplum监控用数据库(gpperfmon)

    创建greenplum监控用数据库角色(gpmon),后面登陆网页时使用

    配置greenplum数据库文件(pg_hba.conf和.pgpass)

    设置postgresql.conf文件,增加启用监控相关的参数。

3重启greenplum数据库

[gpadmin@master~]$ gpstop -r

[gpadmin@master~]$ ps -ef |grep gpmmon |grep -v grep

4查看数据收集是否正常

[gpadmin@master~]$psql  -d  gpperfmon -c 'SELECT * FROM system_now;'

如果有Standby Master节点

配置Greenplum Standby Master节点:

    在primarymaster上面执行:

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

[gpadmin@master~]$ scp $MASTER_DATA_DIRECTORY/pg_hba.conf

gpadmin@Standby:$MASTER_DATA_DIRECTORY/pg_hba.conf

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

[gpadmin@master~]$ scp ~/.pgpass  gpadmin@Standby:~/.pgpass

[gpadmin@master~]$ ssh  gpadmin@ Standby  -C  "chmod 0600 ~/.pgpass"

5安装GreenplumCommand Center Console

(1)下载greenplum-cc-web安装程序:greenplum-cc-web-1.3.0.2-build-14-RHEL5-x86_64 .zip

     解压至/home/gpadmin/,执行 ./greenplum-cc-web-1.3.0.2-build-14-RHEL5-x86_64.bin

********************************************************************************

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.2-build-14

********************************************************************************

/home/gpadmin/greenplum-cc-web-1.3.0.2-build-14

********************************************************************************

Install Greenplum Command Center into </home/gpadmin/greenplum-cc-web-1.3.0.2-build-14>? [yes | no]

********************************************************************************

yes

********************************************************************************

/home/gpadmin/greenplum-cc-web-1.3.0.2-build-14 does not exist.

Create /home/gpadmin/greenplum-cc-web-1.3.0.2-build-14 ? [ yes | no ]

(Selecting no will exit the installer)

********************************************************************************

yes

Extracting product to /home/gpadmin/greenplum-cc-web-1.3.0.2-build-14

********************************************************************************

Installation complete.

Greenplum Command Center is installed in /home/gpadmin/greenplum-cc-web-1.3.0.2-build-14

To complete the environment configuration, please ensure that the

gpcc_path.sh file is sourced.

********************************************************************************

(2) 将primary master的GP监控软件同时安装到到其他任何节点

[gpadmin@master~]$cd   /home/gpadmin   

[gpadmin@master~]$vi     hostname      

slave1

slave2

[gpadmin@master~]$source  /home/gpadmin/greenplum-cc-web/gpcc_path.sh

[gpadmin@master~]$gpccinstall -f hostname    //执行gpccinstall命令安装到其他节点

6设置CenterConsole(primary master节点操作)

(1)gpadmin用户,停止GP数据库

[gpadmin@master~]$gpstop

(2)启动GP数据库

[gpadmin@master~]source/usr/local/greenplum-db/greenplum_path.sh

[gpadmin@master~]exportMASTER_DATA_DIRECTORY=/gpmaster/gpseg-1

[gpadmin@master~]source /home/gpadmin/greenplum-cc-web/gpcc_path.sh

[gpadmin@master~]gpstart

(3)GP数据库实例起来后,用gpcmdr --setup命令设置Command Center Console:

[gpadmin@master~]gpcmdr --setup 

Please enter a new instance name:

> gpminsrtest  //gp监控实例名,用于启停监控时指定

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   //监控节点是否和GP master同节点,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:

> srtest   //GP监控页面显示的名字

What port does the Greenplum Database use? (default=5432):

> 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):

> 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):

> n

Do you want to copy the instance to a standby master host Yy|Nn (default=Y):

> n

Done writing lighttpd configuration to /home/gpadmin/greenplum-cc-web/./instances/gpminsrtest/conf/lighttpd.conf

Done writing web UI configuration to /home/gpadmin/greenplum-cc-web/./instances/gpminsrtest/conf/gpperfmonui.conf

Done writing web UI clustrs configuration to /home/gpadmin/greenplum-cc-web/./instances/gpminsrtest/conf/clusters.conf

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 /home/gpadmin/greenplum-cc-web/./instances/gpminsrtest/conf/gpperfmonui.conf.

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

You can now start the web UI for this instance by running: gpcmdr --start gpminsrtest

No instances

(4)启动GP监控

[gpadmin@master~]gpcmdr --start  gpminsrtest

Starting instance gpminsrtest...

Greenplum Command Center UI for instance 'gpminsrtest' - [RUNNING on PORT:  28080]

[gpadmin@master~]lsof -i :28080    //查看端口状态

7使用浏览器访问http://master1:28080

用户名密码:gpmon/123456


这篇关于Greenplum-cc-web监控软件安装的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/736754

相关文章

python安装whl包并解决依赖关系的实现

《python安装whl包并解决依赖关系的实现》本文主要介绍了python安装whl包并解决依赖关系的实现,文中通过图文示例介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面... 目录一、什么是whl文件?二、我们为什么需要使用whl文件来安装python库?三、我们应该去哪儿下

MySQL安装时initializing database失败的问题解决

《MySQL安装时initializingdatabase失败的问题解决》本文主要介绍了MySQL安装时initializingdatabase失败的问题解决,文中通过图文介绍的非常详细,对大家的学... 目录问题页面:解决方法:问题页面:解决方法:1.勾选红框中的选项:2.将下图红框中全部改为英

MySQL9.0默认路径安装下重置root密码

《MySQL9.0默认路径安装下重置root密码》本文主要介绍了MySQL9.0默认路径安装下重置root密码,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们... 目录问题描述环境描述解决方法正常模式下修改密码报错原因问题描述mysqlChina编程采用默认安装路径,

Python使用国内镜像加速pip安装的方法讲解

《Python使用国内镜像加速pip安装的方法讲解》在Python开发中,pip是一个非常重要的工具,用于安装和管理Python的第三方库,然而,在国内使用pip安装依赖时,往往会因为网络问题而导致速... 目录一、pip 工具简介1. 什么是 pip?2. 什么是 -i 参数?二、国内镜像源的选择三、如何

Linux使用nload监控网络流量的方法

《Linux使用nload监控网络流量的方法》Linux中的nload命令是一个用于实时监控网络流量的工具,它提供了传入和传出流量的可视化表示,帮助用户一目了然地了解网络活动,本文给大家介绍了Linu... 目录简介安装示例用法基础用法指定网络接口限制显示特定流量类型指定刷新率设置流量速率的显示单位监控多个

Python安装时常见报错以及解决方案

《Python安装时常见报错以及解决方案》:本文主要介绍在安装Python、配置环境变量、使用pip以及运行Python脚本时常见的错误及其解决方案,文中介绍的非常详细,需要的朋友可以参考下... 目录一、安装 python 时常见报错及解决方案(一)安装包下载失败(二)权限不足二、配置环境变量时常见报错及

解决JavaWeb-file.isDirectory()遇到的坑问题

《解决JavaWeb-file.isDirectory()遇到的坑问题》JavaWeb开发中,使用`file.isDirectory()`判断路径是否为文件夹时,需要特别注意:该方法只能判断已存在的文... 目录Jahttp://www.chinasem.cnvaWeb-file.isDirectory()遇

JavaWeb-WebSocket浏览器服务器双向通信方式

《JavaWeb-WebSocket浏览器服务器双向通信方式》文章介绍了WebSocket协议的工作原理和应用场景,包括与HTTP的对比,接着,详细介绍了如何在Java中使用WebSocket,包括配... 目录一、概述二、入门2.1 POM依赖2.2 编写配置类2.3 编写WebSocket服务2.4 浏

MySQL8.2.0安装教程分享

《MySQL8.2.0安装教程分享》这篇文章详细介绍了如何在Windows系统上安装MySQL数据库软件,包括下载、安装、配置和设置环境变量的步骤... 目录mysql的安装图文1.python访问网址2javascript.点击3.进入Downloads向下滑动4.选择Community Server5.

CentOS系统Maven安装教程分享

《CentOS系统Maven安装教程分享》本文介绍了如何在CentOS系统中安装Maven,并提供了一个简单的实际应用案例,安装Maven需要先安装Java和设置环境变量,Maven可以自动管理项目的... 目录准备工作下载并安装Maven常见问题及解决方法实际应用案例总结Maven是一个流行的项目管理工具