How to Install Nagios 4.4.5 on RHEL/CentOS 8/7 and Fedora 30

Sourabh Dey
3 min readApr 19, 2022

yum install -y httpd httpd-tools php gcc glibc glibc-common gd gd-devel make net-snmp

useradd nagios

groupadd nagcmd

usermod -G nagcmd nagios

usermod -G nagcmd apache

mkdir /root/nagios

cd /root/nagios

wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.5.tar.gz

wget https://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz — no-check-certificate

tar -xvf nagios-4.4.5.tar.gz && tar -xvf nagios-plugins-2.2.1.tar.gz

./configure — with-command-group=nagcmd

Final Output
make install-init
make install-commandmode
make install-config
vi /usr/local/nagios/etc/objects/contacts.cfg

define contact {

contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from gener$
alias Nagios Admin ; Full name of user
email nagios@xxx.com ; <<***** CHANGE THIS TO YOUR EMAIL ADDR$
}

make install-webconf
htpasswd -s -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
cd /root/nagios
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
start and enable the service

systemctl enable nagios

systemctl start httpd

systemctl enable httpd

Dashboard
Services

--

--

Sourabh Dey

Trying To learn as much as possible about different Techonology. About me I am just a normal Boy who lives in terminal