Step 1: Install EPEL and Remi repository
yum install epel-release -y
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
Step 2: Install yum-util packages
yum install yum-utils -y
Step 3: Enable remi repo as per the desired PHP version, for PHP 7.4,
yum-config-manager --enable remi-php74
yum update
Now install PHP 7.4 with all necessary modules.
yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-process php-ldap -y
php -v
PHP 7.4.29 (cli) (built: Apr 12 2022 10:55:38) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.29, Copyright (c), by Zend Technologies
[my-ads-code]
5/5 - (3 votes)