LINUX01-RPM package in-depth explanation 40

Source: Internet
Author: User
Tags gpg


One, RPM package

1. RPM Database directory:/var/lib/rpm

2, RPM function: Installation, query, uninstall, upgrade, calibration, database reconstruction, check the data packet, and other work;

3, RPM Package components:

A) Main package:

such as: bind-9.7.1-1.el5.i586.rpm

B) Sub-package:

such as: bind-libs-9.7.1-1.el5.i586.rpm

bind-utils-9.7.1-1.el5.i586.rpm

4, RPM Package name format: name-version (major.minor.releas)-release.arch.rpm

A) Major.minor.release said:

Major version number: significant improvements

Minor version number: A significant change in a child function

Issue number: Fixed some bugs, adjusted a bit of functionality

b) Release.arch said:

Release: version and Support system;

Arch says: What platform is supported to run; Noarch means that it can be run under either 32-bit or 64-bit platforms; PPC indicates PowerPC under operation; for example: bind-9.7.1-1.noarch.rpm and bind-9.7.1-1.ppc.rpm;

Second, RPM Package Management command

1. Installation

Rpm-i/path/to/package_file

-H: Show progress by #, each # represents 2%;

-V: Show detailed procedures

-VV: A more detailed process

Rpm-ivh/path/to/package_file

such as: rpm-ivh/mnt/centos/zsh-4.2.6-8.el5.i386.rpm

--nodeps: Ignoring dependencies;

--replacepkgs: Re-install, replace the original installation;

--force: Forced installation, can be re-installed or degraded;

such as: Rpm-ivh--replacepkgs/mnt/centos/zsh-4.2.6-8.el5.i386.rpm

2. Enquiry

A) rpm-q package_name: Query whether the specified package has been installed;

b) Rpm-qa: Query All packages that have been installed;

Example: Rpm-qa | grep "^z

c) Rpm-qi package_name: Query The description information of the specified package;

d) RPM-QL package_name: Query the list of files generated after the installation of the specified package;

e) RPM-QC paceage_neme: Query the configuration file for the specified package installation;

f) RPM-QD package_name: Query the Help file for the specified package installation;

g) rpm-q--scripts package_name: Query the script contained in the specified package;

such as: Rpm-q--scripts zsh

h) Rpm-qf/path/to/somefile: Queries the specified file is generated by which RPM package is installed;

such as: Rpm-qf/etc/inittab

i) if a RPM package has not been installed, we need to query its description information and install the files that will be generated later:

Rpm-qpi/path/to/package_file

Rpm-qpl

3. Upgrade

A) Rpm-uvh/path/to/new_package_file: If the old version is installed, upgrade;

such as: RPM-UVH nano-1.3.12-1.1.1.gls.i386.rpm

b) Rpm-fvh/path/to/new_package_file: If the old version is installed, then upgrade;

--oldpackage: Downgrade

4. Uninstall

RPM-E package_name

--nodeps: Ignoring dependencies;

5. Check

Rpm-v package_name: Verify that the installed files are modified;

6. Rebuilding the database

Rpm

--REBUILDDB: Rebuilding the database will be re-established;

--INITDB: Initialize the database, not only build, there is no need to establish;

7, check the source legality, and package integrity;

A) encryption type:

Symmetric: Encrypt and decrypt using the same key

Public key: A pair of keys, public key, private key, the public key is implied in the private key, can be extracted, and publicly out;

Unidirectional:

b) RH key file:/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release

c) How to verify?

C1) RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release: Import Key file

C2) Rpm-k/papt/to/package_file

DSA, GPG: Verification of the legitimacy of the source, that is, to verify the signature; You can use--nosignature to skip this item;

SHA1, MD5: Verification package integrity, can use--nodigest, skip this;


This article is from "Nick Liu's blog," Please make sure to keep this source http://zkhylt.blog.51cto.com/3638719/1410543

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.