Step 1 – Setup Yum Repository
In the first step install all the required yum repositories in your system used in the remaining tutorial for various installations. You are adding REMI, EPEL, Webtatic & MySQL community server repositories in your system.
CentOS / RHEL 7
yum install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm
Step 2 – Install PHP 7.4
Now install php 7 packages from webtatic rpm repository using following command.
yum --enablerepo=remi-php74 install php
Now install required php modules. Use following command to list available modules in yum repositories.
yum --enablerepo=remi-php74 search php
Now check all listed modules in above command and install required modules like below.
yum --enablerepo=remi-php74 install php-mysql php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt
For additonal php function to install use the command syntax below-
yum --enablerepo=remi-php74 install <your-php-funciton>
Read more