Linux uninstall PHP mysql Apache

Source: Internet
Author: User

Uninstall MySQL

1. Find out if MySQL was previously installed

Command: Rpm-qa|grep-i MySQL

You can see the MySQL package:

Mysql-3.23.58-9
Php-mysql-4.3.4-11
mod_auth_mysql-20030510-4.1
Mysql-server-3.23.58-9

2. Delete MySQL

Delete command: RPM-E--nodeps package Name

Rpm-ev mysql-server-3.23.58-9

Description: Rpm–qa | The grep mysql command is intended to list all MySQL-related packages, and the uninstallation starts at the bottom of the package until the first one is uninstalled. Execute rpm-q PHP, if the PHP version is returned, it is RPM installation, and the PHP version is not returned is the binary installation.

3, delete the old version of MySQL development header files and libraries

Rm-fr/usr/lib/mysql

Rm-fr/usr/include/mysql

Note: The data and/etc/my.cnf in/var/lib/mysql after uninstallation are not deleted, if determined, then manually deleted

Rm-f/etc/my.cnf

Rm-fr/var/lib/mysql

Uninstalling Apache

1. Find out if httpd has been installed before

Rpm-qa|grep-i httpd

Get the following installation package

Httpd-manual-2.2.9-4.i386
Httpd-tools-2.2.9-4.i386
Httpd-devel-2.2.9-4.i386
Httpd-2.2.9-4.i386

2. Delete Apache

RPM-E--nodeps httpd-2.2.9-4.i386
RPM-E--nodeps httpd-devel-2.2.9-4.i386
RPM-E--nodeps httpd-tools-2.2.9-4.i386
RPM-E--nodeps httpd-manual-2.2.9-4.i386

Uninstalling PHP

Rpm-qa|grep-i PHP

Get the following package

Php-odbc-4.3.4-11
Php-4.3.4-11
Php-mysql-4.3.4-11
Php-pear-4.3.4-11
Php-ldap-4.3.4-11
Php-pgsql-4.3.4-11

The Unload method is the same as above

Note: If the uninstallation is not removed, the system will generally prompt the package dependencies, and list the name of the dependent package, first uninstall the prompt depends on the package is ready.

If there is really a unloading package, you can add-nodeps this parameter to unload, for example, we uninstall php-4.3.4-11, it is not removed. Just use:
Rpm-e php-4.3.4-11--nodeps (or rpm-e--nodeps php-4.3.4-11)
The command is tough and should be done.

Rpm–e Mod_auth_mysql for normal unloading

Linux uninstall PHP mysql Apache

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.