/**************************** System requirement ******** ************/
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
Linux entry 2.6.38-8-server # 42-ubuntu SMP Mon Apr 11 03:49:04 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Author yellia
Datetime 2012-03-15
/**************************** System requirement ******** ************/
/******************* Install dependencies ***************** ***********/
Apt-Get install apache2
Apt-Get install libapache2-mod-php5
Apt-Get install build-essential
Apt-Get install libgd2-xpm-dev
/******************* install Nagios *************** *******************/
useradd-m-S/bin/bash Nagios
passwd Nagios
groupadd nagcmd
usermod-a-g nagcmd Nagios
usermod-a-g nagcmd www-data
tar xzvf nagios-3.3.1.tar.gz
Cd Nagios/
. /configure -- With-command-group = nagcmd
make all
SED-I's: For file in between des/RSS /\*;: for file in between des/RSS /\*. \ *;: G '. /html/makefile
SED-I's: For file in between des/RSS/extlib/\ *;: For file in between des/RSS/extlib /\*. \ *;: G '. /html/makefile
make install-init
make install-config
make install-commandmode
Vim/usr/local/Nagios /etc/objects/contacts. CFG
make instal-webconf
htpasswd-C/usr/local/Nagios/etc // htpassswd. users nagiosadmin
/etc/init. d/apache2 reload
/*************************** Install Nagios plugins ******** ************/
Tar xzvf nagios-plugins-1.4.15.tar.gz
CD nagios-plugins-1.4.15/
./Configure -- With-Nagios-user = Nagios -- With-Nagios-group = Nagios
Make
Make install
/*************************** Install Nagios SNMP-plugins ****** *********/
Perl-mcpan-e Shell
CPAN> install net: SNMP
Mkdir/tmp/Nagios
Chmod 777 Nagios
Tar xzvf nagios-snmp-plugins.1.1.1.tgz
CD nagios_plugins/
./Install. Sh
/**************************** Install Nagios init. d *********************/
Ln-S/etc/init. d/Nagios/etc/RCs. d/s99nagios
/Etc/init. d/Nagios restart