Install PHP 7.2 on CentOS from yum

First you need to install Remi repository

https://rpms.remirepo.net

Enable epel repo with

On CentOS 7

On CentOS 6

Enable PHP 7.2

To install PHP, run

Downgrading PHP version

if you ever want to change PHP version, lets say PHP 7.0, do the following. Remove current PHP

Disable PHP 7.2 repo.

Enable PHP 7.0 repo

Now install PHP as above.

PHp Binary

PHP cli will be installed in /usr/bin/php72, you can create a symlink if you want.

PHP-FPM

To install php-fpm module, run

To start php-fpm, run

See CentOS, php

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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