Install Nagios in the LINUX server

The following article will help you to install nagios in the LINUX server.

Installing Nagios on Linux


1. Apache is already installed in /usr/local/apache2
2. Default server is test.example

Installing Nagios:

1. Download tar ball from extract it
2. Go to the extracted directory and give following commands:
# ./configure –prefix=/usr/local/nagios
# make all
##### create nagios user and group###
# groupadd nagios
# adduser -g nagios nagios
# passwd nagios ——-> set passwd to nagios
##### Give following cmds ###
# make install
# make install-init
# make install-commandmode
# make install-config
3. Create dir nagios in your documentroot of http server. For example: your docroot
is /var/www/html then create diirectory

mkdir /var/www/html/nagios
11. Change owner and group to nagios:nagios
chown nagios:nagios
12. cp -ap /usr/local/nagios/share/* /var/www/html/nagios
13. Now check in your browser http://localhost/nagios
14. remove “sample” from filenames of all configuration files which are under

15. open /usr/local/nagios/etc/cgi.cfg and replace following line
physical_html_path=/usr/local/nagios/share ———-> to ——–>
use_authentication=1 ——-> to ———> use-authentication=0
16. mkdir /var/www/html/nagios/cgi-bin
17. chown nagios:nagios /var/www/html/nagios/cgi-bin
18. cp -ap /usr/local/nagios/sbin/* /var/www/html/nagios/cgi-bin
19. in httpd.conf add following line:

ScriptAlias /nagios/cgi-bin/ “/var/www/html/nagios/cgi-bin/” ——> PLEASE DO NOT
FORGET to GIVE “/” in the END.
20. Restart Apache
21. Start nagios deamon
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg ——> (For testing conf)

/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg -d &

22. Check nagios is started or not

ps -ef|grep nagios

23. Check again in your browser http://localhost/nagios and try clicking on different “menus in side
bar.” It should show you some status.

23. Installing nagios plugins –>

24. untar nagios-plugins tarball.
25. go to that directory and execute following commands:

./configure –prefix=/usr/local/nagios/
make install

26. It will install nagios-plugins in following dir : /usr/local/nagios/libexec/

27. For refreshing nagios deamon:

killall -HUP /usr/local/nagios/bin/nagios

Hope the above article will help you while installing nagios in the LINUX server.


  1. Leave a comment

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: