Install and uninstall software in Linux

Source: Internet
Author: User

1. Installation and uninstallation of binary distribution software packages

The binary distribution of Linux software refers to the release form of a compiled binary software package. Its advantage is that it is easy to install and use, and its disadvantage is that it lacks flexibility, if the software package is compiled for a specific hardware/operating system platform, it cannot be correctly executed on another platform or environment.

 

1.1 *. rpmBinary Software Package

Installation: rpm-IVH *. rpm

Uninstall: rpm-e packgename

Note: rpm (RedHat packge manager) is a software package manager provided by RedHat. It can be used to install, upgrade, uninstall, verify, and query software packages in RPM format, it is easy to install, and files installed in multiple directories can be deleted during unloading. Therefore, it is recommended that Beginners use software packages in the RPM format as much as possible. In RPM parameters,-I is the installation,-V is the verification, and-H is the use of hashes to display the installation progress ,*. rpm is the file name of the software package (here *. RPM refers *. SRC. files other than rpm with the suffix "rpm"); parameter-E is the software package to be deleted, and packgename is the software package name, which is different from the file name of the software package, it is usually a string located before the version number in the file name, such as APACHE- 3.1.12 -I386.rpm and apache-devel-3.1.12-i386.rpm are Package Names whose packages are Apache and APACHE-devel, respectively. For more RPM parameters, see man rpm.

If you do not like to install or uninstall these software packages on the Character interface, you can use graphical software package management programs such as glint and xrpm in X-window, or the kpackge of KDE. You can easily install, upgrade, uninstall, verify, and query the software package by clicking the mouse.

 

1.2 * .tar.gz/*. tgz, *. Bz2Binary Software Package

Installation: Tar zxvf * .tar.gz or tar yxvf *. bz2

Uninstall: manually delete

Note: The binary software package in the form of * .tar.gz/*. bz2 is packaged with the tar tool and compressed with gzip/Bzip2. You can unpack the package directly during installation. For software that only has a single directory after decompression, run the "RM-RF Software Directory Name" command during uninstallation. If the files are scattered in multiple directories, you must manually delete the files one by one (a little effort). To know which files are installed in the system during decompression, run the command "Tar ztvf * .tar.gz" or "Tar ytvf *. BZ 2" Obtain the list. The tar Parameter Z is to call gzip for decompression, X is to unpack, V is to verify, F is to show the result, Y is to call Bzip2 for decompression, and T is to list the file list of the package. For more parameters, see man tar.

If you prefer graphic operations, you can use KDE's Ark compression file management tool in X-window.

 

1.3Package that provides the installer

These software packages provide installation scripts or binary Installation Wizard programs (setup, install, install. sh, etc.), you only need to run it to complete the software installation; while the uninstallation also provides a script or program for reverse installation. For example, sun's StarOffice software suite uses the Setup installer and provides the reverse installation function after the software is installed. Currently, there are few such software packages, because the installation and uninstallation methods are the same as those for Windows software, you do not need to talk about them more.

 

2. Installation and uninstallation of source code distribution packages

The source code distribution of Linux software refers to the release form of the source code of all programs of the software. You need to compile and install the executable binary code on your own. The advantage is that the configuration is flexible, some functions/modules can be removed or retained at will to adapt to a variety of hardware/operating system platforms and compiling environments. The disadvantage is that it is difficult and is generally not suitable for beginners.

 

2.1 *. SRC. rpmSource code package

Install: rpm-rebuild *. SRC. rpm

CD/usr/src/Dist/RPMS

Rpm-IVH *. rpm

Uninstall: rpm-e packgename

Note: The rpm -- rebuild *. SRC. RPM command compiles the source code and generates a binary RPM package under/usr/src/Dist/RPMs. then install the Binary Package. Packgename is described above.

2.2 * .tar.gz/*. tgz, *. Bz2Source code package

Install: Tar zxvf * .tar.gz or tar yxvf *. bz2, decompress the package, and enter the directory after decompression. Enter the following commands:

./Configure (configuration, options can be added)

Make (Compilation)

Make install (installation)

Uninstall: Make uninstall or manually delete

Note: It is recommended that you decompress the package and read the instruction file to learn about the installation requirements and modify the compilation configuration when necessary. The source code of some software packages can be uninstalled by using the make uninstall command after compilation and installation. If this function is not provided, the software must be manually deleted. Because the software may install files in multiple directories of the system, it is often difficult to delete the files, you should configure them before compilation, specify the path to which the software will be installed :. /configure -- prefix = directory name. In this way, you can run the "RM-RF Software Directory Name" command to thoroughly uninstall the directory. Compared with other installation methods, it is the most difficult to compile and install by yourself. It is suitable for users who already have some experience in Linux. It is generally not recommended for beginners.

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.