1、安装 ganglia-gmond 包
先查看是否有 ganglia-gmond 安装包
sudo yum search ganglia-gmond
如果显示为 Warning: No matches found for: ganglia-gmond
No Matches found
就表示没有ganglia-gmond 安装包
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo yum search ganglia-gmond
sudo yum install ganglia-gmond -y
2、安装 ganglia-gmetad
sudo yum install ganglia-gmetad -y
3、安装gweb
首先安装Apache和PHP 5
sudo yum install httpd php
wget http://ncu.dl.sourceforge.net/project/ganglia/ganglia-web/3.5.12/ganglia-web-3.5.12.tar.gz
tar -zxvf ganglia-web-3.5.12.tar.gz
cd ganglia-web-3.5.12
vim Makefile
修改默认配置:
GDESTDIR = /var/www/html/ganglia2
APACHE_USER = apache
启动服务
sudo service httpd status
sudo service httpd start
sudo service gmetad status
sudo service gmetad restart
sudo service gmond status
sudo service gmond start
4、关闭SELinux
如果你跳过这一步,打开http://<server ip address>/ganglia2会出现以下异常:
There was an error collecting ganglia data (127.0.0.1:8652): fsockopen error: Permission denied
sudo sestatus
sudo setenforce 0
5、访问
http://<server ip address>/ganglia2/
目录“/ganglia2”可以在 ganglia-web的Makefile文件中GDESTDIR被修改,修改后需要重新编译
参考了
http://blog.csdn.net/xxd851116/article/details/21527055