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.
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
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!