In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to uninstall apache under linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to uninstall apache under linux.
Method one
The code is as follows:
Root@server ~] # rpm-qa | grep httpd
Httpd-2.2.3-11.el5_2.centos.4
Httpd-manual-2.2.3-11.el5_2.centos.4
Note: rpm-qa | grep mysql command is to list all mysql-related packages. My above example is the list of rpm packages that Linux installs apache by default. The list may be different if it is another Linux version, but don't worry, no matter what it is, uninstall starts from the bottom package until the first one is uninstalled.
For example, in this example, we should uninstall the httpd-manual-2.2.3-11.el5_2.centos.4 method first as follows:
The code is as follows:
Rpm-e httpd-manual-2.2.3-11.el5_2.centos.4
(generally speaking, it is not necessary to bring the version number, for example, it can be written directly as rpm-e httpd-manual)
The code is as follows:
Rpm-e httpd-- nodeps
Php and mysql are uninstalled in the same way as apache.
Note: if you can't uninstall when uninstalling, the system will generally prompt for package dependencies and list the names of dependent packages. Uninstall prompted dependent packages first.
If there is a package that cannot be uninstalled, you can add the parameter-nodeps to uninstall it. For example, if we uninstall httpd-manual-2.2.3-11.el5_2.centos.4, it cannot be uninstalled. Just use:
[root@localhost] # rpm-e httpd-manual-2.2.3-11.el5_2.centos.4-- nodeps
Method two
The code is as follows:
Uninstall the command apache
Sudo apt-get remove apache
Uninstall the association
Sudo apt-get autoremove
Manually delete configuration
Sudo find / usr-name "* apache*"-exec rm-rf {}
Sudo find / etc-name "* apache*"-exec rm-rf {}
Sudo find / var-name "* apache*"-exec rm-rf {}
Similarly, you can use this method to uninstall other software.
Description: rpm-qa | grep httpd command is used to list all apache-related packages. My example above is the list of rpm packages in which apache is installed by default in Linux AS4.
Description: rpm-e is the command to uninstall the rpm package, followed by the package name, the final version number is not required.
Rpm-e xxxx
Note: if you can't uninstall when uninstalling, the system will generally prompt for package dependencies and list the names of dependent packages. Uninstall prompted dependent packages first.
If there is really a package that cannot be uninstalled, you can add the parameter-nodeps to uninstall it. For example, if we uninstall php-4.3.9-3.15, it really cannot be uninstalled.
such as
View the source code printing help
Rpm-e xxx-- nodeps
Notice that there are two-
Description: RPM (RedHat Packge Manager) is a RedHat software package manager, it can be easily used to install, upgrade, uninstall, verify, query and other operations of the rpm form of software packages, and uninstall the software can also be installed in multiple directories to delete clean files, so it is recommended for beginners to use the rpm form of software packages as much as possible. In the parameters of rpm,-I is the installation,-v is the check,-h is the installation progress with a hash, and * .rpm is the file name of the software package (here * .rpm refers specifically to files other than * .src.rpm with the suffix rpm). The parameter-e is the deleted package, and packgename is the package name, which is different from the file name of the package. It is often the string that precedes the version number in the file name. For example, apache-3.1.12-i386.rpm and apache-devel-3.1.12-i386.rpm are the package file names, and their package names are apache and apache-devel, respectively. For more rpm parameters, please see the man page: man rpm.
If you do not like to install or uninstall these packages under the character interface, you can use graphical package management programs with graphical interfaces such as glint, xrpm, or KDE kpackge under X-Window, so that the installation, upgrade, uninstallation, verification and query of the software package can be easily completed with the click of the mouse.
2. Binary software package in the form of * .tar.gz/*.tgz, * .bz2
Install: tar zxvf * .tar.gz or tar yxvf * .bz2
Uninstalling: manually deletin
Description: the binary package in the form of * .tar.gz / * .bz2 is packaged with tar tools and compressed with gzip/bzip2, and can be unpacked directly during installation. For software with only a single directory after decompression, uninstall with the command "rm-rf software directory name"; if the files are scattered in multiple directories, you must delete them one by one (slightly troublesome). If you want to know which files are installed in the system when unpacking, you can use the command "tar ztvf * .tar.gz" / "tar ytvf * .bz2" to get the list. The parameter z of tar is to call gzip to extract, x is to unpack, v is to check, f is to display the result, y is to call bzip2 to extract, and t is the list of files to list the package. For more parameters, see the man page: man tar.
At this point, I believe you have a deeper understanding of "how to uninstall apache under linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.