Monday, February 28, 2011

Nagios installation & Configufration

First install all dependencies if not installed previously
gcc, make, autoconf, automake
gd, gd-devel, openssl, openssl-devel
postgresql, postgresql-devel
ntp, ntp-snmp


Now install Nagios as follows

#useradd nagios
#passwd nagios
#groupadd nagcmd
#usermod -G nagcmd nagios
#usermod -G nagcmd apache
#mkdir ~/downloads
#cd ~/downloads#wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0b3.tar.gz
#wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.7.tar.gz
#cd ~/downloads
#tar xzf nagios-3.0b3.tar.gz
#cd nagios-3.0b3
#./configure –with-command-group=nagcmd
#make all
#make install
#make install-init
#make install-config
#make install-commandmode
#make install-webconf
#cd ~/downloads
#tar xzf nagios-plugins-1.4.7.tar.gz
#cd nagios-plugins-1.4.7
#./configure --with-nagios-user=nagios –with-nagios-group=nagios
#make
#make install
#htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
#/etc/init.d/httpd restart
#/etc/init.d/nagios restart
#chkconfig nagios on

Now check this configuration using link given below
http://localhost/nagios
or
http://yourhostname/nagios

Now go to /usr/local/nagios and configure the corresponding file as per your requirement. For more detail go to nagios.org

No comments: