How to Install Nagios

How to install Nagios

Going to do a 3 part install here. Firstly the base Nagios install to monitor from, Secondly how to implement NagiosQL for web based configurations and lastly how to remote monitor cPanel with Nagios ( NRPE).

 

Lets start with the Install of the Nagios Monitor Server

Check to make sure your system is update.

yum check-update

If there is any updates do them.

Install RPMFORGE REPOSITORIES

#for 64bit

rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

#for 32bit

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Check for updates again

yum check-update

 

Now for the fun stuff.

yum install httpd
yum install php php-mysql php-gd php-ldap php-xml gd gd-devel gcc glibc glibc-common libstdc++-devel gcc-c++
yum install perl-DBI perl-DBD-MySQL perl-Config-IniFiles rrdtool perl-rrdtool
yum install nagios nagios-plugins

This would have the system up and going. Only thing left to do is to secure the web interface.

htpasswd -c /etc/nagios/htpasswd.users nagiosadmin

Put in the password you want to use

Start up nagios and httpd

/etc/init.d/httpd start
/etc/init.d/nagios start

From here you can see a basic nagios running and monitoring your system.

http://IP/nagios

Now that is the base server up and going. See How to Install NagiosQL  for seting up configuration via a nice web interface.

 

 

Leave a Reply