Nagios Server Installation

Instructions for basic configuration of a Nagios server for monitoring servers, routers, applications and more.

Prerequisites
Install the Apache web server.
Install the neccessary graphic libraries:

yum -y install libpng-devel libjpeg-devel gd-devel

Requires libtool?

yum -y install libtool

Nagios Base Installation
Create a nagios user and group for the program to run under:

adduser nagios

Create the installation directory:

mkdir /usr/local/nagios
chown nagios.nagios /usr/local/nagios

Add the command file group and add the Apache user to it (in our case, that user is "nobody"):

/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -G nagcmd nobody
/usr/sbin/usermod -G nagcmd nagios

Download the latest Nagios source code (3.2.1 at time of writing):

cd /extra/src
wget http://cdnetworks-us-2.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.1/nagios-3.2.1.tar.gz
tar zxvf nagios-3.2.1.tar.gz
cd nagios-3.2.1

Run the configure script:

./configure --with-command-group=nagcmd

Compile and install the binaries:

make all
make install
make install-commandmode

If you want to use the included init scripts, install them into /etc/rc.d/init.d:

make install-init

Initial Configuration
Install the sample configuration files:

make install-config

The sample files, installed in /usr/local/nagios/etc will work for getting Nagios started with just one change. Edit /usr/local/nagios/etc/objects/contacts.cfg and change the email address of the nagiosadmin contact.

Recent Updates

  • 2 years 2 days ago
  • 2 years 2 days ago
  • 2 years 4 days ago
    php 8.x
  • 2 years 5 days ago
    10.6.7
  • 2 years 1 week ago
    Drop Centos 5/6 stuff