Difference between revisions of "Install Nagios on CentOS 5"

From CSLabsWiki
m (Install & Configure Prerequisites)
m (Notes)
Line 49: Line 49:
   
 
==Notes==
 
==Notes==
*Resources on configuring Nagios can be found in the [http://nagios.sourceforge.net/docs/3_0/ official documentation].
+
*Resources on configuring Nagios can be found in the [http://nagios.sourceforge.net/docs/3_0/ official documentation]. In addition, the CentOS wiki has a nice page [http://wiki.centos.org/HowTos/Nagios here].
   
 
*Not all plugins will run without additional packages being installed (Ex. <code>check_mysql</code> won't run without installing <code>mysql</code>).
 
*Not all plugins will run without additional packages being installed (Ex. <code>check_mysql</code> won't run without installing <code>mysql</code>).

Revision as of 00:55, 21 April 2010

This page summarizes how to perform a basic installation of Nagios on CentOS 5.

Install

Add RPMForge Yum Repository

Install & Configure Prerequisites

  • Install Apache
    • yum install httpd php gcc glibc glibc-common gd gd-devel
  • Configure Apache to start on boot
    • /sbin/chkconfig --levels 345 httpd on
  • Configure iptables to allow Apache traffic
    • /sbin/iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    • /etc/init.d/iptables save
    • /etc/init.d/iptables restart

Install & Configure Nagios

  • Install Nagios & Plugins
    • yum install nagios nagios-plugins nagios-plugins-setuid
  • Create the default Nagios web access user & set a password
    • htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
  • Verify default config files
    • nagios -v /etc/nagios/nagios.cfg
  • Start Nagios
    • /etc/init.d/nagios start
  • Start Apache
    • /etc/init.d/httpd start

Verify Install

  • Try logging into your new Nagios installation by going to http://servername/nagios/ and logging in with nagiosadmin and the password you set.

Notes

  • Not all plugins will run without additional packages being installed (Ex. check_mysql won't run without installing mysql).