Thursday, November 26, 2009

Installation of Nagios on Linux

Download the following packages

  • nagios-3.0.1.tar.gz
  • nagios-plugins-1.4.11.tar.gz

Verify the following installed packages:

      gcc-3.4.6-8
      compat-gcc-32-3.2.3-47.3
      libgcc-3.4.6-8
      compat-libgcc-296-2.96-132.7.2
      compat-gcc-32-c++-3.2.3-47.3
      gcc-c++-3.4.6-8
      gd-2.0.28-5.4E

Create user and group for Nagios

# useradd nagios
# passwd nagios
# groupadd nagcmd
# usermod -G nagcmd nagios
# usermod -G nagcmd apache
 

Installation of nagios

 # tar xvf nagios-3.0.1.tar.gz
 
# cd nagios-3.0.1
 
# ./configure --with-command-group=nagcmd   --with-cgiurl=/nagios/cgi-bin
 
# make all
 
# make install

# make install-init

# make install-config

# make install-commandmode

# make install-webconf

Installion of nagios plugins:

# 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

Add nagios to start at boot:

# chkconfig --add nagios

# chkconfig nagios on
 

Nagios User Authentication:

# htpasswd -c /usr/local/nagios/etc/htpasswd  nagiosadmin
 
Verify Nagios Configuration:
 
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Starting Nagios:

# /etc/init.d/nagios start

Login to web interface : http://localhost/nagios/



No comments:

Post a Comment

How to Change Mysql Data Directory

Here I am going to move my default mysql data directory (/var/lib/mysql on RHEL5) to a new directory /mysqldata. First, we mu...