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:
[email protected]:/# apt-get install nagios*
This command will install all packages needed by nagios to work properly.
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.
NOTE: This is the username and password you will use to log in to your nagios installation after configuration is complete.
Next, nagios will configure ndoutils-nagios3-mysql. Select YES here, Then provide password of the database’s administrative user.
Then, provide a password for ndoutils-mysql to register with the database server.
Step3. Configure Nagios Virtual Host for apache.
By default, on Debian Nagios creates a config located in /etc/apache2/conf.d directory called
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.
[email protected]:# /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.
Enjoy your Nagios now!