Jump to content






Photo * * * * * 1 votes

From: Installing Nagios on RHEL 5

Posted by konstantine , in Applications and others 17 August 2010 · 8 views

Hello CC's

Many of my CC friend asked me the procedure of installing nagios!!!

I tried for that so have a look........

What is Nagios

An enterprise-class monitoring and alerting solution that provides organizations with extended insight of their IT infrastructure before problems affect critical business processes.

Requirements

We require following things for Installing Nagios:
These are Just Pre-requisites. We need them to other things work ...

1. Apache and PhP (php is optional)
2. gcc, glib, glibc-common, gd and gd-devel

I am performing this whole task on RHEL 5 and nagios core.


Installation

( A ) Installing/checking Dependencies
As we know we get these repositories already installed, so let's check whether they are installed or not!..

Its a major step so plesase don't skip this

Invoke the terminal and write these command one by one:

1 To Check Apache/Http
rpm -qa | grep httpd


2. To Check the Gcc
rpm -qa | grep gcc
rpm -qa | grep glibc glibc-common
rpm -qa | grep gd gd-devel

If everythings come ok lets move ahead...if not install the package using
yum install httpd
yum install glibc glibc-common
yum install gd gd-devel
yum install httpd

( B ) Create User And Groups

We need to create a user Nagios and put it to group Nadmin
useradd -m Nagios
passwd Nagios
"Set the password for the user Nagios"

groupadd Nadmin

/usr/sbin/usermod -a -G Nadmin Nagios

/usr/sbin/usermod -a -G Nadmin apache

Building And Installing Nagios

Everything set lets begin with installation heheh :D

1 Download Nagios tar using:

=> wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz

2 Untar it anywhere 

=> tar zxf nagios-3.2.0.tar.gz

3 Get into the directory

=> cd nagios-3.2.0

4 configure the nagios using this command

=> ./configure --with-command-group=Nadmin

5 Run Make commands to build up the files to install Nagios
 
=> make all

6 Then use make install to install the init scripts in directory /etc/rc.d/init.d

=> make install

7 Lets configure permission for holding external files 

=> make install-init

8 Install sample config files which can be found later in /usr/local/Nagios/etc

=> make install-config

9 This for commandmode installation

=> make install-commandmode
 
10 Set your Email Id using:

=> vi /usr/local/Nagios/etc/objects/contacts.cfg 

Installing Web Interface
After Nagios is Installed lets install the Web interface a key Utility

1 Install web interface

=> make install-webconf

2 Create web interface account. Using this we gonna login for management 

=> htpasswd -c /usr/local/Nagios/etc/htpasswd.users nagiosadmin
 
3 Done lets start Apache

=> /sbin/service httpd restart

As we are done with installing both Nagios and web interface we are yet not completed everything...

What we need now Nagios plugin :D, so lets begin with that :)

Installing and Configuring Nagios plugins

Download plugins by typing this command in the terminal

=> wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz

Untar the file

=> tar zxf nagios-plugins-1.4.14.tar.gz

Change directory:

=> cd nagios-plugins-1.4.14

Lets configure it :)

=> ./configure --with-nagios-user=Nagios --with-nagios-group=Nadmin

Again make the files for the installation process

=> make

Install the plugins

=> make install

This is the second part of the Nagios installation Process

Now, we need to start the nagios , hehehhe :D

Here is the process for the same :

To make the nagios utility to work automatically use this:

=> /sbin/chkconfig --add nagios

Turn the Nagios on :)

=> /sbin/chkconfig nagios on

We need a check config file that can work for for auto start of nagios. To do that use 

=> /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

done??
Now start the service

/sbin/service nagios start

So here we are done with the nagios installation and configuration ....

For the web interface :
type the following in the URL

http://localhost/nagios orr http://ip/nagios

I tried to write this tutorial as simple as a 2nd standard guy can configure it :D just a joke

any questions ??? let me know.....

regards,
Konstantine :D

Source: Installing Nagios on RHEL 5




Thanks for sharing....
Thanx for nice sharing
Great Job.
Thanks for Ur sharing.....
great Job there!!!... how about installing nagios on Linux MINT debian.

konstantine
Aug 23 2011 07:16 AM
sure :) I will install that for MINT too :))
hmmm
Please guide me how can add a url check in nagios?

konstantine
Mar 02 2012 10:34 PM

Jyde, on 27 January 2011 - 08:42 PM, said:

great Job there!!!... how about installing nagios on Linux MINT debian.

I do not have a MINT OS with me if you can provide me a ISO download link will try to help you out at best.

May 2012

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27 28 293031  

Recent Comments

Tags

    Search My Blog

    Organization

    Community

    Downloads

    Test Providers

    Site Info


    Go to top