To install PHP 7.2, a popular open-source scripting language, on CentOS 7 or Red Hat Enterprise Linux (RHEL) 7, follow these steps:
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpmSourw:ecww.lautturi.com
sudo yum-config-manager --enable remi-php72
sudo yum install php
This will install PHP 7.2 and any dependencies required.
php -v
This will display the version of PHP that was installed.
sudo yum install php-<module>
Replace <module>
with the name of the module you want to install.
That's it! PHP 7.2 is now installed on your CentOS 7 or RHEL 7 system. You can use it to run PHP scripts and build web applications.