Jan 152008

Part 2 of the four part installation procedure for Nagios involves the actual install of the Nagios Binaries itself. Here we cover the download, and installation of the latest stable version of Nagios.

If you jumped directly into this article, its worth having a look into the installation and configurations of the Nagios pre-requisites at the link below

1. Install and configure the pre-requisites

Nagios Version: Nagios 2.10 (at the time of writing this article)

Download Nagios

The latest stable version of Nagios can be downloaded from


Use wget to download

debian4r2:/software# wget http://dfn.dl.sourceforge.net/sourceforge/nagios/nagios-2.10.tar.gz

Untar and Unzip the downloaded file

debian4r2:/software/nagios-2.10# tar -zxvf nagios-2.10.tar.gz

Change Directory to the extracted nagios directory

debian4r2:/software/nagios-2.10# cd nagios-2.10

Run the configure script

# ./configure –with-nagios-user=nagios –with-nagios-group=nagios –with-command-group=nagcmd

This assumes default Nagios Root,CGI, HTML/Website locations.

If you would like to change any of these location then the following is the syntax

# ./configure –prefix=/usr/local/nagios –with-cgiurl=/nagios/cgi-bin –with-htmurl=/nagios/ –with-nagios-user=nagios –with-nagios-group=nagios –with-command-group=nagios


–prefix=/usr/local/nagios is the Nagios root folder  

–with-cgiurl=/nagios/cgi-bin is the Nagios CGI folder  

–with-htmurl=/nagios/ is the Nagios HTML/Website folder  

–with-nagios-user=nagios is the Nagios user  

–with-nagios-group=nagios is the Nagios group  

–with-command-group=nagios is the Nagios command group which has webserver user (Apache) and the nagios user as members.

If all went OK You should see something like the following:

General Options:  


        Nagios executable:  nagios  

        Nagios user/group:  nagios,nagios  

       Command user/group:  nagios,nagcmd  

            Embedded Perl:  no  

             Event Broker:  yes  

        Install ${prefix}:  /usr/local/nagios  

                Lock file:  ${prefix}/var/nagios.lock  

           Init directory:  /etc/init.d  

  Apache conf.d directory:  /etc/apache2/conf.d  

                  Host OS:  linux-gnu
 Web Interface Options:  


                 HTML URL:  http://localhost/nagios/  

                  CGI URL:  http://localhost/nagios/cgi-bin/  

 Traceroute (used by WAP):  /usr/sbin/traceroute
Review the options above for accuracy.  If they look okay,  

type 'make all' to compile the main program and CGIs.


Compile Nagios and the CGIs

debian4r2:/software/nagios-2.10# make all

Install the Nagios Binaries and HTML Files

debian4r2:/software/nagios-2.10# make install

Install the init-script to start Nagios at System startup

debian4r2:/software/nagios-2.10# make install-init

Install and configure permissions for the Commands directory for External Commands

debian4r2:/software/nagios-2.10# make install-commandmode

If you want the sample configs installed then run

debian4r2:/software/nagios-2.10# make install-config

Now that the binaries are installed. The next step would be to install the Nagios default plugins. This will get you started with a set of common checks that can be used to check hosts. Follow the rest of the steps to complete the nagios installation.

Step3. Install Nagios Plugins

Step4. Setup web interface and CGI Authentication

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>