Install php5.2 for the 64-bit system yum in Centos 5.8

Source: Internet
Author: User
Tags install php php software centos


Because the program running environment is required, you have to use PHP5.2 or earlier versions.

The following two methods are provided to install PHP5.2:

Operating system: CentOS 5.8 64-bit (Alibaba cloud space)

1. Download the source code from the official website and compile and install it.
Download Address: http://museum.php.net/php2/

Compile the installation method. Decompress the package and read the README text file.

2. Install php5.2.17 through a third-party yum source

Reference Method: https://webtatic.com/packages/php53/

1) run the rpm-qa | grep php command to view the installed php software package.
If yes, you can use yum-y remove php * to uninstall it.

2) install the yum Library Information rpm-Uvh http://mirror.webtatic.com/yum/centos/5/latest.rpm
After the installation is complete, the webtatic. repo configuration file will be generated in/etc/yum. repos. d.

3) edit/etc/yum. conf to exclude versions 5.3, 5.4, 5.5, and 5.6.
Add this line: exclude = * 5. 3. *, * 5. 3. *, * 5. 4. *, * 5. 5. *, * 5. 6 .*

4) install php

Yum-enablerepo = webtatic install php-mysql php-xml php-gd php-mbstring php-cli
Or
Yum-enablerepo = webtatic update php-mysql php-xml php-gd php-mbstring php-cli

5) run rpm-qa | grep php or php-v to check whether the php version is php5.2.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.