Learn how to install Nagios, an open-source application for monitoring systems, networks, and IT infrastructure. This tutorial will guide you through the installation process on a RHEL compatible system. Follow along to get started with Nagios and begin monitoring your hardware, networks, applications, services, business processes, and operating systems.
yum update -y
sed -i 's/SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
yum install -y wget httpd httpd-tools php gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel xinetd unzip
cd /tmp
wget https://assets.nagios.com/downloads/n...
wget https://nagios-plugins.org/download/n...
tar xvf nagios-4.4.11.tar.gz
tar xvf nagios-plugins-2.3.3.tar.gz
useradd nagios
groupadd nagcmd
usermod -G nagcmd nagios
usermod -G nagcmd apache
cd nagios-4.4.3
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf
vi /usr/local/nagios/etc/objects/contacts.cfg
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
cd /tmp
cd nagios-plugins-2.3.3
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
systemctl enable nagios
systemctl enable httpd
systemctl restart nagios.service
systemctl stop firewalld
systemctl disable firewalld