Linux Software Installation and uninstallation

Source: Internet
Author: User

Guide Linux is the general Software installation method in addition to the binary form of software distribution, there is a source code form of the package, the following is the installation and uninstallation of two kinds of software
installation and uninstallation of a binary distribution package

Binary distribution of Linux software refers to the distribution form of a package that has been compiled in advance, and the advantage is that it is easy to install, the disadvantage is the lack of flexibility, if the package is compiled for a specific hardware/operating system platform, it can not be executed correctly in another platform or environment.

1, *.rpm form of binary package

Description: RPM (RedHat packge Manager) is a software package manager for RedHat, which makes it easy to install, upgrade, uninstall, verify, query, and so on in RPM-form packages, with simple installation It is also possible to remove files that are installed in multiple directories when the software is uninstalled. *.RPM is the file name of the package (here the *.rpm refers specifically to *.src.rpm other than the rpm-suffix file);

RPM Common parameters:-IVH: Installation Display installation progress [INSTALL--VERBOSE-HASH]-UVH: Upgrade Package [UPDATE];-QPL: List the file information in the RPM package [Query Packages list] ;-qpi: Lists description information for RPM packages [query package install package (s)];-QF: Find which rpm package the specified file belongs to [query File];-va: Verify all RPM packages to find missing files [ View LOST];-E: Deleting a package
2, *.tar.gz/*.tgz, *.bz2 form of binary package

Note: Binary packages in *.tar.gz/*.bz2 form are packaged with the TAR tool, compressed with GZIP/BZIP2, and unpacked directly when installed. For only a single directory after decompression software, uninstall with the command "RM-RF software directory Name"; If the files are scattered in the directory after decompression, you must one by one manual removal, you want to know what files are installed to the system when extracting, you can use the command "TAR-ZTVF *.tar.gz"/"TAR-JTVF * . bz2 "Get the manifest. The tar parameter z is called gzip decompression, X is unpacked, V is checksum, F is the display result, J is called Bzip2 Decompression, T is the list of files listing the package.

package that provides the installer

Such packages already provide installation scripts or Binary Setup Wizard programs (Setup, install, install.sh, etc.), which can be installed by running the software, and an anti-installation script or program is provided when uninstalling. And after the software installation to provide anti-installation features, this type of package is still relatively small.

installation and uninstallation of the source code distribution package

The source code distribution of the Linux software provides the form of the release of all the software program sources, requires the user to compile the executable binary code and install it, and install it according to the different application environment. Flexible configuration, you can arbitrarily remove or retain certain functions/modules, adapt to a variety of hardware/operating system platform and the compilation environment, more difficult.

1, *.src.rpm form of source code package
Installation: Rpm-rebuild *.src.rpm       Cd/usr/src/dist/rpms       

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

FA 1:rpm-i your-package.src.rpmcd/usr/src/redhat/specsrpmbuild-bp your-package.specs           #一个和你的软件包同名的specs文件cd/usr /src/redhat/build/your-package/    #一个和你的软件包同名的目录./configure                    #这一步和编译普通的源码软件一样, you can add parameter Makemake instal
FA 2:rpm-i you-package.src.rpm cd/usr/src/redhat/specs  #前两步和方法一相同rpmbuild-bb your-package.specs   # A specs file with the same name as your package at this time in/usr/src/redhat/rpm/i386/(depending on the specific package, it may be i686,noarch, etc.) in this directory, there is a new RPM package, this is a compiled binary file. Rpm-i new-package.rpm can be installed.
2, *.tar.gz/*.tgz, *.bz2 form of source code package
Installation: TAR-ZXVF *.tar.gz  or  tar-jxvf *.bz2 first unzip and then into the extracted directory: configuration:./configure  Compile: Make install: Make installation  

Note: It is recommended to read the documentation before extracting, to understand what the installation needs, if necessary, you need to change the compilation configuration. The source code of some packages can be uninstalled with the make uninstall command after compilation and installation, and if this feature is not provided, the uninstallation of the software must be manually removed. Since the software may be distributed across multiple directories in the system, it is often difficult to remove it cleanly, you should configure it before compiling, specifying that the software will be installed to the target path:./configure--prefix= directory name, so you can use "RM-RF Software directory Name" command to perform a clean and thorough uninstallation. It is most difficult to compile and install by yourself compared to other installation methods.

Decompression source package: [[email protected] ~]# TAR-ZXVF   zip-2.3-27.tar.gz (or tar-jzxf    zip-2.3-27.tar.bz2) into the extracted source package directory, to install: [[ Email protected] ~]# CD Zip-2.3-27[[email protected] zip-2.3-27]#./configure--prefix= ....    &&   make   && make install uninstall source package: [[email protected] zip]# make Uninstall

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/

Linux Software Installation and uninstallation

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.