Home  >  Article  >  Backend Development  >  How to install php5.2 on centos yum

How to install php5.2 on centos yum

藏色散人
藏色散人Original
2020-10-06 14:09:492856browse

How to install php5.2 on centos yum: first add the source; then install php through the command "yum install php php-mysql php-xml php-gd php-mbstring php-cli".

How to install php5.2 on centos yum

Recommendation: "PHP Video Tutorial"

Install php5.2.17 using yum command in CentOS 6.4

When I recently deployed a server to a company, I found that the server they provided was centos6.4 system. After installing the system and related services httpd, mysql, and php, I ran the code and found zend in php5.3. Encryption cannot be used. After installing Zend Guard Loader, it still cannot be used. Only then did I find that the program only supports Zend Optimizer decryption. So I had to look for the version of php5.2. Quickly search online to see if there is any yum installation of php5.2.

I really found it. I had to modify the yum source. The method is as follows:

1. Environment

centos6.4 x86_64

2. Add source

wget -q -O - http://www.atomicorp.com/installers/atomic | sh

3. Exclude php5.3 package, we only Requires php5.2.17

vim /etc/yum.conf

Add this line: exclude=*5.3.*

4. Installation

yum install php php-mysql php-xml php-gd php-mbstring php-cli

Done!

(Note: I installed according to this method and installed it as php5.4. Fortunately, the original directory read and write permission error was solved)

The above is the detailed content of How to install php5.2 on centos 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