Thursday, 24 July 2014

Steps to configure Nagios & SNMP on CentOS 6.3



Steps to configure Nagios on CentOS

Command to configure required packages:
# yum install httpd gcc glibc glibc-common gd gd-deve1 php
# yum -y install net-snmp-utils
# yum -y install wget

Command to create and setup a User and Group for Nagios:
# useradd -m nagios
# groupadd nagcmd

Commands to add Nagios User and Apache User to Nagios Group:
# usermod -a -G nagcmd nagios
# usermod -a -G nagcmd apache

Command to create directory for Nagios download:
# mkdir /etc/downloads

Commands to download Setup and Plugin files for Nagios:

Commands to extract .tar.gz file which we have downloaded:
# tar xzf nagios-3.2.3.tar.gz
# tar xzf nagios-plugins-2.0.tar.gz

Commands to configure and compile Nagios:
# cd nagios-3.2.3
# ./configure –with-command-group=nagcmd
# make all
# make install
# make install-init
# make install-config
# make install-commandmode
# make install-webconf

Commands to configure Apache:
# htpasswd -c /usr/local/nagios/etc/htpasswd.users admin
# service httpd restart

Commands to install Nagios Plugin files:
# ./configure –with-nagios-user=nagios –with-nagios-group=nagios
# make
# make install

Steps to configure NET-SNMP on CentOS 6.3
# yum install net-snmp-utils
# yum install net-snmp
# cd /etc/snmp
# vi smpd.conf
Change group name
# service snmp restart
# chkconfig snmpd on
# snmpwalk -v 1 -c group name -O e 127.0.0.1

No comments:

Post a Comment