How to Install PHP 7.2, 7.1 on CentOS/RHEL 7.4 & 6.9

31 十二月

install epel-release yum repository

yum install epel-release

install Remi repository


### For CentOS/RHEL 7 ###
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
### For CentOS/RHEL 6 ###
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Install PHP 7.2

yum --enablerepo=remi-php72 install php

Install PHP 7.1

yum --enablerepo=remi-php71 install php

Install PHP Modules


### 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

find out other available PHP modules

yum --enablerepo=remi-php72 search php | grep php72

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *