Ganglia on centos
yum installgcc gcc-c++ libpng freetype zlib libdbi apr.* apr-util ibxml2-devel pkg-config glib pixman pango pango-devel freetye-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-devel autoconf automake expat-devel libconfuse-devel rrdtool rrdtool-devel apr-develpcre pcre-devel
download libconfuse-2.6-3.el6.x86_64.rpmlibconfuse-devel2.6-3.el6.x86_64.rpm
http://rpm.pbone.net/index.php3/stat/4/idpl/15298973/dir/
[root@localhost usr]# yum install libconfuse-devel-2.6-3.el6.x86_64.rpm
[root@localhost usr]# yum install libconfuse-2.6-3.el6.x86_64.rpm
Download and compile ganglia
wget http://sourceforge.net/projects/ganglia/files/latest/download?source=files
[root@localhost usr]# tar -vxf ganglia-3.5.0.tar.gz
[root@localhost usr]#cd ganglia-3.5.0
[root@localhost ganglia-3.5.0]# ./configure --sysconfdir=/etc/ganglia/ --sbindir=/usr/sbin/ --with-gmetad --enable-static-build
[root@localhost ganglia-3.5.0]# make
[root@localhost ganglia-3.5.0]# make install
[root@localhost ganglia-3.5.0]# gmond --default_config > /etc/ganglia/gmond.conf
Open the configuration file in an editor
[root@localhost ganglia-3.5.0]# vi /etc/ganglia/gmond.conf
cluster {
name = "test"
owner = "test group"
latlong = "unspecified"
url = "unspecified"
}
Copy the init script and start the gmond service
[root@localhost gmond]# cp gmond.init /etc/init.d/gmond
[root@localhost gmond]# service gmond start
[root@localhost gmond]# service gmond status
gmond (pid 11376) is running...
[root@localhost gmond]# chkconfig gmond on
Now create rrd directory, change permissions, copy the gmetad init script and open it in an editor of choice
[root@localhost gmond]# mkdir -p /var/lib/ganglia/rrds/
[root@localhost gmond]# chown nobody:nobody /var/lib/ganglia/rrds/
[root@localhost gmetad]# cp gmetad.init /etc/init.d/gmetad
[root@localhost gmetad]# service gmetad start
Starting GANGLIA gmetad:[OK]
[root@localhost gmetad]# service gmetad status
gmetad (pid 11486) is running...
[root@localhost gmetad]#
[root@localhost gmetad]# chkconfig gmetad on
To install the web interface, install the prerequisites
[root@localhost gmetad]# yum install httpd php
Download the web interface, untar it, move it to the document root of the web server and finally run make install
# wget http://sourceforge.net/projects/ganglia/files/ganglia-web/3.5.7/ganglia-web-3.5.7.tar.gz/download
[root@localhost usr]# tar -vxf ganglia-web-3.5.7.tar.gz
[root@localhost usr]# mv ganglia-web-3.5.7 /var/www/html/ganglia
[root@localhost ganglia]# cd /var/www/html/ganglia/
[root@localhost html]# make install
[root@localhost html]# service httpd start
[root@localhost html]# service iptables stop
[root@localhost html]# setenforce 0
http://192.168.160.145/ganglia/