Building and installing collectd from source on CentOS 5

Download source from http://www.collectd.org/. A copy of collectd-4.9.1.tar.gz that this wiki is based..

Dependency

Get libstatgrab and libstatgrab-devel from the epel repository.

Install these from epel:

  • rrdtool
  • rrdtool-devel
  • rrdtool-perl

Configure

./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 .

Building and install

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 the web interface

Install these required perl modoules:

  • Config::General
  • Regexp::Common
  • HTML::Entities

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/

collectd/building_and_installing_collectd_from_source_on_centos_5.txt · Last modified: 2011-05-05 15:12 by admin
Back to top
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0