Nagios Core Installation in RHEL8 step by step guide

Nagios Core Installation in RHEL8

## Disable SELinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled' /etc/selinux/config
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
cat /etc/selinux/config
setenforce 0

## Add Firewall rule to allow http and https
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

## Configure EPEL Repository
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

## Install Required dependent packages
yum install wget php gcc glibc-common gd gd-devel make net-snmp perl perl-devel openssl

## Download Nagios Core Package
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.3.tar.gz

## Extract Downloaded package using tar
tar -xvf nagios-4.4.3.tar.gz

## Create Nagios user and group
groupadd nagcmd
groupadd nagios
useradd -g nagios -G nagcmd
usermod -aG nagcmd apache

## Change directory path into extracted package
cd nagios-4.4.3
./configure --with-command-group=nagcmd
make all
make install

make install
make install-init
make install-commandmode
make install-config
make install-exfoliation
make install-webconf

## Create Nagiosadmin user with password for web access
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

## Enable and start httpd & nagios services
systemctl enable httpd
systemctl start httpd
systemctl enable nagios
systemctl start nagios

## Verify the Nagios config
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

## Download Nagios Plugins and Install
cd /tmp/
wget https://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
tar -xvf nagios-plugins-2.2.1.tar.gz
cd nagios-plugins-2.2.1
./configure --with-nagios-user=nagios --with-nagios-group=nagcmd
make
make install

## Verify the plugins in below path
cd /usr/local/nagios/libexec/
ls

## Access Nagios Web console
http://NagiosServerIP/nagios

Thanks for your wonderful Support and Encouragement

ARK

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

Leave a Reply

Your email address will not be published. Required fields are marked *