Below applications are needed to install Nagios Server.
1. Apache with php
2. Nagios source file.
3. Nagios Plugin
4. Nrpe
5. Nconf for configuring the nagios graphically.For Apache and php installtion see below links.

/Nagios Installation

1. Create group nagios

 #groupadd -g 1001 nagios 

2. Create user id nagios with group nagios

 #useradd -u 1001 -g 1001 -c "Nagios Monitoring Tool" -d /home/nagios -s /bin/bash nagios   ## 1001 is an example of uid and gid .
#mkdir /home/nagios
#chown -R nagios:nagios /home/nagios
#passwd nagios
#su - nagios
#mkdir downloads 

3. Download the source code tarballs of both Nagios and the Nagios plugins (visit

4. Extract the tar file and begin instillation with the below parameter.

  #./configure --prefix=/home/nagios/nagios-server --with-command-group=nagios --with-httpd-conf=/home/nagios/apache/conf
#make all
#make install
#make install-config
#make install-commandmode
# make install-webconf
#make install-init 

5. Now install apache utils and set password for nagios

 #apt-get install apache-utils xinetd
#htpasswd2 -c /home/nagios/nagios-server/etc/htpasswd.users nagiosadmin 

6. Install nagios plugin with the below parameters.

#tar -xzf nagios-plugins-1.4.15.tar.gz
#cd nagios-plugins-1.4.15
# ./configure --prefix=/home/nagios/nagios-server --with-nagios-user=nagios --with-nagios-group=nagios
#make install 

> 7. Check the Nagios configuration by the below command

#/home/nagios/nagios-server/bin/nagios -v /home/nagios/nagios-server/etc/nagios.cfg 

> 8.Add below line in httpd.conf

Include conf/nagios.conf 

9. NRPE installation

#tar -xvf nrpe-2.12.tar.gz
#cd nrpe-2.12
#./configure --prefix=/home/nagios/nagios-server 

Note : Here if the command fails for ssl libraries install the reqd ones and check that there is a link in /usr/lib for the libssl….version file as in this link.

#make all
#make install-plugin
#make install-daemon
#make install-daemon-config

As root do

 make install-xinetd 

10. Edit the /etc/xinetd.d/nrpe file and add the IP address of the monitoring server to the only_from directive.

only_from = <nagios_server_ip_address> 

11. Add the following entry for the NRPE daemon to the /etc/services file.

 5666/tcp # NRPE 

12. If xinetd not installed in the server, install it and then restart the xinetd process

 #/etc/init.d/xinetd restart 

13. Add entries in nrpe.conf to monitor the services using nrpe plugin

#su - nagios
#vi /home/nagios/nagios-server/etc/nrpe.cfg
command[check_disk]=/home/nagios/nagios/libexec/check_disk -w 10% -c 5% -p / -p /home -u GB

command[check_mailq]=/home/nagios/nagios/libexec/check_mailq -w 5 -c 10 -M sendmail

command[check_log]=/home/nagios/nagios/libexec/check_log -F /var/log/messages -O /home/nagios/nagios/check_var_log_messages.old -q ERROR 

14. As root restart the xinetd process after making these changes.

 #/etc/init.d/xinetd restart 

15. Now restart nagios

code language=”bash”] #/etc/init.d/nagios start [/code]

16. Browse Nagios Server


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s