Tuesday, November 6, 2012

How to install nagios in ubuntu


How to install nagios in ubuntu

Nagios: Nagios is an open source application that monitors for computer network problems so that they can be fixed more quickly. Nagios was designed for use with the linux operating system, but it will also work under unix and most Unix-based systems. It is difficult to understand but very good tools to monitor the network and servers

#apt-get install apache2
#apt-get install libapache2-mob-php5
#apt-get install build-essentail
#apt-get install libgd2-xpm-dev

here create a user named nagios
#useradd -m -s /bin/bash nagios
#passwd nagios

#/usr/sbin/groupadd nagcmd
#/usr/sbin/usermod -a -G nagcmd nagios
#/usr/sbin/usermod -a -G nagcmd www-data
After this download the nagios from the nagios site
#wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz

#wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz
#ls
#tar xvf nagios-3.2.3.tar.gz
#cd nagios-3.2.3
#./configure –with-command-group=nagcmd
#make all
#make install
#make install init
#make install-config
#make install-commandmode
here we will edit a file and palce the emailid of ours
#vi /usr/local/nagios/etc/objects/contacts.cfg
here we will install nagios web config with apache
#make install-webconf
create a nagios login password
#htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
here restart the apache
#ls
tar xvf nagios-plugins-1.4.11.tar.gz
#cd nagios-plugins-1.4.11
#./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

here we will restart the nagios
#/etc/init.d/nagios restart
after this go to browser and type http://localhost/nagios
username: nagiosadmin
password: which u given?
for more details click here

No comments:

Post a Comment