In this tutorial we will show you how to install and configuration Munin on CentOS 7. For those of you who didn’t know, Munin is one of the most powerful monitoring systems for dedicated servers and cloud enviroments. It allows you to monitor your server and network activity by providing useful graphics of your CPU, Memory, Disks, Network Devices and also running system services.
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 and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Munin Network Monitoring on an CentOS 7 server.
Install Munin on CentOS 7
Step 1. First we need to add EPEL repository in our system.
yum install epel-release
Step 2. Install LAMP (Linux, Apache, MariaDB, PHP) server.
A CentOS 7 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.
Step 3. Installing Munin Network Monitoring.
Let’s install Munin with yum:
yum install munin munin-node -y
Once the installation is complete, start its service and enable it at auto start during reboot by using the following commands:
systemctl enable munin-node
systemctl start munin-node
Step 4. Munin Configurations.
Now configure Munin by open its default configuration using any editor as used in below command:
Add the following lines:
The munin statistics are protected with a username and password (Apache basic auth). In the next step we add a new user and password to the /etc/munin/munin-htpasswd file:
htpassd /etc/munin/munin-htpasswd admin
Configure Munin node as a monitoring target:
Add the following lines at the end:
Step 5. Configuring Apache web server for Munin.
By default Munin creates Apache configuration file /etc/httpd/conf.d/munin.conf. Edit Munin Apache configuration file and add following content:
Add the following lines:
Deny from all
Allow from 127.0.0.1 22.214.171.124/24
Now, we can restart Apache web server so that the changes take place:
systemctl restart httpd
Step 6. Accessing Munin.
Munin will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/munin or http://server-ip/munin. Using ‘admin’ as username and the previously generated munin password as password and you will be able to access Munin graphs and data.
Congratulation’s! You have successfully installed Munin. Thanks for using this tutorial for installing Munin Network Monitoring on your CentOS 7 system. For additional help or useful information, we recommend you to check the official Munin web site.