Installing Munin in CentOS/RedHat/Fedora
After adding the EPEL repository, the installation can be performed with a single command. Let's get started:
|
1
|
# yum --enablerepo=epel install munin munin-node rrdtool
|
If the command above does not work (which I doubt), then perform the installation not via the repository, but directly through the yum package manager:
|
1
|
# yum install munin munin-node -y
|
The installation itself will take, at most, about 5 minutes. We have installed it; now we need to configure the software.
Configuring Munin in CentOS/RedHat/Fedora
By default, Munin creates an Apache configuration file at /etc/httpd/conf.d/munin.conf. Therefore, we will now slightly edit the Munin configuration and add the following content to the config file:
|
1
|
# vim /etc/httpd/conf.d/munin.conf
|
At the very top, I inserted the following lines (immediately after the comments):
|
1
2
3
4
5
6
7
8
|
Alias /munin /var/www/html/munin
<Directory /var/www/html/munin>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
[...]
|
We need to fix one more configuration file:
|
1
|
# vim /etc/munin/munin.conf
|
Add/Modify as shown below.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
[...]
#Uncomment the following lines
dbdir /var/lib/munin
htmldir /var/www/html/munin
logdir /var/log/munin
rundir /var/run/munin
[...]
# a simple host tree. Set your system name
[your_server_name]
address 127.0.0.1
use_node_name yes
[...]
|
Save and close the file.
Set ownership for Munin using the following command:
|
1
|
# chown -R munin:munin /var/www/html/munin/
|
You can change the name for the web interface in the file (by default it says Munin), but I changed it to my own:
|
1
|
# vim /etc/httpd/conf.d/munin.conf
|
and specify:
|
1
2
3
4
5
6
7
8
9
10
11
12
|
<directory /var/www/html/munin>
AuthUserFile /etc/munin/munin-htpasswd
AuthName "munin_admin"
AuthType Basic
require valid-user
ExpiresActive On
ExpiresDefault M310
</directory>
ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph
[...]
|
Create a user (I named it munin_admin) and assign it a password. To do this, execute:
|
1
|
# htpasswd -cm /etc/munin/munin-htpasswd munin_admin
|
This is necessary so that we can log in to the web interface of the Munin program.
We are almost done. We need to restart the Apache service and start Munin itself (you can also optionally add the service to your OS's startup). To do this:
|
1
2
3
|
# /etc/init.d/munin-node start
# chkconfig munin-node on
# service httpd restart
|
