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

相关文章

RabbitMQ 延时队列插件安装与使用示例详解(基于 Delayed Message Plugin)

《RabbitMQ延时队列插件安装与使用示例详解(基于DelayedMessagePlugin)》本文详解RabbitMQ通过安装rabbitmq_delayed_message_exchan... 目录 一、什么是 RabbitMQ 延时队列? 二、安装前准备✅ RabbitMQ 环境要求 三、安装延时队

Web服务器-Nginx-高并发问题

《Web服务器-Nginx-高并发问题》Nginx通过事件驱动、I/O多路复用和异步非阻塞技术高效处理高并发,结合动静分离和限流策略,提升性能与稳定性... 目录前言一、架构1. 原生多进程架构2. 事件驱动模型3. IO多路复用4. 异步非阻塞 I/O5. Nginx高并发配置实战二、动静分离1. 职责2

linux系统上安装JDK8全过程

《linux系统上安装JDK8全过程》文章介绍安装JDK的必要性及Linux下JDK8的安装步骤,包括卸载旧版本、下载解压、配置环境变量等,强调开发需JDK,运行可选JRE,现JDK已集成JRE... 目录为什么要安装jdk?1.查看linux系统是否有自带的jdk:2.下载jdk压缩包2.解压3.配置环境

SpringBoot通过main方法启动web项目实践

《SpringBoot通过main方法启动web项目实践》SpringBoot通过SpringApplication.run()启动Web项目,自动推断应用类型,加载初始化器与监听器,配置Spring... 目录1. 启动入口:SpringApplication.run()2. SpringApplicat

springboot2.1.3 hystrix集成及hystrix-dashboard监控详解

《springboot2.1.3hystrix集成及hystrix-dashboard监控详解》Hystrix是Netflix开源的微服务容错工具,通过线程池隔离和熔断机制防止服务崩溃,支持降级、监... 目录Hystrix是Netflix开源技术www.chinasem.cn栈中的又一员猛将Hystrix熔

Python库 Django 的简介、安装、用法入门教程

《Python库Django的简介、安装、用法入门教程》Django是Python最流行的Web框架之一,它帮助开发者快速、高效地构建功能强大的Web应用程序,接下来我们将从简介、安装到用法详解,... 目录一、Django 简介 二、Django 的安装教程 1. 创建虚拟环境2. 安装Django三、创

linux安装、更新、卸载anaconda实践

《linux安装、更新、卸载anaconda实践》Anaconda是基于conda的科学计算环境,集成1400+包及依赖,安装需下载脚本、接受协议、设置路径、配置环境变量,更新与卸载通过conda命令... 目录随意找一个目录下载安装脚本检查许可证协议,ENTER就可以安装完毕之后激活anaconda安装更

Jenkins的安装与简单配置过程

《Jenkins的安装与简单配置过程》本文简述Jenkins在CentOS7.3上安装流程,包括Java环境配置、RPM包安装、修改JENKINS_HOME路径及权限、启动服务、插件安装与系统管理设置... 目录www.chinasem.cnJenkins安装访问并配置JenkinsJenkins配置邮件通知

Win10安装Maven与环境变量配置过程

《Win10安装Maven与环境变量配置过程》本文介绍Maven的安装与配置方法,涵盖下载、环境变量设置、本地仓库及镜像配置,指导如何在IDEA中正确配置Maven,适用于Java及其他语言项目的构建... 目录Maven 是什么?一、下载二、安装三、配置环境四、验证测试五、配置本地仓库六、配置国内镜像地址

Python安装Pandas库的两种方法

《Python安装Pandas库的两种方法》本文介绍了三种安装PythonPandas库的方法,通过cmd命令行安装并解决版本冲突,手动下载whl文件安装,更换国内镜像源加速下载,最后建议用pipli... 目录方法一:cmd命令行执行pip install pandas方法二:找到pandas下载库,然后