Centos7 install PHP72

Published by

Posted on April 06, 2019

Enable EPEL:

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Install yum-utils if it is not already installed.

yum install yum-utils

Enable the Remo repository for PHP 7.2:

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php72

Once you are done with these steps, you can go ahead and install PHP 7.2

2. Install PHP 7.2 on CentOS 7

To install PHP 7.2 on your CentOS 7 , run the following command:

yum install php72 php72-php-fpm php72-php-mysqlnd php72-php-opcache php72-php-xml php72-php-xmlrpc php72-php-gd php72-php-mbstring php72-php-json

This will install PHP 7.2 as well as other commonly used PHP extensions. To verify PHP 7.2 is successfully installed, run the following command:

php72 -v

About the Author