Main Content

Install Munin In Five Minutes On Ubuntu 10.04

Not knowing what is going on a server can be a recipe for disaster. That’s why I use Munin a networked resource monitoring tool that is both simple to install and understand. Munin graphs server performance over time, administrators can later use this information to make an informed decision about when to add more resources.

From The Munin Site:

Munin is a networked resource monitoring tool that can help analyze resource trends and “what just happened to kill our performance?” problems. It is designed to be very plug and play. A default installation provides a lot of graphs with almost no work.

Note: You will need Root privileges

Why guess when the right tools are available.


To start this tutorial you will need a web server, both Lighttpd and Apache will do the job. For this tutorial I will use Lighttpd which is available from the Ubuntu Repositories.

sudo aptitude install lighttpd

You will also need PHP installed on the system.

sudo aptitude install php5-cgi

Since Munin will be running on only one system we will need the master and client installed on the same system.

sudo aptitude install munin munin-node


When the installation in complete, open the Munin configuration file with your text editor of choice. Change the htmldir path from /var/cache/munin/www to /var/www/munin.

sudo nano /etc/munin/munin.conf
dbdir   /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir  /var/run/munin

New Path.

htmldir /var/www/munin

When Munin is installed in Ubuntu 10.04 the htmldir path changes for some reason. To have a functional installation we had to change the path on the configuration file, now we need to move the Munin directory out of /var/cache/munin/www into /var/www/munin with the help of the mv command.

sudo mv /var/cache/munin/www/ /var/www/munin

Assign the Munin directory to the Munin user and group by using chown.

sudo chown munin.munin -R /var/www/munin

And now you can start Munin.

sudo /etc/init.d/munin-node start

Munin can be accessed by pointing the web browser to:

Remember that it will take a long time for Munin to display any meaningful information, be patient.


Munin Home Page


  1. Commented on
    Comment by Hardik Dalwadi


    It is as easy as reading :). Thanks. Bdw, there is typo.

    sudo aptitude installl munin munin-node

    I know you will find it 😉

  2. Commented on
    Comment by Luis Ventura

    Hardik Dalwadi thank you for pointing out the typo.

  3. Commented on
    Comment by cimah

    i have a problem, at the end i have an error,

    sudo /etc/init.d/munin-mode start
    sudo: /etc/init.d/munin-mode: command not found

    whats wrong????

    1. Commented on
      Comment by Luis Ventura

      comah@ let me apologize munin-mode is a typo, the correct command is sudo /etc/init.d/munin-node start

      Did you assign the Munin directory to the Munin user, have you restarted the service ?

  4. Commented on
    Comment by cimah

    sorry, i found the error, now i know what is a “typo”

    but i have another error, i cant open the munin page,
    i write my ip:
    and the browser says:

    Not Found

    The requested URL /munin was not found on this server.
    Apache/2.2.14 (Ubuntu) Server at localhost Port 80

  5. Commented on
    Comment by papy

    just my 0.02€ :

    if you use apache2 then install munin, it creates a link /etc/apache2/conf.d/munin to /etc/munin/apache.conf
    in which you have an alias which makes /var/www/munin pointing to /var/cache/munin/www

    so accessing via your browser to http://yourmachine/munin just works, without having to mv the htmldir /var/cache/munin/www to /var/www/munin

    *But* you need to modify the /etc/munin/apache.conf so that it accepts requests :
    Allow from localhost ::1

    can be changed to

    Allow from all

    (or something more restrictive)
    otherwise you will have a 403 : access denied

    hope it helps

  6. Commented on
    Comment by Day Barr

    You don’t need to sudo aptitude install php5-cgi. munin is written in perl, any missing dependencies will be worked out and installed when you sudo aptitude installl munin munin-node

  7. Commented on
    Comment by Sn3akyP3t3

    In my experience with this tutorial only two problems were encountered. I had to add in the /etc/apache2/apache2.conf file the statement:
    Include /etc/apache2/conf.d/munin

    I also had to manually edit within the /etc/apache2/conf.d/munin file to change this:
    Alias /munin /var/cache/munin/www

    to this:
    Alias /munin /var/www/munin

    Otherwise, everything else was as advertised. Quick tutorial with no fluff! Thanks.

  8. Commented on
    Comment by Yannick Warnier

    Moving a directory set by an official package is considered very bad practice: you break the packaging, which will prevent it to be uninstalled or upgraded correctly, so it is something you just don’t do if you have more than one server and don’t want to spend your life maintaining them while you could be out there in the sun.

    Instead, as suggested by papy, enjoy the pre-packaging of apache and configure lighttpd quickly so it can find the munin directory where it is instead of looking for it elsewhere:
    $ sudo vim /etc/lighttpd/lighttpd.conf

    $HTTP[“remoteip”] =~ “” {
    alias.url += (
    “/munin/” => “/var/cache/munin/www/”,

    Reload lighttpd: $ sudo service lighttpd force-reload
    Then load http://localhost/munin/ and you’re done.

    That’s if you want to use lighttpd of course, because if you use Apache (heavier), you’re ready faster (on Ubuntu 10.04).

  9. Commented on
    Comment by ck

    Thanks Munin installation working in 7 minutes

  10. Commented on
    Comment by Alberto Drago

    Thank’s to Sn3akyP3t3!
    The suggested fix works

    Alberto Drago

  11. Commented on
    Comment by Ryv

    Great post – very useful. Thanks.

  12. Commented on
    Comment by Steve

    Very useful. I don’t know why but I’ve always struggled when setting up munin. This helped me jump through the hoops and got me going in about 10 mins. Cheers 🙂

  13. Commented on
    Comment by Oscar Huanca

    Efectivamente Sn3akyP3t3 tiene razon, también falta reiniciar el servicio o reiniciar el equipo. “sudo init 6”.

Comments are closed.