Comments on Installing Nagios 3.4.4 On CentOS 6.3
Installing Nagios 3.4.4 On CentOS 6.3 Nagios is a monitoring tool under GPL licence. This tool lets you monitor servers, network hardware (switches, routers, ...) and applications. A lot of plugins are available and its big community makes Nagios the biggest open source monitoring tool. This tutorial shows how to install Nagios 3.4.4 on CentOS 6.3.
16 Comment(s)
Comments
Hi,
thanks for the HOWTO, just my two cents:
* Starting the HOWTO by telling the readers to disable the SELinux is a bad practice. Nagios is working smoothly with SELinux even in enforced mode, but to let the SELinux stay in permissive mode is better than nothing.
Hint:
cat /var/log/secure | audit2allow
Just pick-up the Nagios entries, create a new policy file with
audit2allow -M
and load with
semodule
* Because the strongly preffered software management in CentOS is the RPM packages, and the Nagios 3.3 is in EPEL repo, the alternate end of this HOWTO could be just altering the nagios.spec and build a RPM instead of compiling and installing directly in filesystem...
nagios is a PITA to get to work under selinux. i have it disabled after 3 days of fight. Also use the RPM, not the source.
Not only is advising to disable SELinux bad practice, so is the approach of building as root.
And why would one even build from a tarball when the Fedora EPEL repo already provides an RPM. Rather get that, or build from the SRPM: ftp://ftp.nluug.nl/site/download.fedora.redhat.com/pub/fedora-epel/6/SRPMS/nagios-3.4.4-1.el6.src.rpm
I was able to make this work without disabling SELinux. You essentially have to add the PHP directories with semanage. See my blog post on this: Configuring SELinux for Centeron 2.4 on CentOS 6.3.
A guide to install Centreon on CentOS.
can't access nagios 3.4.4 web interface
Not Found
The requested URL /nagios/ was not found on this server.
Apache/2.2.15 (CentOS) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips Server at 192.168.46.51 Port 80
Im having the same error. HELP!!!!!!! I dont know why???
Not Found
The requested URL /nagios was not found on this server.
Apache/2.2.15 (CentOS) Server at 127.0.0.1 Port 80
Did you find why you had this problem? I have the same problem.
I got the same error and had to restart httpd process to pick up the conf.d changes.
if that doesn't work, look at the nagios config file in the conf.d dir for apache and look at what the alias and file path for /nagios/ is.
how to log out nagios web interface brooo...
Some useful info here if you got stuck....
Don't forget to make sure you have "make" and "perl" installed also.
If you don't have "make" installed you won't be able to complete the part after ./configure. Also if you don't have "perl" installed you will have errors at the end of the ./configure command and won't be able to run make all.
the information provided by u is really fruitful and accurate.
After installing nagios, if you are getting forbidden 403 error then don't forget to add index.php in your httpd.conf index section.
This HOWTO was written for 6.3
If you are now using centos 6.4+ it can be found in EPEL and installed with yum
First I modified the nagios folder structure's SELinux labels to allow httpd read access:# chcon -R --reference=/var/www/html /usr/local/nagios/share# chcon -R --reference=/var/www/html /usr/local/nagios/var# chcon -R --reference=/var/www/cgi-bin /usr/local/nagios/sbinNext I changed the ~var/rw folder to allow write access via the httpd_sys_rw_content_t label:# chcon -R -t httpd_sys_rw_content_t /usr/local/nagios/var/rw