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.
1 Answer
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
make install
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
and finally open this link in your browser
http://<your.nagios.server.ip>/nagios
Note: If you just google , you can find this document very easily
http://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf
I thought I have helped you enough.
Let me know if any issue.
Jai Hind.
-
I did come across this guide. But on Ubuntu 14.04, I ran into a few issues while trying to follow the given steps. I was able to get it up and running after referring sharadchhetri.com/2014/08/25/… and sysads.co.uk/2014/08/install-nagios-core-4-0-8-ubuntu-14-04 in addition to the link you have mentioned. Nov 26, 2014 at 12:43
-