How to install PHP 7.3/7.4 on CentOS 7

Step 1 – Setup Yum Repository

Install EPEL repository

# yum install epel-release

Install Remi repository

# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Step 2 – Install yum-utils

Install yum-utils for managing yum repositories and packages

# yum install yum-utils

Step 3 – Enable Remi repository

Enable Remi repository as the default repository for installing different PHP versions using yum-config-manager which is provided by yum-utils

# yum-config-manager --enable remi-php73 [Install PHP 7.3]

# yum-config-manager --enable remi-php74 [Install PHP 7.4]

Step 4 – Install PHP with necessary modules

# yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

Check the installed version of PHP using below command

# php -v
Leave a Reply 0

Your email address will not be published. Required fields are marked *