Cài đặt PHP 7.4, 7.3 & 7.2 on CentOS/RHEL 7

Php 7 thì có nhiều cái được cải tiến hơn so với bản Php 5

Bước 1: Cài đặt Yum Repository

sudo yum install epel-release
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

Bước 2: Install PHP 7 on CentOS

## Install PHP 7.4 
yum --enablerepo=remi-php74 install php

## Install PHP 7.3 
yum --enablerepo=remi-php73 install php

## Install PHP 7.2 
yum --enablerepo=remi-php72 install php

## Install PHP 7.1 
yum --enablerepo=remi-php71 install php

Bước 3: Cài các module

### For PHP 7.4
yum --enablerepo=remi-php74 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

### For PHP 7.3
yum --enablerepo=remi-php73 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

### For PHP 7.2
yum --enablerepo=remi-php72 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

### For PHP 7.1
yum --enablerepo=remi-php71 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

Extension For Moodle

yum –enablerepo=remi-php73 install php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysqlnd php-cli php-mcrypt php-ldap -y

 

 

Leave a comment

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