Centos software management tools rpm and yum

Source: Internet
Author: User
Default rpmrpm installation path:



Rpm installation (install ):


Note: You can also install: rpm-IVH http://website.name/path/pkgname.rpm via network

Force installation:



Rpm upgrade and update (upgrade/freshen): (you can also connect the following -- nodeps/-- force and so on)



Rpm query ):
Note: During rpm query, the database files under the/var/lib/RPM/directory are actually queried.





Rpm verification and digital signature (verify/signature ):



For example:

The first eight pieces of information are:
S: (file size differs) whether the file capacity is changed
M: (mode differs) is the rwx attribute of the archive type quit archive changed? Parameters such as executable have been changed
Digest 5: (MD5 sum differs) the content of the digest code is different.
Mongod :( device major/minor number mis-match) the master/sub code of the device has changed
L :( readlink (2) path mis-match) the link path has been changed
 U :( user ownership differs) the owner of the file has been changed
 G :( group ownership differs) the group to which the archive belongs has been changed
Snapshot T: (mtime differs) the file creation time has been changed.

The second row means: Configure C: Config File)
Mongod: file data file (documentation)
Ghost G: ghost file ~ Generally, this file is not packaged by a software, but rarely occurs! (Ghost file)
License L: license file)
Dead R: Read me)

Digital Signature: verification can only verify information in the software and the database information in/var/lib/RPM, if the data provided by the software file is faulty, you cannot determine the correctness of the software by means of verification. Solution: 1. First, you must install the public key file released by the original manufacturer;
2. When the original RPM software is installed, the RPM command reads the seal information of the RPM file and compares it with the seal information in the local system,
3. If the seal is the same, install it. If you cannot find the relevant seal information, give a warning and stop the installation.





Rpm reverse installation and database reconstruction Note: dependency issues must be taken into account to uninstall a software. For example, if software B depends on the function library provided by a, but I want to uninstall software a, an error will be reported and it will not be uninstalled, B cannot be used because it is uninstalled. However, you can add -- nodeps to force the removal, but the software dependent on the function library cannot be used (Force uninstallation is not recommended ).


But it can be deleted without any information:


Due to some actions, files in the RPM database/var/lib/RPM/may be damaged, and the RPM database must be rebuilt.


Yum query function: Yum [list | info | search | provides | whatprovides] Parameter





Install/upgrade: Yum [install | update] software:




Function removed: Yum [remove] software:
Will automatically help us solve the dependency problem


Yum configuration file:
One of the container files is:


Container [base]: The container name! The scratch mark must exist, and the name in it can be obtained at will. However, there cannot be two identical container names. Otherwise, yum will not know where to find the list of container-related software files.
Container name: Just to explain the meaning of this container, the importance is not high!

 Mirrorlist list =: lists the ing platforms that can be used by this container. If you do not want to use the ing platform, you can annotate this line;

Required baseurl =: This is the most important because the actual URL of the container is followed! The image list is captured by the yum program, while the baseurl is a fixed container URL!

Container enable = 1: enables the container to be started. If you do not want to enable the Token, you can use enable = 0!

Export gpgcheck = 1: Do you still remember the RPM digital signature? This specifies whether to check the digital signature in the RPM file!

Export gpgkey =: the location of the digital signature public key file! Use the default value.


If some software is not provided by the system's default container, you can use the container provided by the software: in/etc/yum. repos. d. Create a new file under the file. The extension must be. repo (generally, the RPM installation method is used to install the container, and you do not need to create a new file. For more information, see the author's blog "centos7 install MySQL through yum").
For example, MySQL container:

View the containers currently used by Yum:



Yum will first download the container list to/var/Cache/Yum on the local machine. If we modify the URL in a container, the container name (text in brackets) is not modified, which may cause the list of the local machine to be not synchronized with the list of the yum server. In this case, the container name cannot be updated.

So you need to clear it:


Yum software group function:






Automatic System Upgrade:



Reference: laruence's private kitchen
Reprinted please indicate the original source: http://blog.csdn.net/u012367513/article/details/40681551

Centos software management tools 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: 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.