I am trying to install and setup Nagios 4.0.8 on my Ubuntu 14.04 LTS server. What is the ideal way to do this ? The official Ubuntu documentation regarding nagios installation is related to nagios version 3.x and is available here. However, I want to install the latest stable release which is nagios 4.0.8. Please help.


Open your terminal and type these commands and run these commands as root user

sudo apt-get install wget build-essential apache2 php5-gd libgd2-xpm libgd2-xpm-dev libapache2-mod-php5

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz

useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios

./configure --with-nagios-group=nagios --with-command-group=nagcmd -–with-mail=/usr/bin/sendmail

make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios start

htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin

cd /tmp/nagios-plugins-2.0
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make install 

ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

and finally open this link in your browser


Note: If you just google , you can find this document very easily


I thought I have helped you enough.

Let me know if any issue.

Jai Hind.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.