Linux System Management-(8)-RPM Package Manager

Source: Internet
Author: User
Tags gpg md5

CentOS Next RPM Package Manager:

Installation:

rpm {-i|--install} [install-options] package_file ...
-V: Display procedure
-VV: Show more detailed procedures
-H: Show packages to manage execution progress; Each # represents 2% progress
Other options:

--test Test Installation

                  --nodeps: Ignore dependencies;
                     --replacepkgs: Re-install;

                    --nosignature: Does not check the legitimacy of the source;
                    --nodigest: Do not check package integrity;

--noscipts: Do not execute Package script fragment;
%pre: Pre-installation;--nopre
%post: Post-installation script;--nopost
%preun: Unloading the forefoot;--nopreun
%postun: Post-uninstall script;--nopostun


Upgrade:
RPM {-u|--upgrade} [install-options] package_file ... Upgrade and Installation
RPM {-f|--freshen} [install-options] package_file ... Pure upgrade

Upgrage: Install an older version of the package, then "Upgrade", or "install" if there is no legacy package;
Freeshen: Install an older version of the package, upgrade, or do not perform the upgrade if there is no legacy package;

RPM-UVH Package_file ...
RPM-FVH Package_file ...

--oldpackage: Downgrade;
--force: Forced escalation;

Note: (1) do not upgrade the kernel, Linux supports multi-core version coexistence, therefore, the direct installation of the new version of the kernel;
(2) If the original package configuration file has been modified after installation, long, the new version of the same configuration file provided does not directly overwrite the old version of the configuration file, and the new version of the file renamed (Filename.rpmnew) after the reservation;

Enquiry:
RPM {-q|--query} [select-options] [query-options]

[Select-options]
-A: All packages
-F: To see which package installs the specified file for build

-p/path/to/package_file: Query operation for the package files that have not been installed;

--whatprovides CAPABILITY: Query The specified CAPABILITY is provided by which package;
--whatrequires CAPABILITY: The query specifies which packet the CAPABILITY is dependent on;

[Query-options]
--changelog: Query rpm Package for Changlog
-C: Querying the program's configuration file
-D: Querying the program's documentation
-i:information
-L: View all files generated after the installation of the specified package;
--scripts: Script fragment with package comes in
-r: Query the capability that the specified package depends on;
--provides: Lists the capability provided by the specified package;

Usage:
-qi package,-QF FILE,-QC package,-QL package,-QD package
-qpi Package_file,-qpl package_file, ...

-qa


Uninstall:
RPM {-e|--erase} [--allmatches] [--nodeps] [--noscripts]
[--notriggers] [--test] Package_name ...


Checksum:
RPM {-v|--verify} [select-options] [verify-options]

Size S File size differs
Permissions M Mode differs (includes permissions and file type)
MD5 5 Digest (formerly MD5 sum) differs
Device file, primary and secondary equipment number D device Major/minor numbers mismatch
Path L readlink (2) path mismatch
Owner U User ownership differs
Genus G Group ownership differs
Modified Time T MTime differs
Ability P capabilities differ

To import the required public key:
RPM--import/path/from/gpg-pubkey-file

Key files provided by the CentOS 7 release CD: Rpm-gpg-key-centos-7


Database rebuild:
RPM {--INITDB|--REBUILDDB}
--INITDB: Initialization
If the database does not exist beforehand, it is created; otherwise, no action is taken;

--REBUILDDB: Rebuilding
Re-create the database directly, regardless of the current presence or not;

Linux System Management-(8)-RPM Package Manager

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.