How to Install Nagios on Debian – Guide With Screenshots

Valic —  February 18, 2013 — 3 Comments

Nagios is a free service monitoring system, that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.
In this tutorial I will show you how to install Nagios on Debian 6. For this, I will use a fresh installed Debian 6 with minimalistic packages.

Step1. Install Nagios packages:

By default, Nagios packages are already included in Debian 6 main repository. To install them run this command:

root@nagios:/# apt-get install nagios*

This command will install all packages needed by nagios to work properly.

nagios-install

Step2. Now you will be presented with the question that you need to fill in the information required:

You will be asked first to enter the password for Admin. Choose a strong password and confirm it.

nagio-password

NOTE: This is the username and password you will use to log in to your nagios  installation after configuration is complete.

nagios-webadminpass

Next, nagios will configure ndoutils-nagios3-mysql. Select YES here, Then provide password of the database’s administrative user.

nagios-yes

nagios-passdatabase

Then, provide a password for ndoutils-mysql to register with the database server.

ndoutils-mysql

Step3. Configure Nagios Virtual Host for apache.

By default, on Debian Nagios creates a config located in /etc/apache2/conf.d directory called nagios3.conf.
If this file is not created automatically, you need to create a softlink for the nagios apache config into apache2 config file using this command:

ln -s /etc/nagios3/apache2.conf /etc/apache2/sites-enabled/nagios3.conf

Now restart apache server to activate a new configuration.

root@nagios:# /etc/init.d/apache2 restart

Step4.Test Nagios installation. Verify it can be accessable via web browser.

Access your nagios using the url http://localhost/nagios3/ and give the username and password you set during installation.

NOTE: default nagios username is nagiosadmin.

nagios-login nagios-page

Enjoy your Nagios now!

Valic

Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

3 responses to How to Install Nagios on Debian – Guide With Screenshots

  1. Crius Technologies Ltd March 12, 2013 at 15:52

    very useful and in detailed screenshots. thanks

  2. Hi i did the steps but when i start nagios I see: Cannot open main configuration file ‘/root/start’ for reading!, any suggestion? Best regards, im google in right know :)

  3. Please refollow the giude steps. You will get it right

Leave a Reply