CentsOS Upgrade Nagios to 4.3.4

We had NAGIOS installed from CentOS repositories version 4.x.x. But we upgraded nrpe to version 3 which did not support old NAGIOS version that comes with repository. This is how we upgraded to veriosn 4.3.4

yum install rsync wget
rsync -rav /usr/local/nagios/ /opt/nagios411backup/
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.3.4.tar.gz
tar xf ./nagios-4.3.4.tar.gz && cd ./nagios-4.3.4
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf
make install-webconfig
cp -f /opt/nagios411backup/etc/nagios.cfg /usr/local/nagios/etc/
cp -f /opt/nagios411backup/etc/htpasswd.users /usr/local/nagios/etc/
rsync -rav /opt/nagios411backup/etc/objects/ /usr/local/nagios/etc/objects/
rsync -rav /opt/nagios411backup/etc/monitoring/ /usr/local/nagios/etc/monitoring/
sed -i 's/normal_check_interval/check_interval/g' /usr/local/nagios/etc/objects/templates.cfg
sed -i 's/normal_check_interval/check_interval/g' /usr/local/nagios/etc/objects/printer.cfg
sed -i 's/normal_check_interval/check_interval/g' /usr/local/nagios/etc/objects/switch.cfg
sed -i 's/retry_check_interval/retry_interval/g' /usr/local/nagios/etc/objects/templates.cfg
sed -i 's/retry_check_interval/retry_interval/g' /usr/local/nagios/etc/objects/printer.cfg
sed -i 's/retry_check_interval/retry_interval/g' /usr/local/nagios/etc/objects/switch.cfg
sed -i 's/^command_check_interval/^#command_check_intervald/g' /usr/local/nagios/etc/nagios.cfg
sed -i 's/process_performance_data=0/process_performance_data=1/g' /usr/local/nagios/etc/nagios.cfg
systemctl daemon-reload
systemctl restart nagios
systemctl restart httpd
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg