Nagios is a popular open source computer system and network monitoring software application. It watches hosts and services, alerting users when things go wrong and again when they get better. Nagios was originally designed to run under Linux, but also runs well on other Unix variants. Nagios is free software licensed under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Operating System

Nagios 3.0.6

Installing prerequisites on your CentOS box.

yum install -y httpd gcc glibc glibc-common gd gd-devel php

Downloading & Installing nagios and its plugin:

Creating user

/usr/sbin/useradd -m nagios
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -G nagios,nagcmd nagios
/usr/sbin/usermod -G nagios,nagcmd apache

Assigning password for user nagios

passwd nagios

Downloading nagios

cd /usr/local/src/
tar -xzf nagios-3.0.6.tar.gz

Installing Nagios

cd /usr/local/src/nagios-3.0.6
./configure --prefix=/usr/local/nagios --with-command-group=nagcmd --enable-nanosleep --enable-event-broker
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf

Create a nagiosadmin account for logging into the Nagios web interface. Remember the password you assign to this account – you’ll need it later.

htpasswd -bc /usr/local/nagios/etc/htpasswd.users nagiosadmin urpassword

Installing nagios plugin

cd /usr/local/src
tar -xzf nagios-plugins-1.4.13.tar.gz
cd nagios-plugins-1.4.13
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make install

Restart Apache & nagios to take effect all the changes.

service httpd restart
service nagios start

Fireup your web browser and go to http://your_server_ip/nagios

Make sure your machine’s firewall rules are configured to allow access to the web server if you want to access the Nagios interface remotely.

Installing Nagios on CentOS
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recommend on Google