How to install Nagios from repo Fedora/Centos/SL

Nagios  is  one of  the most  powerful  open source  monitoring tool,  its  giving  the opportunity for monitoring  all OS and  devices ,   in our previous posts, we did show you how to install Nagios from source in Fedora and CentOS,  today we will see how to install  it directly  from yum in Fedora/Centos/SL(Scientific Linux) in easy steps.

Install Nagios

yum install nagios*
  • Now Start Nagios 
 /etc/init.d/nagios start  
  • Start nagios on boot

chkconfig nagios on Start httpd apache

/etc/init.d/httpd start 
Start apache on boot 
chkconfig httpd on
  • Make Nagios admin password  
htpasswd -c /etc/nagios/passwd nagiosadmin
  • check the nagios.conf  file  in the  apache conf.d directory
  • Disable SELinux:
# vim /etc/selinux/config 
# reboot
  • Check   if  nagios  users and groups are added
# groupadd nagios 
# adduser nagios -g nagios 
# passwd nagios
# usermod -G nagios nagios 
# usermod -G apache,nagios apache
  • Check nagios  config  with
nagios -v /etc/nagios/nagios.cfg
Checking obsessive compulsive processor commands
... Checking misc settings... Total Warnings: 0 Total Errors:   0

 Now start nagios   and  report if worked for you.

http://ip/nagios  and login with  your  nagiosadmin user already created

  • Tom

    nagios does not start

  • Tom

    got it. please move Disable SELinux: to the beginning nagios starts now

  • Gerhard Lausser

    Why not “yum install omd”? is the whole nagios ecosystem in one single package, actively maintained. You install it and have immediately access to Thruk, Multisite, Nagvis, PNP, a Wiki…..
    You can also have multiple separate installations, called sites, on one computer. One for test, one production, one to test newer versions, whatever.
    And the best:
    omd stop
    omd config set CORE shinken
    omd start

  • Carolinardrgz

    It worked for me.  Thanks a lot.