Nagios (installation and configuration) Part #2



And Yet Another Weekend Post! (YAWP)


After we have been asked to continue writing about Nagios we decided to do so.
In this article, we will learn a lot about installation and configuration aspect of Nagios. If you still don't know what the #Nagios is, please read the first part first.


Before we jump into the installation part, there are some specific prerequisites which you have to fulfill.


Step (1)– Pre-requisites

Go to this URL -



 Here, you can have to click on i386 and you will be redirected to the following page.




Here you  see “epel-release-6-8.noarch.rpm”, now open the terminal and copy the location of the link in the terminal. This is the way how you can download the repository on your system. Then, you are done with the first step that was pre-requisites. Let us move to the second step now.




Step (2) – Installing Nagios, Nagios Plugins, and NRPE

Issue the following command on the terminal to install, Nagios plug-ins and NRPE (Nagios Resource Plug-in Executor), Apache and PHP. Apache is needed to monitor the recent web server status and PHP is required to process the dynamic content on your website.






In the next step, you should enable the Apache server with ‘chkconfig’ command as shown below in the screenshot. And once it is enabled start the Nagios and the Apache server with the ‘service’ command given below.





Now create the swap file and make minimum 1 GB space free with the ‘dd’ command as given below –





With the swap file, you can free up necessary space and shift it somewhere else to the hard drive. You can use “mkwsap” command to create the swap partitions and prepare the remote host for a swap area. The last command should be written like this as shown below




With the above command, only a temporary swap file is created. You can make the swap area permanent by adding it to the fstab file.