Installing Nagios 3.x
We are going to perform a Nagios installation starting from a Debian Etch installed without anything. With Nagios we will be able to monitor any equipment that has a snmp service installed and configured, although they can be monitored by other means that we will explain later.
The first thing we need to do is install Apache.
apt-get install apache2
We install the necessary build package
apt-get install build-essential
Now the necessary libraries for jpeg, png, and gd2
apt-get install libjpeg62 libjpeg62-dev libpng12-0 libpng12-dev libgd2-xpm-dev
we enter tmp
cd /tmp
and we download the gd2 library to install it
wget -c http://www.libgd.org/releases/gd-2.0.35.tar.gz
tar -xzvf gd-2.0.35.tar.gz
cd gd-2.0.35
./Set
Make
make install
We create the necessary users for nagios
useradd nagios
passwd nagios
The groups
groupadd nagios
groupadd nagcmd
and we add the users to their groups
usermod -G nagios nagios
usermod -G nagios elzalete
usermod -G nagcmd nagios
usermod -G nagcmd www-data
we go back to tmp
cd /tmp
and download Nagios and its plugins
WGET HTTP://tinyurl.com/2jyzao/nagios-3.0a5.tar.gz
WGET HTTP://tinyurl.com/2mqzzk/nagios-plugins-1.4.9.tar.gz
We extract Nagios
tar -xzf nagios-3.0a5.tar.gz
we enter the folder, we compile it and install it with all its modules
cd nagios-3.0a5
./Set –with-command-group=nagcmd
Make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
we return to tmp and now decompress the Nagios plugins
cd /tmp
tar -xzf nagios-plugins-1.4.9.tar.gz
We compile and install them just like Nagios
cd nagios-plugins-1.4.9
./configure -with-nagios-user=nagios –with-nagios-group=nagios
Make
make install
We install the following module for perl
perl -MCPAN -e “install Net::SNMP”
and postfix for sending notification emails
apt-get install postfix
We create access to our Nagios page
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
We restart apache
/etc/init.d/apache2 reload
We start Nagios
/etc/init.d/nagios start
We create a link so that Nagios starts automatically each time our server boots up
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
We access the web of our nagios server
To visualize the 3D we need a vrml browser and Java on the client
apt-get install vrweb











































