Install Munin on CentOS 5

1 Preliminary Note
Our system's hostname is, and we have a web site on it with the document root /var/www/

2 Enable The RPMforge Repository
On CentOS 5.2, munin and monit are not available in the default CentOS repositories. Fortunately we can install them from the RPMforge repository. To enable the RPMforge repository, we run

rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

rm -f rpmforge-release-0.3.6-1.el5.rf.i386.rpm

on i386 hosts and

rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

rm -f rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

on x86_64 hosts (please check out for the latest versions). 

3 Install And Configure munin

To install munin on CentOS 5.2, we do this:

yum install munin munin-node

Then we create the system startup links for munin and start it:

chkconfig –levels 235 munin-node on
/etc/init.d/munin-node start

Next, we must edit the munin configuration file /etc/munin/munin.conf. We want munin to put its output into the directory /var/www/, therefore we change the value of htmldir, and we want it to use the name instead of localhost.localdomain in the HTML output, therefore we replace localhost.localdomain with Without the comments, the changed file looks like this:

vi /etc/munin/munin.conf

dbdir /var/lib/munin
htmldir /var/www/
logdir /var/log/munin
rundir /var/run/munin

# Where to look for the HTML templates
tmpldir /etc/munin/templates
# a simple host tree
use_node_name yes

Next we create the directory /var/www/ and change its ownership to the user and group munin, otherwise munin cannot place its output in that directory. Then we restart munin:

mkdir -p /var/www/
chown munin:munin /var/www/
/etc/init.d/munin-node restart

Now wait a few minutes so that munin can produce its first output, and then go to in your browser, and you see the first statistics.