1.First of all, to download www.nagios.org
nagios-3.0.2.tar.gz
nagios-plugins-1.4.12.tar.gz
2.Needed for the installation of the Treasury
apt-get install apache2 php5-gd build-essential libgd2-xpm-dev php5 mysql-server libmysqlclient15-dev libssl-dev perl
3.useradd nagios
passwd nagios
groupadd nagcmd
usermod -G nagcmd nagios
usermod -G nagcmd www-data
4.tar zxvf nagios-3.0.2.tar.gz
cd nagios-3.0.2
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
vi /usr/local/nagios/etc/objects/contacts.cfg
make install-webconf
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
/etc/init.d/apache2 reload
5.tar zxvf nagios-plugins-1.4.12.tar.gz
cd nagios-plugins-1.4.12
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios start
apt-get install mailx
6.Http://localhost/nagios visit to open IE