Step 1: Add EPEL and REMI Repository
Run the commands below to add the necessary repositories.
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
Step 2: Enable Repositories
Enable PHP 7.4 Remi repository.
yum -y install yum-utils
yum-config-manager --enable remi-php74
Step 3: Install PHP 7.4
yum update
yum install php php-cli
Step 4: Install additional PHP packages if required:
yum install php-xxx
e.g
yum install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json
Step 4: Finish Up
Check that you are now running PHP version 7.4.
php -v
PHP 7.4.23 (cli) (built: Aug 24 2021 16:33:30) ( NTS )
0 Comments
Please log in to leave a comment.