Notes:
- The instructions were created using CentOS 6.2 OS
- Ganglia is made up of few components: gmetad, gmond and web UI
- The Server includes all 3 components but the Client only includes gmond
- These steps are for both Server and Clients. At times the instructions splits to Server and Client. If a step doesn’t include Server or Client then you can assume that the steps is for both Server and Client install.
- Selinux: Either disable it or make appropriate changes to allow the install to go through and the application will be able to listen on appropriate ports.To stop selinux permanently modify
/etc/sysconfig/selinux
and changeselinux
todisabled
. - IPTables: Same as Selinux. Disable it or allow ports through.Use the following commands to disable IPTables:
service iptables stop;
chkconfig iptables off;
chkconfig --list iptables;
iptables -F
service iptables save
Installing Dependencies:
- Server Components
- Use Yum to install the following packages:
- httpd.x86_64
- httpd-devel.x86_64
- php.x86_64
- php-cli.x86_64
- php-devel.x86_64
- php-gd.x86_64
- php-mysql.x86_64
- php-pear.noarch
- rrdtool-php.x86_64
- rrdtool-devel.x86_64
- rrdtool.x86_64
- rrdtool-perl.x86_64
- glibc.x86_64
- glib2-devel.x86_64
- glibc-devel.x86_64
- glib2.x86_64
- glibc-utils.x86_64
- glibc-common.x86_64
- gcc.x86_64
- gcc-c++.x86_64
- libgcc.x86_64
- compat-gcc-34.x86_64
- pcre.x86_64
- pcre-devel.x86_64
- python.x86_64
- rrdtool-python.x86_64
yum install httpd.x86_64 httpd-devel.x86_64 php.x86_64 php-cli.x86_64 php-devel.x86_64 php-gd.x86_64 php-mysql.x86_64 php-pear.noarch rrdtool-php.x86_64 rrdtool-devel.x86_64 rrdtool.x86_64 rrdtool-perl.x86_64 glibc.x86_64 glib2-devel.x86_64 glibc-devel.x86_64 glib2.x86_64 glibc-utils.x86_64 glibc-common.x86_64 gcc.x86_64 gcc-c++.x86_64 libgcc.x86_64 compat-gcc-34.x86_64 pcre.x86_64 pcre-devel.x86_64 python.x86_64 rrdtool-python.x86_64
- Use Yum to install the following packages:
- Client Components
- Use Yum to install the following packages:
- glibc.x86_64
- glib2-devel.x86_64
- glibc-devel.x86_64
- glib2.x86_64
- glibc-utils.x86_64
- gcc-c++.x86_64
- compat-gcc-34.x86_64
- pcre.x86_64
- pcre-devel.x86_64
- python.x86_64
- expat.x86_64
- expat-devel.x86_64
- apr.x86_64
- apr-util.x86_64
- apr-devel.x86_64
- apr-util-devel.x86_64
- gcc.x86_64
- libgcc.x86_64
- gcc-objc.x86_64
yum install glibc.x86_64 glib2-devel.x86_64 glibc-devel.x86_64 glib2.x86_64 glibc-utils.x86_64 gcc-c++.x86_64 compat-gcc-34.x86_64 pcre.x86_64 pcre-devel.x86_64 python.x86_64 expat.x86_64 expat-devel.x86_64 apr.x86_64 apr-util.x86_64 apr-devel.x86_64 apr-util-devel.x86_64 gcc.x86_64 libgcc.x86_64 gcc-objc.x86_64
- Use Yum to install the following packages:
- Install libconfuse RPMS:
rpm --ivh libconfuse--2.6-2.el6.rf.x86_64.rpm libconfuse--devel--2.6-2.el6.rf.x86_64.rpm
- Decompress Ganglia gz file to /opt directory:
tar --xzvf ganglia-3.5.0.tar.gz -C /opt
- Change directory to /opt and rename ganglia-3.5.0 to ganglia:
cd /opt; mv ganglia-3.5.0 ganglia; cd ganglia;
- Run Configure command:
- Server (with gmetad):
./configure --with-libpcre=no --with-gmetad
- Client:
./configure --with-libpcre=no
- Server (with gmetad):
- Run make and make install
make
make install
- (Server) Create RRD directory. Note that we run ganglia as nobody so here we change the ownership to nobody user.
mkdir -p /var/lib/ganglia/rrds;chown -R nobody /var/lib/ganglia/rrds;
- Create /etc/ganglia directory
mkdir -p /etc/ganglia
- Create default configuration.
gmond --default_config > /etc/ganglia/gmond.conf
- Create symbolic link from default location ganglia looks for configuration to /etc/ganglia. This is because its easier to manage all configuration files in the same place.
ln -s /etc/ganglia/gmond.conf /usr/local/etc/gmond.conf;
- Change
/etc/ganglia/gmond.conf
to have desired metrics and port number. Note that each cluster/group must have its own unique port number. The default is 8649. - Change the init file to point to correct binary:
vi /opt/ganglia/gmond/gmond.init
changeGMOND
to/usr/local/sbin/gmond
. - Copy gmond.init to the init.d directory and add to start up:
cp /opt/ganglia/gmond/gmond.init /etc/rc.d/init.d/gmond;
chkconfig --add gmond;
chkconfig --list gmond;
- If this is a new installation then you can find the default gmetad.conf file in gmetad directory where you installed ganglia. In this case it would be
/opt/ganglia/gmetad/gmetad.conf
. Copy this file to/etc/ganglia/gmetad.conf
.cp /opt/ganglia/gmetad/gmetad.conf /etc/ganglia/gmetad.conf
- Create a symbolic link in
/usr/local/etc
to the file you just copied:ln -s /etc/ganglia/gmetad.conf /usr/local/etc/gmetad.conf;
- Modify gmetad.conf and include all the clusters you wish to include in this installation.
- Change the init file to point to correct binary:
vi /opt/ganglia/gmetad/gmetad.init
changeGMETAD
to/usr/local/sbin/gmetad
. - Copy gmetad.init to the init.d directory and add to start up:
cp /opt/ganglia/gmetad/gmetad.init /etc/rc.d/init.d/gmetad;
chkconfig --add gmetad;
chkconfig --list gmetad;
- Decompress Ganglia Web gz file to /usr/share directory:
tar --xvzf ganglia--web-3.5.7.tar.gz <del>C /usr/share
- Change directory to /usr/share and rename gangliaweb-3.5.7 to ganglia
cd /usr/share;<br />mv ganglia-web-3.5.7 ganglia;
- There are two directories required for dwoo module. Create them and change their ownership/permission as stated below:
mkdir /usr/share/ganglia/dwoo/compiled
mkdir /usr/share/ganglia/dwoo/cache
chown -R 1000:1000 *
chmod -R 777 *
- Set correct path for where ganglia conf directory is:
vi /usr/share/ganglia/conf_default.php
Change $conf[‘gweb_confdir’] to the web folder. e.g.$conf['gweb_confdir'] = "/usr/share/ganglia";
- Add Ganglia web folder to Apache HTTPD:
- Create a new conf file in /etc/httpd/conf.d
vi /etc/httpd/conf.d/ganglia.conf
The following is a sample you can use:<location /ganglia> Order deny,allow Allow from all </location>
- Create a new conf file in /etc/httpd/conf.d
- Start gmetad service
service gmetad start
Check /var/log/messages.log to make sure there aren’t any errors. - Start GMETAD service
service gmond start
Check /var/log/messages.log to make sure there aren’t any errors. - Restart HTTPD service
service httpd restart