Follow these steps:
Install the required packages
yum install httpd php php-cli gcc unzip wget glibc glibc-common gd gd-devel net-snmp
Start services
service httpd start
Set-up user accounts
useradd nagios
passwd nagios
Create a group for nagios and add nagios user to this group
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache
Install nagios core service
cd /opt/
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.3.tar.gz
tar xzf nagios-4.4.3.tar.gz
cd nagios-4.4.3
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-daemoninit
make install-config
make install-commandmode
make install-exfoliation
Set up Apache configuration
make install-webconf
Configure apache configuration
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd restart
Install Nagios plugin
cd /opt
wget http://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
tar xzf nagios-plugins-2.2.1.tar.gz
cd nagios-plugins-2.2.1
Compile and install Nagios plugin
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
Start Nagios
service nagios start
Access Nagios in a web browser
http://nagios.tecadmin.net/nagios/