LINUX RPM Package Management

Source: Internet
Author: User

    • Package Manager Classifications

Debian : Deb, DPT

redhat:rpm (Redhat Program Manager )

Gentoo

ArchLinux

How to manage Packages:

Using Package Manager: RPM

Using the front end tool: Yum, DNF

    • COMMAND

    1. Installation

RPM {-i|--install} [install-options] Package_file

-v:verbose

-VV:

-H: Show packages to manage execution progress; Each # represents 2% progress

RPM-IVH Package_file ... Common

[Install-options]

--test: Test installation, but do not actually perform the installation process; dry run mode;

--nodeps: Ignoring dependencies;

--replacepkgs: Reinstall;

--nosignature: Do not check the legitimacy of the source;

--nodigest: does 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

    1. Upgrade

RPM {-u|--upgrade} [install-options] package_file ...

RPM {-f|--freshen} [install-options] package_file ...

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;

Common commands

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;

    1. Inquire

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;

#ldconfig-P libraries that have been loaded in the cache

Rpm-qf/etc/fstab query which package installation builds a file

RPM-QPL zsh-5.0.2-14.el7.x86_64.rpm used to implement query operations on packages that are not installed

# rpm-q--whatprovides Bash queries the specified capability is provided by which package

--whatrequires capability query specifies which package the capability is dependent on

--changelog Query Modification Date

-QC: Querying the configuration file provided by the specified package

-QD: Querying the Help documentation provided by the specified package

--provides: Lists all the capabilit that are provided by the specified package

-R: Querying the dependencies of the specified package

This article is from the "Qinnengbuzhuo" blog, make sure to keep this source http://echoroot.blog.51cto.com/11804540/1923057

LINUX RPM Package Management

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.