How does CentOS Force uninstall PHP and Custom install PHP

Source: Internet
Author: User

Very silent, CentOS actually PHP version only 5.1.6, many open-source CMS cannot be installed.

To view the PHP version command:

#php-V

This command is to remove the dirty

#yum Remove PHP

Because you can use this command later.

#php-V

You will still see the version information .....

Must force delete

#rpm-qa|grep PHP

Prompt as follows

#php-pdo-5.1.6-27.el5_5.3
#php-mysql-5.1.6-27.el5_5.3
#php-xml-5.1.6-27.el5_5.3
#php-cli-5.1.6-27.el5_5.3
#php-common-5.1.6-27.el5_5.3
#php-gd-5.1.6-27.el5_5.3

Note Uninstall to uninstall the no dependency first

PDO is a dependency of MySQL; Common is a dependency of GD;
Example: # rpm-e php-pdo-5.1.6-27.el5_5.3
error:failed dependencies:
Php-pdo is needed by (installed) php-mysql-5.1.6-27.el5_5.3.i386

So the correct unloading sequence is:
# RPM-E php-mysql-5.1.6-27.el5_5.3
# RPM-E php-pdo-5.1.6-27.el5_5.3
# RPM-E php-xml-5.1.6-27.el5_5.3
# RPM-E php-cli-5.1.6-27.el5_5.3
# RPM-E php-gd-5.1.6-27.el5_5.3
# RPM-E php-common-5.1.6-27.el5_5.3

Then use # Php-v

View version information no longer prompted

Install the latest PHP

wget Http://cn.php.net/get/php-5.3.6.tar.gz/from/this/mirror
Tar xzvf php-5.3.6.tar.gz

CD php-5.3.6

./configure--prefix=/usr/local/php

#make && make Install

#这个过程比较漫长需要耐心等待 Don't worry.

How does CentOS Force uninstall PHP and Custom install PHP

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.