1.Prerequisites

yum install httpd php
yum install gcc glibc glibc-common
yum install gd gd-devel

2.Create Account Information

/usr/sbin/useradd -m nagios
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd apache

3.Compile and Install Nagios

./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode