NAGIOS – How to setup Nagios v4 from source on Centos 6.5

The following commands will install all the required packcages to have NAGIOS up and running. Make sure to install the latest package of NAGIOS. In the “wget” command enter the latest release.


yum install -y httpd 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
tar –xvf nagios-X.X.X.tar.gz
tar –xvf nagios-plugins-X.X.tar.gz
cd nagios-X.X.X
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf
htpasswd -s -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd start
cd /root/nagios
cd nagios-plugins-X.X
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make install
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --add httpd
chkconfig --level 35 httpd on
service nagios start 
Share Button

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload the CAPTCHA.