Software installation methods for CentOS rpm and Yum

Source: Internet
Author: User
Tags gpg

The software installation of CentOS can be broadly divided into two types:
[centos]rpm file installation, use RPM directive similar to [Ubuntu]deb file installation, use dpkg directive [Centos]yum Install similar [ubuntu]apt-get install RPM command

(a) query system installed software information
For a RPM package, there are "-" and "." Consists of the following parts: * Package Name * Version Information * Release version number * Run platform, when Noarch appears, represents the software can be platform compatible 1) query the system has installed software
2) query which package a file is already installed in;
RPM-QF absolute path to file name
3) query where the installed packages are installed;
Software name definition is: RPM Package removal platform information and suffix information
RPM-QL Software Name
4) query information for an installed package
Rpm-qi Software Name
5) Check the configuration file of the installed software;
RPM-QC Software Name
6) View a document where the software has been installed:
RPM-QD Software Name
7) Check the packages and files on which the software is installed;
RPM-QR Software Name

(b) For non-installed package information query
1) To view the use of a software package, version and other information;
Rpm-qpi rpm File
2) View the files contained in a package;
RPM-QPL rpm File
3) View the location of the package's documentation;
RPM-QPD rpm File
4) View the configuration file of a package;
RPM-QPC rpm File
5) View dependencies for a package
RPM-QPR rpm File

(iii) installation, upgrading, deletion of software packages, etc.
1) Install or upgrade a RPM package
RPM-IVH rpm File "Install" RPM-UVH rpm file "Update"
2) Delete a RPM package
RPM-E Software Name
How to force removal of software, regardless of dependencies, and add--nodeps after the above command

(iv) Signature Import
RPM--import Signature file rpm--import Rpm-gpg-key
Yum command
(i) the basic concept of Yum
1) What is Yum?
Yum = Yellow Dog Updater, Modified main function is more convenient to add/remove/update RPM packages.  It can automatically solve the dependency problem of the package. It makes it easy to manage a large number of system update issues
2) Features of Yum

Multiple repository (Repository) Concise profiles can be configured at the same time (/etc/yum.conf automatically resolves dependency issues encountered when adding or removing RPM packages easy to maintain consistency with RPM database
3) Yum Installation
CentOS comes with (yum-*.noarch.rpm) #rpm-IVH yum-*.noarch.rpm first need to import the system's Rpm-gpg-key before enabling Yum for the first time:

(ii) Use of Yum directives
When using the Yum management software for the first time, Yum will automatically download the required headers placed in the/var/cache/yum directory;

1) Update of RPM package

Yum Check-update
Yum Update

Yum Update kernel

Yum Upgrade

2) Installation and removal of RPM packages
Yum install XXX "service name"
Yum Remove xxx "service name"
3) information about the Yum cache

Yum Clean Packages
Yum Clean headers
Yum Clean Old headers
Yum Clean All

4) Package Information query
Yum List

Yum List firfox*
N: You can use wildcard characters in RPM package names to query similar RPM packages

Yum list Updates

Yum List installed

Yum List Extras
N: The RPM package that is installed by downloading the website

#rpm包信息显示 (info parameter with list), lists all the RPM packages that can be installed or updated in the repository
Yum Info


Yum Info firefox*
N: You can use the match in the RPM package name

Yum Info Updates


Yum Info installed

Yum Info Extras
N: Information about the RPM package installed by downloading the website

Yum Search Firofox
Yum provides Firefox

(iii) Yum software source update

Software installation methods for CentOS rpm and Yum

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: 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.