General methods for software installation and uninstall under Linux __linux

Source: Internet
Author: User
Tags bz2
1, with "rpm" as the suffix of the binary package
Installation: Rpm-ivh *.rpm
Uninstall: Rpm-e PackageName
Parameter-I indicates installation,-V is checksum,-H is the installation progress with a hash character,-E is the deletion package, Packgename represents the package name (not including the. rpm suffix), which is the string before the version number.
Before uninstalling the software, you should first know the name of the package that is registered in the system, and you can query using the command: Rpm-q-a combined with grep. Once you have determined the name of the package you want to uninstall, you can begin uninstalling the command as shown above.
Because of the dependencies between the various packages in the system, if this dependency does not uninstall, RPM will give prompt and stop the uninstall, at this point, you can use the command rpm-e--nodeps packagename to ignore dependencies, direct uninstall. Of course, ignoring the uninstall of dependencies may cause some other software in the system to not work properly and should think twice before uninstalling.
2, "src.rpm" as the suffix of the source software package
Installation: First use the command rpm-rebuild *.src.rpm to compile the source code and generate a binary RPM package under/usr/src/dist/rpms, and then RPM-IVH *.rpm install the binary package.
Uninstall: Ibid., Rpm-e packgename
3. Binary package with "tar.gz" and ". bz2" as suffix
Installation: Tar zxvf *.tar.gz, tar jxvf *.bz2
Parameter-Z calls Gzip,-x is unpack,-V is checksum,-f specifies the file name of the package, this item is usually required,-j calls bZIP. Of course, these parameters are not absolutely to be added, such as the-v argument, or you can use some other parameters, but I am accustomed to write this.
Uninstalling: Deleting manually
4. Source code package with "tar.gz" and ". bz2" as suffix
Use the command tar zxvf *.tar.gz or tar jxvf *.bz2 for decompression, then into the unpacked directory, followed by a well-known three-step:./configure (configuration), make (compile), make install (install). It is recommended that the decompression after the so-called "three-step", but should first look at the relevant documentation, to understand the requirements of software installation requirements, in order to provide the appropriate parameters in the configuration.
My usual practice is, after entering the unpacked directory, first use the LS command to see what files are in the directory. Usually in the unpacked directory, there will be a "Install" of the plain text file, you may wish to look inside the content, which details the installation method of the package. Of course, it is sometimes found that this "Install" is an executable file.
I've encountered an executable file with setup in a similar way to Windows software installation (this is a relatively small number of cases, of course), which is more convenient for users who are less accustomed to using Linux. Also, is a suffix of "bin" installation files, before the installation of the first check its execution permissions. If you do not have executable permissions, first give it permission to execute, and then run like a normal executable file.
After installation, you should clear the files generated during the compilation process and the temporary files generated during the configuration process, and you can use the commands: Make clean and made Distclean.
The source code for some packages can be uninstalled using the make uninstall command after the compilation is installed, and if this feature is not provided, the uninstall of the software is only manually removed. Because software may spread files across multiple directories in the system, manual removal is often difficult to remove, which may be a headache for many people. Therefore, it is common practice to specify the target path to which the software will be installed, that is, "./configure--prefix= directory name," at the pre-compile configuration stage, so that you can use the command "RM-RF directory name" to perform a clean and thorough uninstall.

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.