Home > Backend Development > PHP Problem > How to install php5.6 under centos

How to install php5.6 under centos

王林
Release: 2023-03-04 19:26:02
Original
2283 people have browsed it

How to install php5.6 under centos: first check the existing php version in the system; then execute the [yum -y remove] command to delete; then add the yum source; finally execute [yum install -y remi -php56] command to install.

How to install php5.6 under centos

First find the existing version in the system

(Recommended tutorial: php graphic tutorial)

yum list installed | grep php
Copy after login

If there is an existing php version, execute the following command to delete it

yum -y remove php-common
Copy after login

Then take the centos6 system as an example and add the yum source of CentOS 6.x

(Video tutorial recommendation: php video tutorial)

rpm -Uvh http://download.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Copy after login

Finally use the yum command to install PHP, install the 5.6 version as remi-php56, and install the 5.5 version as remi-php55

yum install -y --enablerepo=remi,remi-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-commo
Copy after login

The above is the detailed content of How to install php5.6 under centos. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template