PHP upgrade on Nagios server

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

PHP upgrade on Nagios server

Post by jyoti22 »

Due to some vulnerability on Nagios server, there is a need to upgrade PHP and for this upgrade we have 2 choices
either to upgrade it to PHP 5.6.30 or to upgrade to PHP 7.0.10
Kindly let me know if Nagios core is compatible with these PHP versions and if this upgrade has any implications on Nagios core. Also, please provide if there is any nagios documentation available for upgrading PHP.

Thanks.
bolson

Re: PHP upgrade on Nagios server

Post by bolson »

If your Core is running on a vm and you can take a snapshot, do so. Otherwise, backup your configuration. Then run the following:

Code: Select all

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum install yum-plugin-replace
yum replace php --replace-with=php56w
service nagios restart
You will now be running Nagios Core with PHP 5.6.31

Cheers!
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: PHP upgrade on Nagios server

Post by tacolover101 »

as a side note to this, be aware of what is happening when you install the 'custom' webtactic repo, and that you will need to 'back out' of this down the road if / when the main packages are upgraded. the 'yum replace' will work once again here.

if your security team is complaining about PHP vulns, then they may also care about additional repos.
if you have another server team managing your OS's, you could 'break' some of their patching down the road.

i saw an issue like this happen, on a whole rack of physical machines. not fun to clean up.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: PHP upgrade on Nagios server

Post by npolovenko »

@jyoti22, Can we go ahead and close this thread as resolved?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked