In this tutorial, we will show you how to install Munin on CentOS 6. For those of you who didn’t know, Munin is a free and open-source networked resource monitoring tool. It offers to monitor and alerting services for servers, switches, applications, and services. Munin uses the RRDtool Munin uses the RRDtool to present all the information in graphs through a web interface.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you the step-by-step installation of Munin on CentOS 6.
Prerequisites
- A server running one of the following operating systems: CentOS 6.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Munin on CentOS 6
Step 1. First, we need to add the EPEL repository to our system.
## RHEL/CentOS 6 64-Bit ## # wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm
## RHEL/CentOS 6 32-Bit ## # wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm
Step 2. Install Apache which is available from the CentOS repositories.
yum install httpd
Step 3. Install Munin packages.
yum --enablerepo=epel install munin munin-node rrdtool
Step 4. Configuring Apache webserver.
By default, Munin creates an Apache configuration file /etc/httpd/conf.d/munin.conf
. Edit Munin Apache configuration file and add the following content:
#nano /etc/httpd/conf.d/munin.conf
Alias /munin /var/www/html/munin <Directory /var/www/html/munin> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <directory /var/www/html/munin> AuthUserFile /etc/munin/munin-htpasswd AuthName "admin" AuthType Basic require valid-user ExpiresActive On ExpiresDefault M310 </directory> ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph
Step 5. Configuring the Munin server.
Edit the Munin configuration file and add/modify the following lines:
#nano /etc/munin/munin.conf
dbdir /var/lib/munin htmldir /var/www/html/munin logdir /var/log/munin rundir /var/run/munin tmpldir /etc/munin/templates includedir /etc/munin/conf.d graph_strategy cron cgiurl_graph /munin-cgi/munin-cgi-graph html_strategy cron [localhost] address 127.0.0.1 use_node_name yes
Create a password for the Munin administrator user:
htpasswd -c /etc/munin/munin-htpasswd admin
Step 6. Start Apache and Munin services.
service munin-node start service httpd start
If all is well, open Munin at http://your-domain.com/munin
using ‘admin’ as username and the previously generated Munin password as password and you will be able to access Munin graphs and data.
Congratulations! You have successfully installed Munin. Thanks for using this tutorial for installing Munin server monitoring on centos 6 systems. For additional help or useful information, we recommend you to check the official Munin website.