Hello,
We moved our install to a new CentOS 7 server, things have been running smoothly for about six months.
During a vulnerability assessment, it was noted that the system is using an insecure version of PHP.
I tried updating and adding the PHP 7.3 repo, but I am receiving an error when I try to update via YUM:
Error: Package: nagiosxi-deps-el7-5.6.3-1.noarch (installed)
Requires: php-mssql
Removing: php-mssql-5.4.45-17.el7.remi.x86_64 (@remi-php54)
php-mssql = 5.4.45-17.el7.remi
Obsoleted By: php-pdo-dblib-7.0.33-9.el7.remi.x86_64 (remi-php70)
Not found
Available: php-mssql-5.4.16-7.el7.x86_64 (nagiosxi-deps)
php-mssql = 5.4.16-7.el7
Available: php-mssql-5.4.16-9.el7.x86_64 (epel)
php-mssql = 5.4.16-9.el7
I tried manually updating to 7.3 on my test box, but it fails its validation checks so I thought I would reach out to this forum to see if anybody can help.
Thanks,
Ryan
Updating PHP on Nagios
Re: Updating PHP on Nagios
Nagios XI only supports up to PHP 7.2, you can use these steps to do it:
*** NOTE: You must be on XI 5.5+ for this to work, you are REQUIRED to upgrade to at least that first. Take an XI backup AND a VM snapshot just in case.
*** NOTE: You must be on XI 5.5+ for this to work, you are REQUIRED to upgrade to at least that first. Take an XI backup AND a VM snapshot just in case.
Code: Select all
yum remove nagiosxi-deps -y
yum -y install epel-release wget
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum -y install yum-utils
PHPTZ=$(grep -s '^date.timezone' /etc/php.ini | awk '{print $3}' | sed 's/\//\\\//g')
yum -y remove php-*
yum-config-manager --enable remi-php72
yum -y install php php-opcache php-devel php-gd php-ldap php-mbstring php-pdo php-mysqlnd php-pgsql php-pear php-pecl-ssh2 php-pgsql php-process php-snmp php-xml
sed -i "s/^date.timezone = .*/date.timezone = ${PHPTZ}/" /etc/php.ini
cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.6.3.tar.gz
tar zxf xi-5.6.3.tar.gz
cd /tmp/nagiosxi
rm -rf /etc/php.d/sourceguardian.ini
./init.sh
sed -i '/^PHP script/d' xi-sys.cfg
sed -i '/^1)/d' xi-sys.cfg
sed -i '/^2)/d' xi-sys.cfg
sed -i '/^3)/d' xi-sys.cfg
./install-sourceguardian-extension.sh
service httpd restart-
akrradford
- Posts: 16
- Joined: Fri Apr 17, 2015 2:35 pm
Re: Updating PHP on Nagios
Worked like a champ. Thank you.
Ryan
Ryan
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Updating PHP on Nagios
Hi Ryan,
I'll close this post, but if you have any new questions, please feel free to open another.
Thanks for the update.Worked like a champ. Thank you
I'll close this post, but if you have any new questions, please feel free to open another.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!