CentOS 7 – remove php54

Photo by KOBU Agency on Unsplash

I am getting tired of php54 being the default on CentOS 7 so for new installations I want to abandon it. Products have moved on, and it gets labelled as vulnerable by our security assessment tools.

I want a new(ish) but not buggy version of PHP and just one version (simplest installation). I’m following the advice on the remi site https://rpms.remirepo.net/wizard/ for a single version of PHP which will be the simplest method.

yum remove php*
yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager –disable 'remi-php*'
yum-config-manager –enable remi-php74
sudo yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd
apachectl restart

I had a look at the scl distribution and it was quite involved and needed replacing apache by the look of it. I’m going to stick with the Remi distribution.

Now verify with php -v and http://php.example.com/phpinfo.php

Leave a Reply

Your email address will not be published. Required fields are marked *