CentOS uninstall Apache Mysql and php

At present, the new version of Centos system will integrate Apache services, and when we install some functions, we need a completely pure system, so we need to uninstall apache's httpd.

First we need to know which components we have installed, by command

rpm -qa|grep httpd
rpm -qa|grep mysql
rpm -qa|grep php

You can view the apache, mysql and php services installed on the machine respectively. If the return is empty, it means that the service is not installed on this machine.

For example, when the author enters the first command, the return is:

[root@localhost ~]# rpm -qa|grep httpd
httpd-2.2.3-43.el5.centos

It means that the machine already has the httpd component. If we want to uninstall it, we enter the following command:

rpm -e httpd-2.2.3-43.el5.centos

rpm -e is the command to uninstall the rpm package, followed by the name, and the final version number can be omitted. If we need to uninstall multiple apps, just enter it multiple times.

If you can't uninstall it, you can add the --nodeps parameter to uninstall it. For example, if we uninstall httpd-2.2.3-43.el5.cento, it can't be uninstalled:

rpm -e httpd-2.2.3-43.el5.centos --nodeps

You can use the above command to uninstall, see that there are two behind -


{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324041968&siteId=291194637