How to Install PHP-7.1 in CentOS 7/Redhat ?


In this tutorial, we are discussing how to install PHP-7.1  in centos why because some of the applications like Magento needs a specific PHP version properly to install the setup or feature.

1. We have to install and enable EPEL and Remi repository to your CentOS 7 in order to install PHP 7.1

yum install
yum install

2. Next, we need to install yum-utils, it is a collection of useful programs for managing yum repositories and packages.

yum install yum-utils

3. we have to enable Remi repository as the default repository for installing PHP 7.1

yum-config-manager --enable remi-php71

4. Now install PHP 7.1 with all necessary modules with the command below.

yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

5. At last Check the PHP Version

php -v


Leave a Reply

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