Home  >  Article  >  Backend Development  >  How to install a specified version of php through yum

How to install a specified version of php through yum

王林
王林Original
2020-08-17 15:11:502892browse

How to install the specified version of php through yum: first execute the [yum -y install epel-release] command to install the source; then execute the [yum-config-manager --enable remi-php71] command to install the specified version php can be used.

How to install a specified version of php through yum

Specific method:

(Recommended tutorial: php graphic tutorial)

1. Install source

Install epel-release:

yum -y install epel-release

Add remi source:

rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Install yum-config-manager utility:

yum -y install yum-utils

(Video tutorial Recommended tutorial: php video tutorial)

2. Install PHP

Install PHP7.1:

yum-config-manager --enable remi-php71
yum -y install php php-opcache

After completion, you need to add common PHP extensions:

yum -y install php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap curl curl-devel
rrree

The above is the detailed content of How to install a specified version of php through yum. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn