To know which components are installed, run the command rpm-qa | grephttpdrpm-qa | grepmysqlrpm-qa | grepphp to view the locally installed apache, mysql, and php services. If the returned result is null, the service is not installed on the local machine. [Root @ localhost ~] #... To know which components are installed, run the following command:
Rpm-qa | grep httpdrpm-qa | grep mysqlrpm-qa | grep php
You can view the apache, mysql, and php services installed on the local machine. If the returned result is null, the service is not installed on the local machine.
[Root @ localhost ~] # Rpm-qa | grep httpdhttpd-2.2.3-43.el5.centos
It indicates that the httpd component is already available on the local machine. If you want to uninstall it, run the following command:
Rpm-e httpd
Rpm-e is the command for uninstalling the rpm package, followed by the name. you do not need to enter the final version number.
If the associated software cannot be detached, you can uninstall the associated software before trying to uninstall it.
For example, the httpd of centos will be associated with gnome-user-share.