Download source from http://www.collectd.org/. A copy of collectd-4.9.1.tar.gz that this wiki is based..
Get
libstatgrab and libstatgrab-devel from the epel repository.
Install these from epel:
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--libdir=/usr/lib \
--mandir=/usr/share/man \
--disable-iptables
Check the output for missing dependency for the plugin that you needed.
Use –disable-iptables because of compile problem in CentOS 5.
You may add –enable-all-plugins .
make make install
Install init script:
cp contrib/redhat/init.d-collectd /etc/rc.d/init.d/collectd chmod 755 /etc/rc.d/init.d/collectd chown root:root /etc/rc.d/init.d/collectd chkconfig --add collectd chkconfig --level 2345 collectd on
Install these required perl modoules:
Install the web interface collection3:
cp -a contrib/collection3 /var/www/c3 chown -R root:root /var/www/c3
Add apache config file /etc/httpd/conf.d/collection3.conf:
# File: collection3.conf
# This configuration file maps the collection3 cgi for collectd RRD data graphing
Alias /c3/ /var/www/c3/
<Directory /var/www/c3>
AllowOverride all
DirectoryIndex index.cgi
</Directory>
Edit the config file /var/www/c3/etc/collection.conf, correct this line:
DataDir "/var/lib/collectd"
Access interface by:
http://<host_name>/c3/bin/