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 https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
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