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

More than 40,000 techies are part of our ARKIT community. Join us today and keep learning Linux, Cloud, Storage, DevOps, and IT technologies.

Get Email Updates Download E-Books Facebook Page YouTube Channel Twitter Join Telegram Group Join WhatsApp Group
author avatar
Ravi Kumar Ankam
My name is Ravi Ankam. I am passionate about learning new technologies quickly and sharing knowledge with others. My goal is to help learners grow their skills, because the more you learn, the more you earn. See About Me

Ravi Kumar Ankam

My name is Ravi Ankam. I am passionate about learning new technologies quickly and sharing knowledge with others. My goal is to help learners grow their skills, because the more you learn, the more you earn. See About Me

Leave a Reply

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