Hadoop生态圈-Ganglia监控部署
Hadoop生态圈-Ganglia监控部署
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
Ganglia是一个轻量级的应用,部署方式相比zabbix部署要简单的多,安装完毕后并启动服务,服务端就可以直接监控客户端。Ganglia不需要像Nagios,Cacti或是Zabbix那样安装数据库服务。Zabbix和Cacti以及Nagios安装完毕需要手动在web界面进行配置才可以监控到客户端的基本信息,而这些对于Ganglia来说,都不需要用户手动进行配置,安装完毕只需要启动服务就可以实时监控了客户端的基本信息了。具体安装步骤,我已经做好图解和注释了。注意,本篇博客部署方式是建立在高可用集群的基础上部署的Sqoop,关于高可用集群部署请参考:https://www.cnblogs.com/yinzhengjie/p/9154265.html。
顺便吐槽一句,Ganglia的web界面要是做的更美观一点就好了,看着实在有点别扭!最后希望Ganglia开源项目越来越优秀!
一.Ganglia监控简介
加州伯克利大学千禧计划的其中一个开源项目.是一个集群汇总监控用的的软件,和Cacti不同,cacti是详细监控集群中每台服务器的运行状态,而Ganglia是将集群中的服务器数据进行汇总然后监控。有时通过cacti或者zabbix看不出来的集群总体负载问题,却能够在Ganglia中体现。被监控的主机(即client)安装ganglia-gmond并启动该进程。服务器端需要安装gmetad和web程序。大致大构图如下:
二.试验环境
注意,当前集群共计5台,在部署Ganglia服务之前,建议每台机器都执行都先禁用防火墙和selinux服务!
1>.操作平台(官方的CentOS7.2发行版本)
2>.关闭防火墙(避免出现WebUI无法访问的情况,当然,如果你熟悉使用Firewall的话就另当别论了)
3>.关闭SELinux(避免出现权限问题,当然,如果你熟练使用SELinux命令就另当别论了)
三.部署gmetad和gmond插件
1>.下载epel,使用其下载ganglia组件
我已经下载好了,将该源放在了百度云上:链接:https://pan.baidu.com/s/1BrDMqiCsQ8pdipuN_NbPMA 密码:r1dg
2>. 同步epel文件
[yinzhengjie@s101 ~]$ ll | grep epel-release-7-9.noarch.rpm -rw-r--r--. 1 yinzhengjie yinzhengjie 14704 Jun 14 2018 epel-release-7-9.noarch.rpm [yinzhengjie@s101 ~]$ [yinzhengjie@s101 ~]$ more `which xrsync.sh` #!/bin/bash #@author :yinzhengjie #blog:http://www.cnblogs.com/yinzhengjie #EMAIL:y1053419035@qq.com #判断用户是否传参 if [ $# -lt 1 ];then echo "请输入参数"; exit fi #获取文件路径 file=$@ #获取子路径 filename=`basename $file` #获取父路径 dirpath=`dirname $file` #获取完整路径 cd $dirpath fullpath=`pwd -P` #同步文件到DataNode for (( i=102;i<=105;i++ )) do #使终端变绿色 tput setaf 2 echo =========== s$i %file =========== #使终端变回原来的颜色,即白灰色 tput setaf 7 #远程执行命令 rsync -lr $filename `whoami`@s$i:$fullpath #判断命令是否执行成功 if [ $? == 0 ];then echo "命令执行成功" fi done [yinzhengjie@s101 ~]$ [yinzhengjie@s101 ~]$ xrsync.sh epel-release-7-9.noarch.rpm =========== s102 %file =========== 命令执行成功 =========== s103 %file =========== 命令执行成功 =========== s104 %file =========== 命令执行成功 =========== s105 %file =========== 命令执行成功 [yinzhengjie@s101 ~]$
3>.切换到root并在所有机器安装
[yinzhengjie@s101 ~]$ su root Password: [root@s101 yinzhengjie]# [root@s101 yinzhengjie]# more `which xcall.sh` #!/bin/bash #@author :yinzhengjie #blog:http://www.cnblogs.com/yinzhengjie #EMAIL:y1053419035@qq.com #判断用户是否传参 if [ $# -lt 1 ];then echo "请输入参数" exit fi #获取用户输入的命令 cmd=$@ for (( i=101;i<=105;i++ )) do #使终端变绿色 tput setaf 2 echo ============= s$i $cmd ============ #使终端变回原来的颜色,即白灰色 tput setaf 7 #远程执行命令 ssh s$i $cmd #判断命令是否执行成功 if [ $? == 0 ];then echo "命令执行成功" fi done [root@s101 yinzhengjie]# [root@s101 yinzhengjie]# xcall.sh rpm -ivh /home/yinzhengjie/epel-release-7-9.noarch.rpm ============= s101 rpm -ivh /home/yinzhengjie/epel-release-7-9.noarch.rpm ============ Preparing... ######################################## Updating / installing... epel-release-7-9 ######################################## 命令执行成功 ============= s102 rpm -ivh /home/yinzhengjie/epel-release-7-9.noarch.rpm ============ Preparing... ######################################## Updating / installing... epel-release-7-9 ######################################## 命令执行成功 ============= s103 rpm -ivh /home/yinzhengjie/epel-release-7-9.noarch.rpm ============ Preparing... ######################################## Updating / installing... epel-release-7-9 ######################################## 命令执行成功 ============= s104 rpm -ivh /home/yinzhengjie/epel-release-7-9.noarch.rpm ============ Preparing... ######################################## Updating / installing... epel-release-7-9 ######################################## 命令执行成功 ============= s105 rpm -ivh /home/yinzhengjie/epel-release-7-9.noarch.rpm ============ Preparing... ######################################## Updating / installing... epel-release-7-9 ######################################## 命令执行成功 [root@s101 yinzhengjie]#
4>.安装gmetad到s101(服务端),安装gmond到s101-s105(客户端)
[root@s101 yinzhengjie]# yum install -y ganglia-gmetad Loaded plugins: fastestmirror base | 3.6 kB 00:00:00 epel/x86_64/metalink | 5.4 kB 00:00:00 epel | 3.2 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/5): epel/x86_64/group_gz | 88 kB 00:00:01 (2/5): extras/7/x86_64/primary_db | 149 kB 00:00:02 (3/5): epel/x86_64/updateinfo | 930 kB 00:00:09 (4/5): updates/7/x86_64/primary_db | 2.0 MB 00:00:15 (5/5): epel/x86_64/primary | 3.5 MB 00:00:21 Determining fastest mirrors * base: mirrors.tuna.tsinghua.edu.cn * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.nwsuaf.edu.cn epel 12583/12583 Resolving Dependencies --> Running transaction check ---> Package ganglia-gmetad.x86_64 0:3.7.2-2.el7 will be installed --> Processing Dependency: ganglia = 3.7.2-2.el7 for package: ganglia-gmetad-3.7.2-2.el7.x86_64 --> Processing Dependency: librrd.so.4()(64bit) for package: ganglia-gmetad-3.7.2-2.el7.x86_64 --> Processing Dependency: libmemcachedutil.so.2()(64bit) for package: ganglia-gmetad-3.7.2-2.el7.x86_64 --> Processing Dependency: libmemcached.so.11()(64bit) for package: ganglia-gmetad-3.7.2-2.el7.x86_64 --> Processing Dependency: libganglia.so.0()(64bit) for package: ganglia-gmetad-3.7.2-2.el7.x86_64 --> Processing Dependency: libconfuse.so.0()(64bit) for package: ganglia-gmetad-3.7.2-2.el7.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: ganglia-gmetad-3.7.2-2.el7.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed ---> Package ganglia.x86_64 0:3.7.2-2.el7 will be installed ---> Package libconfuse.x86_64 0:2.7-7.el7 will be installed ---> Package libmemcached.x86_64 0:1.0.16-5.el7 will be installed --> Processing Dependency: libevent-2.0.so.5()(64bit) for package: libmemcached-1.0.16-5.el7.x86_64 ---> Package rrdtool.x86_64 0:1.4.8-9.el7 will be installed --> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: rrdtool-1.4.8-9.el7.x86_64 --> Processing Dependency: dejavu-sans-mono-fonts for package: rrdtool-1.4.8-9.el7.x86_64 --> Processing Dependency: libpng15.so.15()(64bit) for package: rrdtool-1.4.8-9.el7.x86_64 --> Processing Dependency: libpangocairo-1.0.so.0()(64bit) for package: rrdtool-1.4.8-9.el7.x86_64 --> Processing Dependency: libpango-1.0.so.0()(64bit) for package: rrdtool-1.4.8-9.el7.x86_64 --> Processing Dependency: libcairo.so.2()(64bit) for package: rrdtool-1.4.8-9.el7.x86_64 --> Running transaction check ---> Package cairo.x86_64 0:1.14.8-2.el7 will be installed --> Processing Dependency: libxcb.so.1()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libxcb-shm.so.0()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libxcb-render.so.0()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libpixman-1.so.0()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libfontconfig.so.1()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libXrender.so.1()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libXext.so.6()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libX11.so.6()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libGL.so.1()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libEGL.so.1()(64bit) for package: cairo-1.14.8-2.el7.x86_64 ---> Package dejavu-sans-mono-fonts.noarch 0:2.33-6.el7 will be installed --> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-mono-fonts-2.33-6.el7.noarch ---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed ---> Package libpng.x86_64 2:1.5.13-7.el7_2 will be installed ---> Package pango.x86_64 0:1.40.4-1.el7 will be installed --> Processing Dependency: libthai(x86-64) >= 0.1.9 for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libXft(x86-64) >= 2.0.0 for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: harfbuzz(x86-64) >= 1.0.3 for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libthai.so.0(LIBTHAI_0.1)(64bit) for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libthai.so.0()(64bit) for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libharfbuzz.so.0()(64bit) for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libXft.so.2()(64bit) for package: pango-1.40.4-1.el7.x86_64 --> Running transaction check ---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed --> Processing Dependency: fontpackages-filesystem for package: dejavu-fonts-common-2.33-6.el7.noarch ---> Package fontconfig.x86_64 0:2.10.95-11.el7 will be installed ---> Package harfbuzz.x86_64 0:1.3.2-1.el7 will be installed --> Processing Dependency: libgraphite2.so.3()(64bit) for package: harfbuzz-1.3.2-1.el7.x86_64 ---> Package libX11.x86_64 0:1.6.5-1.el7 will be installed --> Processing Dependency: libX11-common >= 1.6.5-1.el7 for package: libX11-1.6.5-1.el7.x86_64 ---> Package libXext.x86_64 0:1.3.3-3.el7 will be installed ---> Package libXft.x86_64 0:2.3.2-2.el7 will be installed ---> Package libXrender.x86_64 0:0.9.10-1.el7 will be installed ---> Package libthai.x86_64 0:0.1.14-9.el7 will be installed ---> Package libxcb.x86_64 0:1.12-1.el7 will be installed --> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.12-1.el7.x86_64 ---> Package mesa-libEGL.x86_64 0:17.2.3-8.20171019.el7 will be installed --> Processing Dependency: mesa-libgbm = 17.2.3-8.20171019.el7 for package: mesa-libEGL-17.2.3-8.20171019.el7.x86_64 --> Processing Dependency: libxshmfence.so.1()(64bit) for package: mesa-libEGL-17.2.3-8.20171019.el7.x86_64 --> Processing Dependency: libwayland-server.so.0()(64bit) for package: mesa-libEGL-17.2.3-8.20171019.el7.x86_64 --> Processing Dependency: libwayland-client.so.0()(64bit) for package: mesa-libEGL-17.2.3-8.20171019.el7.x86_64 --> Processing Dependency: libgbm.so.1()(64bit) for package: mesa-libEGL-17.2.3-8.20171019.el7.x86_64 ---> Package mesa-libGL.x86_64 0:17.2.3-8.20171019.el7 will be installed --> Processing Dependency: mesa-libglapi = 17.2.3-8.20171019.el7 for package: mesa-libGL-17.2.3-8.20171019.el7.x86_64 --> Processing Dependency: libdrm >= 2.4.83 for package: mesa-libGL-17.2.3-8.20171019.el7.x86_64 --> Processing Dependency: libglapi.so.0()(64bit) for package: mesa-libGL-17.2.3-8.20171019.el7.x86_64 --> Processing Dependency: libXxf86vm.so.1()(64bit) for package: mesa-libGL-17.2.3-8.20171019.el7.x86_64 --> Processing Dependency: libXfixes.so.3()(64bit) for package: mesa-libGL-17.2.3-8.20171019.el7.x86_64 --> Processing Dependency: libXdamage.so.1()(64bit) for package: mesa-libGL-17.2.3-8.20171019.el7.x86_64 ---> Package pixman.x86_64 0:0.34.0-1.el7 will be installed --> Running transaction check ---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed ---> Package graphite2.x86_64 0:1.3.10-1.el7_3 will be installed ---> Package libX11-common.noarch 0:1.6.5-1.el7 will be installed ---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed ---> Package libXdamage.x86_64 0:1.1.4-4.1.el7 will be installed ---> Package libXfixes.x86_64 0:5.0.3-1.el7 will be installed ---> Package libXxf86vm.x86_64 0:1.1.4-1.el7 will be installed ---> Package libdrm.x86_64 0:2.4.60-3.el7 will be updated ---> Package libdrm.x86_64 0:2.4.83-2.el7 will be an update ---> Package libwayland-client.x86_64 0:1.14.0-2.el7 will be installed ---> Package libwayland-server.x86_64 0:1.14.0-2.el7 will be installed ---> Package libxshmfence.x86_64 0:1.2-1.el7 will be installed ---> Package mesa-libgbm.x86_64 0:17.2.3-8.20171019.el7 will be installed ---> Package mesa-libglapi.x86_64 0:17.2.3-8.20171019.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================================ Installing: ganglia-gmetad x86_64 3.7.2-2.el7 epel 55 k Installing for dependencies: apr x86_64 1.4.8-3.el7_4.1 base 103 k cairo x86_64 1.14.8-2.el7 base 713 k dejavu-fonts-common noarch 2.33-6.el7 base 64 k dejavu-sans-mono-fonts noarch 2.33-6.el7 base 433 k fontconfig x86_64 2.10.95-11.el7 base 229 k fontpackages-filesystem noarch 1.44-8.el7 base 9.9 k ganglia x86_64 3.7.2-2.el7 epel 102 k graphite2 x86_64 1.3.10-1.el7_3 base 115 k harfbuzz x86_64 1.3.2-1.el7 base 177 k libX11 x86_64 1.6.5-1.el7 base 606 k libX11-common noarch 1.6.5-1.el7 base 164 k libXau x86_64 1.0.8-2.1.el7 base 29 k libXdamage x86_64 1.1.4-4.1.el7 base 20 k libXext x86_64 1.3.3-3.el7 base 39 k libXfixes x86_64 5.0.3-1.el7 base 18 k libXft x86_64 2.3.2-2.el7 base 58 k libXrender x86_64 0.9.10-1.el7 base 26 k libXxf86vm x86_64 1.1.4-1.el7 base 18 k libconfuse x86_64 2.7-7.el7 epel 80 k libevent x86_64 2.0.21-4.el7 base 214 k libmemcached x86_64 1.0.16-5.el7 base 237 k libpng x86_64 2:1.5.13-7.el7_2 base 213 k libthai x86_64 0.1.14-9.el7 base 187 k libwayland-client x86_64 1.14.0-2.el7 base 32 k libwayland-server x86_64 1.14.0-2.el7 base 38 k libxcb x86_64 1.12-1.el7 base 211 k libxshmfence x86_64 1.2-1.el7 base 7.2 k mesa-libEGL x86_64 17.2.3-8.20171019.el7 base 96 k mesa-libGL x86_64 17.2.3-8.20171019.el7 base 156 k mesa-libgbm x86_64 17.2.3-8.20171019.el7 base 38 k mesa-libglapi x86_64 17.2.3-8.20171019.el7 base 43 k pango x86_64 1.40.4-1.el7 base 275 k pixman x86_64 0.34.0-1.el7 base 248 k rrdtool x86_64 1.4.8-9.el7 base 440 k Updating for dependencies: libdrm x86_64 2.4.83-2.el7 base 151 k Transaction Summary ================================================================================================================================================================================================================ Install 1 Package (+34 Dependent packages) Upgrade ( 1 Dependent package) Total download size: 5.5 M Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/36): dejavu-fonts-common-2.33-6.el7.noarch.rpm | 64 kB 00:00:01 (2/36): apr-1.4.8-3.el7_4.1.x86_64.rpm | 103 kB 00:00:01 (3/36): fontpackages-filesystem-1.44-8.el7.noarch.rpm | 9.9 kB 00:00:00 warning: /var/cache/yum/x86_64/7/epel/packages/ganglia-gmetad-3.7.2-2.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY ] 222 kB/s | 880 kB 00:00:21 ETA Public key for ganglia-gmetad-3.7.2-2.el7.x86_64.rpm is not installed (4/36): ganglia-gmetad-3.7.2-2.el7.x86_64.rpm | 55 kB 00:00:01 (5/36): fontconfig-2.10.95-11.el7.x86_64.rpm | 229 kB 00:00:03 (6/36): ganglia-3.7.2-2.el7.x86_64.rpm | 102 kB 00:00:02 (7/36): graphite2-1.3.10-1.el7_3.x86_64.rpm | 115 kB 00:00:01 (8/36): harfbuzz-1.3.2-1.el7.x86_64.rpm | 177 kB 00:00:02 (9/36): dejavu-sans-mono-fonts-2.33-6.el7.noarch.rpm | 433 kB 00:00:05 (10/36): libXdamage-1.1.4-4.1.el7.x86_64.rpm | 20 kB 00:00:00 (11/36): libXau-1.0.8-2.1.el7.x86_64.rpm | 29 kB 00:00:00 (12/36): libXfixes-5.0.3-1.el7.x86_64.rpm | 18 kB 00:00:00 (13/36): libXext-1.3.3-3.el7.x86_64.rpm | 39 kB 00:00:00 (14/36): libXrender-0.9.10-1.el7.x86_64.rpm | 26 kB 00:00:00 (15/36): libXxf86vm-1.1.4-1.el7.x86_64.rpm | 18 kB 00:00:00 (16/36): libXft-2.3.2-2.el7.x86_64.rpm | 58 kB 00:00:00 (17/36): libX11-common-1.6.5-1.el7.noarch.rpm | 164 kB 00:00:03 (18/36): libconfuse-2.7-7.el7.x86_64.rpm | 80 kB 00:00:01 (19/36): cairo-1.14.8-2.el7.x86_64.rpm | 713 kB 00:00:09 (20/36): libdrm-2.4.83-2.el7.x86_64.rpm | 151 kB 00:00:02 (21/36): libevent-2.0.21-4.el7.x86_64.rpm | 214 kB 00:00:03 (22/36): libmemcached-1.0.16-5.el7.x86_64.rpm | 237 kB 00:00:03 (23/36): libwayland-client-1.14.0-2.el7.x86_64.rpm | 32 kB 00:00:00 (24/36): libpng-1.5.13-7.el7_2.x86_64.rpm | 213 kB 00:00:02 (25/36): libxshmfence-1.2-1.el7.x86_64.rpm | 7.2 kB 00:00:00 (26/36): libwayland-server-1.14.0-2.el7.x86_64.rpm | 38 kB 00:00:00 (27/36): libX11-1.6.5-1.el7.x86_64.rpm | 606 kB 00:00:10 (28/36): libthai-0.1.14-9.el7.x86_64.rpm | 187 kB 00:00:04 (29/36): mesa-libEGL-17.2.3-8.20171019.el7.x86_64.rpm | 96 kB 00:00:01 (30/36): mesa-libgbm-17.2.3-8.20171019.el7.x86_64.rpm | 38 kB 00:00:00 (31/36): mesa-libglapi-17.2.3-8.20171019.el7.x86_64.rpm | 43 kB 00:00:00 (32/36): mesa-libGL-17.2.3-8.20171019.el7.x86_64.rpm | 156 kB 00:00:02 (33/36): libxcb-1.12-1.el7.x86_64.rpm | 211 kB 00:00:03 (34/36): pango-1.40.4-1.el7.x86_64.rpm | 275 kB 00:00:02 (35/36): pixman-0.34.0-1.el7.x86_64.rpm | 248 kB 00:00:02 (36/36): rrdtool-1.4.8-9.el7.x86_64.rpm | 440 kB 00:00:03 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 304 kB/s | 5.5 MB 00:00:18 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Importing GPG key 0x352C64E5: Userid : "Fedora EPEL (7) <epel@fedoraproject.org>" Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5 Package : epel-release-7-9.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Updating : libdrm-2.4.83-2.el7.x86_64 1/37 Installing : libwayland-server-1.14.0-2.el7.x86_64 2/37 Installing : libxshmfence-1.2-1.el7.x86_64 3/37 Installing : apr-1.4.8-3.el7_4.1.x86_64 4/37 Installing : libconfuse-2.7-7.el7.x86_64 5/37 Installing : libwayland-client-1.14.0-2.el7.x86_64 6/37 Installing : fontpackages-filesystem-1.44-8.el7.noarch 7/37 Installing : 2:libpng-1.5.13-7.el7_2.x86_64 8/37 Installing : mesa-libglapi-17.2.3-8.20171019.el7.x86_64 9/37 Installing : mesa-libgbm-17.2.3-8.20171019.el7.x86_64 10/37 Installing : dejavu-fonts-common-2.33-6.el7.noarch 11/37 Installing : dejavu-sans-mono-fonts-2.33-6.el7.noarch 12/37 Installing : fontconfig-2.10.95-11.el7.x86_64 13/37 Installing : ganglia-3.7.2-2.el7.x86_64 14/37 Installing : graphite2-1.3.10-1.el7_3.x86_64 15/37 Installing : harfbuzz-1.3.2-1.el7.x86_64 16/37 Installing : libXau-1.0.8-2.1.el7.x86_64 17/37 Installing : libxcb-1.12-1.el7.x86_64 18/37 Installing : pixman-0.34.0-1.el7.x86_64 19/37 Installing : libevent-2.0.21-4.el7.x86_64 20/37 Installing : libmemcached-1.0.16-5.el7.x86_64 21/37 Installing : libX11-common-1.6.5-1.el7.noarch 22/37 Installing : libX11-1.6.5-1.el7.x86_64 23/37 Installing : libXext-1.3.3-3.el7.x86_64 24/37 Installing : libXrender-0.9.10-1.el7.x86_64 25/37 Installing : libXfixes-5.0.3-1.el7.x86_64 26/37 Installing : libXdamage-1.1.4-4.1.el7.x86_64 27/37 Installing : libXft-2.3.2-2.el7.x86_64 28/37 Installing : libXxf86vm-1.1.4-1.el7.x86_64 29/37 Installing : mesa-libGL-17.2.3-8.20171019.el7.x86_64 30/37 Installing : mesa-libEGL-17.2.3-8.20171019.el7.x86_64 31/37 Installing : cairo-1.14.8-2.el7.x86_64 32/37 Installing : libthai-0.1.14-9.el7.x86_64 33/37 Installing : pango-1.40.4-1.el7.x86_64 34/37 Installing : rrdtool-1.4.8-9.el7.x86_64 35/37 Installing : ganglia-gmetad-3.7.2-2.el7.x86_64 36/37 Cleanup : libdrm-2.4.60-3.el7.x86_64 37/37 Verifying : libXext-1.3.3-3.el7.x86_64 1/37 Verifying : libX11-1.6.5-1.el7.x86_64 2/37 Verifying : libXrender-0.9.10-1.el7.x86_64 3/37 Verifying : mesa-libglapi-17.2.3-8.20171019.el7.x86_64 4/37 Verifying : libXxf86vm-1.1.4-1.el7.x86_64 5/37 Verifying : 2:libpng-1.5.13-7.el7_2.x86_64 6/37 Verifying : mesa-libEGL-17.2.3-8.20171019.el7.x86_64 7/37 Verifying : libmemcached-1.0.16-5.el7.x86_64 8/37 Verifying : fontpackages-filesystem-1.44-8.el7.noarch 9/37 Verifying : harfbuzz-1.3.2-1.el7.x86_64 10/37 Verifying : cairo-1.14.8-2.el7.x86_64 11/37 Verifying : ganglia-gmetad-3.7.2-2.el7.x86_64 12/37 Verifying : dejavu-fonts-common-2.33-6.el7.noarch 13/37 Verifying : libthai-0.1.14-9.el7.x86_64 14/37 Verifying : mesa-libGL-17.2.3-8.20171019.el7.x86_64 15/37 Verifying : libXft-2.3.2-2.el7.x86_64 16/37 Verifying : libX11-common-1.6.5-1.el7.noarch 17/37 Verifying : libxcb-1.12-1.el7.x86_64 18/37 Verifying : pango-1.40.4-1.el7.x86_64 19/37 Verifying : libevent-2.0.21-4.el7.x86_64 20/37 Verifying : libwayland-client-1.14.0-2.el7.x86_64 21/37 Verifying : rrdtool-1.4.8-9.el7.x86_64 22/37 Verifying : pixman-0.34.0-1.el7.x86_64 23/37 Verifying : libconfuse-2.7-7.el7.x86_64 24/37 Verifying : apr-1.4.8-3.el7_4.1.x86_64 25/37 Verifying : ganglia-3.7.2-2.el7.x86_64 26/37 Verifying : dejavu-sans-mono-fonts-2.33-6.el7.noarch 27/37 Verifying : libxshmfence-1.2-1.el7.x86_64 28/37 Verifying : libXau-1.0.8-2.1.el7.x86_64 29/37 Verifying : fontconfig-2.10.95-11.el7.x86_64 30/37 Verifying : graphite2-1.3.10-1.el7_3.x86_64 31/37 Verifying : libwayland-server-1.14.0-2.el7.x86_64 32/37 Verifying : libXdamage-1.1.4-4.1.el7.x86_64 33/37 Verifying : libXfixes-5.0.3-1.el7.x86_64 34/37 Verifying : mesa-libgbm-17.2.3-8.20171019.el7.x86_64 35/37 Verifying : libdrm-2.4.83-2.el7.x86_64 36/37 Verifying : libdrm-2.4.60-3.el7.x86_64 37/37 Installed: ganglia-gmetad.x86_64 0:3.7.2-2.el7 Dependency Installed: apr.x86_64 0:1.4.8-3.el7_4.1 cairo.x86_64 0:1.14.8-2.el7 dejavu-fonts-common.noarch 0:2.33-6.el7 dejavu-sans-mono-fonts.noarch 0:2.33-6.el7 fontconfig.x86_64 0:2.10.95-11.el7 fontpackages-filesystem.noarch 0:1.44-8.el7 ganglia.x86_64 0:3.7.2-2.el7 graphite2.x86_64 0:1.3.10-1.el7_3 harfbuzz.x86_64 0:1.3.2-1.el7 libX11.x86_64 0:1.6.5-1.el7 libX11-common.noarch 0:1.6.5-1.el7 libXau.x86_64 0:1.0.8-2.1.el7 libXdamage.x86_64 0:1.1.4-4.1.el7 libXext.x86_64 0:1.3.3-3.el7 libXfixes.x86_64 0:5.0.3-1.el7 libXft.x86_64 0:2.3.2-2.el7 libXrender.x86_64 0:0.9.10-1.el7 libXxf86vm.x86_64 0:1.1.4-1.el7 libconfuse.x86_64 0:2.7-7.el7 libevent.x86_64 0:2.0.21-4.el7 libmemcached.x86_64 0:1.0.16-5.el7 libpng.x86_64 2:1.5.13-7.el7_2 libthai.x86_64 0:0.1.14-9.el7 libwayland-client.x86_64 0:1.14.0-2.el7 libwayland-server.x86_64 0:1.14.0-2.el7 libxcb.x86_64 0:1.12-1.el7 libxshmfence.x86_64 0:1.2-1.el7 mesa-libEGL.x86_64 0:17.2.3-8.20171019.el7 mesa-libGL.x86_64 0:17.2.3-8.20171019.el7 mesa-libgbm.x86_64 0:17.2.3-8.20171019.el7 mesa-libglapi.x86_64 0:17.2.3-8.20171019.el7 pango.x86_64 0:1.40.4-1.el7 pixman.x86_64 0:0.34.0-1.el7 rrdtool.x86_64 0:1.4.8-9.el7 Dependency Updated: libdrm.x86_64 0:2.4.83-2.el7 Complete! [root@s101 yinzhengjie]#
[root@s101 yinzhengjie]# xcall.sh yum -y install ganglia-gmond ============= s101 yum -y install ganglia-gmond ============ Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.tuna.tsinghua.edu.cn * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.nwsuaf.edu.cn Resolving Dependencies --> Running transaction check ---> Package ganglia-gmond.x86_64 0:3.7.2-2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ganglia-gmond x86_64 3.7.2-2.el7 epel 81 k Transaction Summary ================================================================================ Install 1 Package Total download size: 81 k Installed size: 183 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : ganglia-gmond-3.7.2-2.el7.x86_64 1/1 Verifying : ganglia-gmond-3.7.2-2.el7.x86_64 1/1 Installed: ganglia-gmond.x86_64 0:3.7.2-2.el7 Complete! 命令执行成功 ============= s102 yum -y install ganglia-gmond ============ Loaded plugins: fastestmirror http://mirrors.shu.edu.cn/centos/7.5.1804/updates/x86_64/repodata/1f31c8589d9d72a3943d97f881a2007528ea2507784db0fab25ed43f4a343de9-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.shu.edu.cn:80; Connection refused" Trying other mirror. Loading mirror speeds from cached hostfile * base: mirrors.nwsuaf.edu.cn * epel: mirrors.tongji.edu.cn * extras: mirrors.njupt.edu.cn * updates: mirrors.nwsuaf.edu.cn Resolving Dependencies --> Running transaction check ---> Package ganglia-gmond.x86_64 0:3.7.2-2.el7 will be installed --> Processing Dependency: ganglia = 3.7.2-2.el7 for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libganglia.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libconfuse.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed ---> Package ganglia.x86_64 0:3.7.2-2.el7 will be installed ---> Package libconfuse.x86_64 0:2.7-7.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ganglia-gmond x86_64 3.7.2-2.el7 epel 81 k Installing for dependencies: apr x86_64 1.4.8-3.el7_4.1 base 103 k ganglia x86_64 3.7.2-2.el7 epel 102 k libconfuse x86_64 2.7-7.el7 epel 80 k Transaction Summary ================================================================================ Install 1 Package (+3 Dependent packages) Total download size: 366 k Installed size: 1.2 M Downloading packages: warning: /var/cache/yum/x86_64/7/epel/packages/libconfuse-2.7-7.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Public key for libconfuse-2.7-7.el7.x86_64.rpm is not installed -------------------------------------------------------------------------------- Total 137 kB/s | 366 kB 00:02 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Importing GPG key 0x352C64E5: Userid : "Fedora EPEL (7) <epel@fedoraproject.org>" Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5 Package : epel-release-7-9.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : apr-1.4.8-3.el7_4.1.x86_64 1/4 Installing : libconfuse-2.7-7.el7.x86_64 2/4 Installing : ganglia-3.7.2-2.el7.x86_64 3/4 Installing : ganglia-gmond-3.7.2-2.el7.x86_64 4/4 Verifying : libconfuse-2.7-7.el7.x86_64 1/4 Verifying : ganglia-3.7.2-2.el7.x86_64 2/4 Verifying : apr-1.4.8-3.el7_4.1.x86_64 3/4 Verifying : ganglia-gmond-3.7.2-2.el7.x86_64 4/4 Installed: ganglia-gmond.x86_64 0:3.7.2-2.el7 Dependency Installed: apr.x86_64 0:1.4.8-3.el7_4.1 ganglia.x86_64 0:3.7.2-2.el7 libconfuse.x86_64 0:2.7-7.el7 Complete! 命令执行成功 ============= s103 yum -y install ganglia-gmond ============ Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.nwsuaf.edu.cn * epel: mirrors.tongji.edu.cn * extras: mirrors.njupt.edu.cn * updates: mirrors.nwsuaf.edu.cn Resolving Dependencies --> Running transaction check ---> Package ganglia-gmond.x86_64 0:3.7.2-2.el7 will be installed --> Processing Dependency: ganglia = 3.7.2-2.el7 for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libganglia.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libconfuse.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed ---> Package ganglia.x86_64 0:3.7.2-2.el7 will be installed ---> Package libconfuse.x86_64 0:2.7-7.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ganglia-gmond x86_64 3.7.2-2.el7 epel 81 k Installing for dependencies: apr x86_64 1.4.8-3.el7_4.1 base 103 k ganglia x86_64 3.7.2-2.el7 epel 102 k libconfuse x86_64 2.7-7.el7 epel 80 k Transaction Summary ================================================================================ Install 1 Package (+3 Dependent packages) Total download size: 366 k Installed size: 1.2 M Downloading packages: warning: /var/cache/yum/x86_64/7/epel/packages/libconfuse-2.7-7.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Public key for libconfuse-2.7-7.el7.x86_64.rpm is not installed -------------------------------------------------------------------------------- Total 119 kB/s | 366 kB 00:03 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Importing GPG key 0x352C64E5: Userid : "Fedora EPEL (7) <epel@fedoraproject.org>" Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5 Package : epel-release-7-9.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : apr-1.4.8-3.el7_4.1.x86_64 1/4 Installing : libconfuse-2.7-7.el7.x86_64 2/4 Installing : ganglia-3.7.2-2.el7.x86_64 3/4 Installing : ganglia-gmond-3.7.2-2.el7.x86_64 4/4 Verifying : libconfuse-2.7-7.el7.x86_64 1/4 Verifying : ganglia-3.7.2-2.el7.x86_64 2/4 Verifying : apr-1.4.8-3.el7_4.1.x86_64 3/4 Verifying : ganglia-gmond-3.7.2-2.el7.x86_64 4/4 Installed: ganglia-gmond.x86_64 0:3.7.2-2.el7 Dependency Installed: apr.x86_64 0:1.4.8-3.el7_4.1 ganglia.x86_64 0:3.7.2-2.el7 libconfuse.x86_64 0:2.7-7.el7 Complete! 命令执行成功 ============= s104 yum -y install ganglia-gmond ============ Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.nwsuaf.edu.cn * epel: mirrors.tongji.edu.cn * extras: mirrors.njupt.edu.cn * updates: mirrors.nwsuaf.edu.cn Resolving Dependencies --> Running transaction check ---> Package ganglia-gmond.x86_64 0:3.7.2-2.el7 will be installed --> Processing Dependency: ganglia = 3.7.2-2.el7 for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libganglia.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libconfuse.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed ---> Package ganglia.x86_64 0:3.7.2-2.el7 will be installed ---> Package libconfuse.x86_64 0:2.7-7.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ganglia-gmond x86_64 3.7.2-2.el7 epel 81 k Installing for dependencies: apr x86_64 1.4.8-3.el7_4.1 base 103 k ganglia x86_64 3.7.2-2.el7 epel 102 k libconfuse x86_64 2.7-7.el7 epel 80 k Transaction Summary ================================================================================ Install 1 Package (+3 Dependent packages) Total download size: 366 k Installed size: 1.2 M Downloading packages: warning: /var/cache/yum/x86_64/7/epel/packages/ganglia-gmond-3.7.2-2.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Public key for ganglia-gmond-3.7.2-2.el7.x86_64.rpm is not installed -------------------------------------------------------------------------------- Total 142 kB/s | 366 kB 00:02 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Importing GPG key 0x352C64E5: Userid : "Fedora EPEL (7) <epel@fedoraproject.org>" Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5 Package : epel-release-7-9.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : apr-1.4.8-3.el7_4.1.x86_64 1/4 Installing : libconfuse-2.7-7.el7.x86_64 2/4 Installing : ganglia-3.7.2-2.el7.x86_64 3/4 Installing : ganglia-gmond-3.7.2-2.el7.x86_64 4/4 Verifying : libconfuse-2.7-7.el7.x86_64 1/4 Verifying : ganglia-3.7.2-2.el7.x86_64 2/4 Verifying : apr-1.4.8-3.el7_4.1.x86_64 3/4 Verifying : ganglia-gmond-3.7.2-2.el7.x86_64 4/4 Installed: ganglia-gmond.x86_64 0:3.7.2-2.el7 Dependency Installed: apr.x86_64 0:1.4.8-3.el7_4.1 ganglia.x86_64 0:3.7.2-2.el7 libconfuse.x86_64 0:2.7-7.el7 Complete! 命令执行成功 ============= s105 yum -y install ganglia-gmond ============ Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.nwsuaf.edu.cn * epel: mirrors.tongji.edu.cn * extras: mirrors.huaweicloud.com * updates: mirrors.nwsuaf.edu.cn Resolving Dependencies --> Running transaction check ---> Package ganglia-gmond.x86_64 0:3.7.2-2.el7 will be installed --> Processing Dependency: ganglia = 3.7.2-2.el7 for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libganglia.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libconfuse.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: ganglia-gmond-3.7.2-2.el7.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed ---> Package ganglia.x86_64 0:3.7.2-2.el7 will be installed ---> Package libconfuse.x86_64 0:2.7-7.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ganglia-gmond x86_64 3.7.2-2.el7 epel 81 k Installing for dependencies: apr x86_64 1.4.8-3.el7_4.1 base 103 k ganglia x86_64 3.7.2-2.el7 epel 102 k libconfuse x86_64 2.7-7.el7 epel 80 k Transaction Summary ================================================================================ Install 1 Package (+3 Dependent packages) Total download size: 366 k Installed size: 1.2 M Downloading packages: warning: /var/cache/yum/x86_64/7/epel/packages/ganglia-3.7.2-2.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Public key for ganglia-3.7.2-2.el7.x86_64.rpm is not installed -------------------------------------------------------------------------------- Total 275 kB/s | 366 kB 00:01 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Importing GPG key 0x352C64E5: Userid : "Fedora EPEL (7) <epel@fedoraproject.org>" Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5 Package : epel-release-7-9.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : apr-1.4.8-3.el7_4.1.x86_64 1/4 Installing : libconfuse-2.7-7.el7.x86_64 2/4 Installing : ganglia-3.7.2-2.el7.x86_64 3/4 Installing : ganglia-gmond-3.7.2-2.el7.x86_64 4/4 Verifying : libconfuse-2.7-7.el7.x86_64 1/4 Verifying : ganglia-3.7.2-2.el7.x86_64 2/4 Verifying : apr-1.4.8-3.el7_4.1.x86_64 3/4 Verifying : ganglia-gmond-3.7.2-2.el7.x86_64 4/4 Installed: ganglia-gmond.x86_64 0:3.7.2-2.el7 Dependency Installed: apr.x86_64 0:1.4.8-3.el7_4.1 ganglia.x86_64 0:3.7.2-2.el7 libconfuse.x86_64 0:2.7-7.el7 Complete! 命令执行成功 [root@s101 yinzhengjie]#
四.在服务端部署gweb
1>.下载gweb安装包
下载地址:链接:https://pan.baidu.com/s/1gfHGYDrCACMd8VuDaAnGMQ 密码:ypim
2>.安装依赖包(需要用到httpd和php对gweb进行WEBUI支持)
[root@s101 yinzhengjie]# yum -y install httpd php Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.tuna.tsinghua.edu.cn * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.nwsuaf.edu.cn Resolving Dependencies --> Running transaction check ---> Package httpd.x86_64 0:2.4.6-80.el7.centos will be installed --> Processing Dependency: httpd-tools = 2.4.6-80.el7.centos for package: httpd-2.4.6-80.el7.centos.x86_64 --> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-80.el7.centos.x86_64 --> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-80.el7.centos.x86_64 ---> Package php.x86_64 0:5.4.16-45.el7 will be installed --> Processing Dependency: php-common(x86-64) = 5.4.16-45.el7 for package: php-5.4.16-45.el7.x86_64 --> Processing Dependency: php-cli(x86-64) = 5.4.16-45.el7 for package: php-5.4.16-45.el7.x86_64 --> Running transaction check ---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed ---> Package httpd-tools.x86_64 0:2.4.6-80.el7.centos will be installed ---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed ---> Package php-cli.x86_64 0:5.4.16-45.el7 will be installed ---> Package php-common.x86_64 0:5.4.16-45.el7 will be installed --> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-45.el7.x86_64 --> Running transaction check ---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================================ Installing: httpd x86_64 2.4.6-80.el7.centos base 2.7 M php x86_64 5.4.16-45.el7 base 1.4 M Installing for dependencies: apr-util x86_64 1.5.2-6.el7 base 92 k httpd-tools x86_64 2.4.6-80.el7.centos base 89 k libzip x86_64 0.10.1-8.el7 base 48 k mailcap noarch 2.1.41-2.el7 base 31 k php-cli x86_64 5.4.16-45.el7 base 2.7 M php-common x86_64 5.4.16-45.el7 base 565 k Transaction Summary ================================================================================================================================================================================================================ Install 2 Packages (+6 Dependent packages) Total download size: 7.6 M Installed size: 27 M Downloading packages: (1/8): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00:00 (2/8): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:00 (3/8): libzip-0.10.1-8.el7.x86_64.rpm | 48 kB 00:00:01 (4/8): httpd-tools-2.4.6-80.el7.centos.x86_64.rpm | 89 kB 00:00:01 (5/8): php-common-5.4.16-45.el7.x86_64.rpm | 565 kB 00:00:06 (6/8): php-5.4.16-45.el7.x86_64.rpm | 1.4 MB 00:00:15 (7/8): php-cli-5.4.16-45.el7.x86_64.rpm | 2.7 MB 00:00:19 (8/8): httpd-2.4.6-80.el7.centos.x86_64.rpm | 2.7 MB 00:00:24 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 316 kB/s | 7.6 MB 00:00:24 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : apr-util-1.5.2-6.el7.x86_64 1/8 Installing : httpd-tools-2.4.6-80.el7.centos.x86_64 2/8 Installing : libzip-0.10.1-8.el7.x86_64 3/8 Installing : php-common-5.4.16-45.el7.x86_64 4/8 Installing : php-cli-5.4.16-45.el7.x86_64 5/8 Installing : mailcap-2.1.41-2.el7.noarch 6/8 Installing : httpd-2.4.6-80.el7.centos.x86_64 7/8 Installing : php-5.4.16-45.el7.x86_64 8/8 Verifying : php-common-5.4.16-45.el7.x86_64 1/8 Verifying : php-5.4.16-45.el7.x86_64 2/8 Verifying : mailcap-2.1.41-2.el7.noarch 3/8 Verifying : php-cli-5.4.16-45.el7.x86_64 4/8 Verifying : apr-util-1.5.2-6.el7.x86_64 5/8 Verifying : httpd-2.4.6-80.el7.centos.x86_64 6/8 Verifying : libzip-0.10.1-8.el7.x86_64 7/8 Verifying : httpd-tools-2.4.6-80.el7.centos.x86_64 8/8 Installed: httpd.x86_64 0:2.4.6-80.el7.centos php.x86_64 0:5.4.16-45.el7 Dependency Installed: apr-util.x86_64 0:1.5.2-6.el7 httpd-tools.x86_64 0:2.4.6-80.el7.centos libzip.x86_64 0:0.10.1-8.el7 mailcap.noarch 0:2.1.41-2.el7 php-cli.x86_64 0:5.4.16-45.el7 php-common.x86_64 0:5.4.16-45.el7 Complete! [root@s101 yinzhengjie]#
3>.解压gweb到"/soft"目录
[yinzhengjie@s101 ~]$ ll | grep ganglia-web-3.7.2.tar.gz -rw-r--r--. 1 yinzhengjie yinzhengjie 704632 Jun 14 2018 ganglia-web-3.7.2.tar.gz [yinzhengjie@s101 ~]$ tar zxf ganglia-web-3.7.2.tar.gz -C /soft/ [yinzhengjie@s101 ~]$
4>.修改编译文件(MakeFile)
[yinzhengjie@s101 ~]$ more /soft/ganglia-web-3.7.2/Makefile | grep ^GDESTDIR GDESTDIR = /var/www/html [yinzhengjie@s101 ~]$ more /etc/httpd/conf/httpd.conf | grep ^DocumentRoot DocumentRoot "/var/www/html" [yinzhengjie@s101 ~]$ [yinzhengjie@s101 ~]$ [yinzhengjie@s101 ~]$ more /soft/ganglia-web-3.7.2/Makefile | grep ^APACHE_USER APACHE_USER = apache [yinzhengjie@s101 ~]$ [yinzhengjie@s101 ~]$ more /etc/httpd/conf/httpd.conf | grep ^User User apache [yinzhengjie@s101 ~]$
5>.开始编译
[yinzhengjie@s101 ganglia-web-3.7.2]$ su root Password: [root@s101 ganglia-web-3.7.2]# make install rsync --exclude "rpmbuild" --exclude "*.gz" --exclude "Makefile" --exclude "*debian*" --exclude "ganglia-web-3.7.2" --exclude ".git*" --exclude "*.in" --exclude "*~" --exclude "#*#" --exclude "ganglia-web.spec" --exclude "apache.conf" -a . ganglia-web-3.7.2 mkdir -p //var/lib/ganglia-web/dwoo/compiled && \ mkdir -p //var/lib/ganglia-web/dwoo/cache && \ mkdir -p //var/lib/ganglia-web && \ rsync -a ganglia-web-3.7.2/conf //var/lib/ganglia-web && \ mkdir -p //var/www/html && \ rsync --exclude "conf" -a ganglia-web-3.7.2/* //var/www/html && \ chown -R apache:apache //var/lib/ganglia-web [root@s101 ganglia-web-3.7.2]# [root@s101 ganglia-web-3.7.2]# echo $? 0 [root@s101 ganglia-web-3.7.2]# exit exit [yinzhengjie@s101 ganglia-web-3.7.2]$
五.启动服务
1>. 在服务端开启服务
[root@s101 ~]# service httpd start Redirecting to /bin/systemctl start httpd.service [root@s101 ~]# [root@s101 ~]# service gmetad start Redirecting to /bin/systemctl start gmetad.service [root@s101 ~]# [root@s101 ~]# [root@s101 ~]# xcall.sh service gmond start ============= s101 service gmond start ============ Redirecting to /bin/systemctl start gmond.service 命令执行成功 ============= s102 service gmond start ============ Redirecting to /bin/systemctl start gmond.service 命令执行成功 ============= s103 service gmond start ============ Redirecting to /bin/systemctl start gmond.service 命令执行成功 ============= s104 service gmond start ============ Redirecting to /bin/systemctl start gmond.service 命令执行成功 ============= s105 service gmond start ============ Redirecting to /bin/systemctl start gmond.service 命令执行成功 [root@s101 ~]#
2>.验证服务是否启动成功
3>.通过WebUI访问Ganglia
下图是半小时后,查看s104节点的状态图: