How to Install PHP 7.2, 7.1 on CentOS/RHEL 7.4 & 6.9
Install Yum Repository
First of all, you need to enable Webtatic and EPEL yum repositories on your system. Use the following command to install EPEL repository on your CentOS and Red Hat 7/6 systems