Step

  
of CentOS uninstalling lamp environment

When you are learning PHP, you need to install the lamp environment under CentOS system. It is not so easy to install and uninstall. Because lamp is composed of Apache, MySQL and PHP, you need to uninstall one by one. I will introduce you to the method of uninstalling the lamp environment in CentOS.

First, uninstall Mysql

[root @ localhost ~] # rpm -qa | Grep mysql

mod_auth_mysql-2.6.1-2.2

php-mysql-4.3.9-3.15

mysql-devel-4.1.20-1.RHEL4.1< Br>

mysql-4.1.20-1.RHEL4.1

mysqlclient10-3.23.58-4.RHEL4.1

libdbi-dbd-mysql-0.6.5-10 .RHEL4.1

Description: rpm –qa |  Grep mysql command is to list mysql related packages, my example above is Linux AS4 default installation

mysql rpm package list,

If other Linux versions are listed The list may be different, but don't worry, no matter what, the uninstall starts from the bottom of the package until the first one is uninstalled.

Description: rpm –e is the command to uninstall the rpm package, followed by the package name, the last version number is not required, such as our next uninstall

mysqlclient10-3.23.58- 4.RHEL4.1 package

The method is as follows:

rpm –e mysqlclient

Second, uninstall Apache

[root@localhost ~]# rpm -qa| Grep httpd

httpd-manual-2.0.52-25.ent

system-config-httpd-1.3.1-1

httpd-2.0.52-25. Ent

httpd-suexec-2.0.52-25.ent

Description: The method is the same as uninstalling Mysql, needless to say

Third, uninstall PHP

[root@localhost ~]# rpm -qa| Grep php

php-odbc-4.3.9-3.15

php-4.3.9-3.15

php-mysql-4.3.9-3.15

php-pear-4.3.9-3.15

php-ldap-4.3.9-3.15

php-pgsql-4.3.9-3.15

Description: Method Uninstalling Mysql is the same as

Note: If you can't uninstall when uninstalling, the centos system will usually prompt the package's dependencies, and list the names of the dependent packages. You can uninstall the packages that depend on the prompts.

If there is really a package that can't be uninstalled, you can add the —nodeps parameter to uninstall. For example, we uninstall php-4.3.9-3.15, it can't be uninstalled.

Just use:

[root@localhost ~]# rpm -e php-4.3.9-3.15 –nodeps

If the previous ones are not

can try to use the command yum remove mysql

yum remove php

yum remove httpd

The above is the CentOS system uninstall the lamp environment method, uninstall Apache, MySQL, PHP's approach is basically the same, not too difficult.

Copyright © Windows knowledge All Rights Reserved