Linux CentOS completely uninstall 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

The following 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 be forced to delete, use the following command to view all PHP packages

#rpm-qa|grep PHP

Tips are 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

Re-use

# php-v

View version information no longer prompted

Linux CentOS completely uninstall 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.