Software Installation and uninstall method under Linux rpm tar operating system _unix Linux

Source: Internet
Author: User
Tags bz2 advantage
Installation and uninstall of software under Linux operating system when installing software under Windows, simply run the Software installer (Setup, install, etc.) or untie the software with zip and so on to install and run the Anti-Setup program (uninstall, unware, uninstall) And so on) will be able to clean the software, fully graphical interface, simple to use the mouse has been clicked "next" on it. Linux seems to be different, many beginners complain that it is very difficult to install and uninstall software under Linux, and it is not as intuitive as using Windows. In fact, installing and uninstalling the software under Linux is also very simple, there are also installation wizards or decompression installations, except that in addition to binary forms of software distribution, there are many packages distributed in the form of source code, the following is a detailed talk about the installation and uninstall of these software:
Installation and uninstall of one or two-in-system distribution packages

Binary distribution of Linux software refers to the release form of a software package that has already been compiled in binary form, the advantage is that the installation is easy to use, the disadvantage is the lack of flexibility, if the package is for a specific hardware/operating system platform compiled, it can not be in a different platform or environment to perform correctly.

1, *.rpm form of binary package

Installation: Rpm-ivh *.rpm

Uninstall: Rpm-e Packgename

Description: RPM (RedHat packge Manager) is RedHat company out of the package manager, use it can easily to the RPM package installation, upgrade, uninstall, verify, query and other operations, installation is simple, It is also possible to remove files that are installed in multiple directories while uninstalling, so it is recommended that beginners use the RPM package as much as they can. The parameters of RPM are installation,-V is checksum,-H is to display the installation progress with a hash character, *.rpm is the file name of the package (here *.rpm refers to *. RPM-src.rpm files); parameter-E is the deletion of the package, Packgename is the package name, unlike the package file name, which is often a string that precedes the version number in the file name, such as apache-3.1.12-i386.rpm and apache-devel-3 .1.12-i386.rpm is the package file name, and their package names are Apache and Apache-devel respectively. More RPM Parameters please refer to the manual page: Man rpm.

If you do not like to install or uninstall these packages under the character interface, you can use the graphical interface package management program under X-window, such as glint, xrpm graphics interface, or KDE kpackge, so that the package installation, upgrade, uninstall, Verification and querying can be done easily by clicking the mouse.

2, *.tar.gz/*.tgz, *.bz2 form of binary package

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

Uninstalling: Deleting manually

Description: *.tar.gz/*.bz2 form of the binary package is the use of the TAR tools to package, with GZIP/BZIP2 compression, the installation of a direct solution package can be. For software that has only a single directory after decompression, uninstall with the command "RM-RF software directory Name", if the file is dispersed in multiple directories after decompression, you must one by one manual deletion (slightly troublesome), want to know what files are installed to the system during decompression, you can use the command "tar ztvf *.tar.gz"/"tar YTVF *.bz2 "Get the list. Tar parameter z is called gzip decompression, X is unpack, V is checksum, F is display result, Y is call bzip2 decompression, T is List of file packages. For more parameters Please refer to the man page: Man tar.

If you prefer the graphical interface operation, you can use KDE's Ark compressed file management tool under X-window.

3, provide the installation program package

Such packages already provide installation scripts or binary installation wizards (Setup, install, install.sh, etc.) that can be installed by simply running it, while uninstalling scripts or programs are provided accordingly. For example, Sun's StarOffice Office software suite uses the installer named Setup and provides the ability to reverse install after the software is installed, so there is less of this type of package because it installs and unloads the same way as Windows software, so there is no need to say more.

Installation and uninstall of source code distribution software package

The source code distribution of Linux software refers to the release form of all program source codes for the software. Require the user to compile their own executable binary code and install, the advantage is flexible configuration, you can remove or retain certain functions/modules, adapt to a variety of hardware/operating system platform and the compilation environment, the disadvantage is more difficult , generally not suitable for beginners to use.

1, *.src.rpm form of source code software package

Installation: Rpm-rebuild *.src.rpm

Cd/usr/src/dist/rpms

RPM-IVH *.rpm

Uninstall: Rpm-e Packgename

Description: The rpm--rebuild *.src.rpm command compiles the source code and generates a binary RPM package under/usr/src/dist/rpms, then installs the binary package. Packgename as mentioned earlier.

2, *.tar.gz/*.tgz, *.bz2 form of source code software package

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

Then go to the unpacked directory:

./configure Configuration

Make compilation

Make install Installation

Uninstalling: Make uninstall or manually removed

Note: It is recommended to read the description file after decompression, you can understand what needs to install, if necessary, you need to change the compilation configuration. The source code for some packages can be uninstalled with the make install command after compiling the installation, and if this feature is not available, the uninstall of the software must be manually removed. Since software may be able to distribute files across multiple directories of the system, it is often difficult to remove them cleanly, then you should configure them before compiling to specify that the software will be installed to the target path:./configure--prefix= directory name, so you can use the RM-RF software directory name command to perform a clean and thorough uninstall. Compared with other installation methods, users need to compile their own installation is the most difficult, it is suitable for the use of Linux has a certain experience of people, generally do not recommend the use of beginners.

On Linux software Installation and uninstall Lanche has said so much, but may also be asked how to know a tar.gz/bz2 package is a binary package or source code package? If you use the compression tool will understand that the compression package is not necessarily software, it may be a lot of backup pictures, but also may be packaged in common information, to distinguish it is what the best way is to look at the file list in the package, using the command tar ZTVF *.tar.gz/tar YTVF *. BZ2 or X-window under the use of Graphical Ark compressed file management tools can be, source code package files often contain a variety of source code files, header file *.h, C code source file *.c, C + + code source file *.cc/*.cpp, etc. , and the files in the binary package have executables (often the master execution file with the same name as the software), and the flag is in the path containing the directory named Bin (with only a few exceptions). Originally so simple ah, not quick point yourself try!
Related Article

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.