PHP 7.1 with Apache on CentOS 7.x

Linux, Open Source, System Admin
Comments Off on PHP 7.1 with Apache on CentOS 7.x

Back in the long long ago you could roll out LAMP with a single yum command. In 2017, distro game has hardly kept up with the evolution in PHP and still comes with PHP 5.4 – to go to 7 in RHEL/CetOS 7 you have to do some surgery.

First remove all the php packages. Then let this rip.

yum install epel-release yum-utils

rpm -Uvh

yum-config-manager –enable remi-php71

yum install -y php71-php-pecl-memcached php71-php-mysql php71-php-xml php71-php-cli php

That’s all, just restart httpd and hack your /etc/php.ini (needs explicit definition for the time zone)