Nagios Core - Installing On Centos 7: The Industry Standard in IT Infrastructure Monitoring
Nagios Core - Installing On Centos 7: The Industry Standard in IT Infrastructure Monitoring
Purpose
This document describes how to install Nagios Core 4.1.1 and Nagios Plugins 2.1.1 on Centos 7 minimal.
Target Audience
This document is intended for use by anyone who wishes to install Nagios Core on a Centos 7 minimal machine.
Disable SELinux
Prior to starting our install, we need to disable SELinux.
setenforce 0
Install Prerequisites
We now need to install the programs that Core will need in order to function / install properly.
yum install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp openssl-devel wget unzip
-y
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache
cd /tmp
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.1.1.tar.gz
wget http://www.nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz
tar zxf nagios-4.1.1.tar.gz
tar zxf nagios-plugins-2.1.1.tar.gz
cd nagios-4.1.1
Now that the files are extracted, let's start compiling Nagios!
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
cd /tmp/nagios-plugins-2.1.1
./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl
make all
make install
Start Nagios
If everything worked correctly prior to this, you will be able to start your Nagios Core service.
You should now be able to access your machine by navigating to http://nagiosip/nagios/ - if this does not work then please try these two
troubleshooting steps.
Troubleshooting
If you cannot access the Nagios web page, it may be related to your firewall rules. The following command will open up port 80 on your
Nagios Core machine.
If you are still unable to access the web GUI, your web server may be only listening on IPv6. Modify /etc/httpd/conf/httpd.conf
and look for the part that says 'Listen :80'. Modify it to be 'Listen 0.0.0.0:80'. Then, run service httpd restart