Package Manager (top)

Source: Internet
Author: User


A compiled binary application file is part of a binary file, library files, configuration files, Help files, the user setup cumbersome, and in the user upgrade, uninstall and other operations more troublesome. In order to improve the efficiency and simplify the operation automatically, it is urgent to have a package manager.

The main function of Package Manager what is it? Its main function is to package the compiled application of the constituent files of one or more package files, so as to quickly and easily implement the package installation, uninstallation, query, upgrade and verify management operations. And now there are four main types of package managers: (1)DebianDevelopment Package Manager, Package Manager is calledDPTPackage Manager, (2)RedHatCompany'srpmPackage Manager, (3)GentooThe company's Package Manager (4)ArchLinuxPackage Manager. And the Red Hat Package manager in the four mainstream package management has becomeLinuxThe industry standard of the package, so today the protagonist is Red Hat Company'srpmManager.

Today we will briefly introduce the commands and use of the RPM Package Manager on the CENTOS7 system. Mainly divided into six parts: installation, uninstallation, upgrade, query, calibration, and database maintenance.

RPM:RPM Package Management Commands

1) Installation

Instruction format: rpm {-i | install} [install-options] package_file ....

The specific usage is: RPM {installation command} [installation options] Package file ....

-V: Show details

-VV: Show more detailed information

-H: Displays the progress of the installation with the # number, each # represents 2% progress

-i|install: Install package, install the option that can be followed by the specific installer package

Common installation options are:

--tet: Tests the installation, but does not actually perform the installation process, only for testing use.

--nodeps: Ignoring dependencies of packages

--replacepkgs: Reinstall package

--nodigest: Package integrity is not checked

--signature: Does not check the source legitimacy of the package

--noscipts: A script fragment that does not execute a package


After reviewing the command usage information, I'll show you how to use the installation command:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/68/wKiom1Xi4juCQ5fDAAGpWbgDA1c673.jpg "style=" float: none; "title=" Image 1.png "alt=" Wkiom1xi4jucq5fdaagpwbgda1c673.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/64/wKioL1Xi5FiDUDV9AAGyr36rX8Y203.jpg "style=" float: none; "title=" Image 2.png "alt=" Wkiol1xi5fidudv9aagyr36rx8y203.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/68/wKiom1Xi4jyh9ktDAANS0vnC3zU248.jpg "style=" float: none; "title=" Image 3.png "alt=" Wkiom1xi4jyh9ktdaans0vnc3zu248.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/64/wKioL1Xi5FrggoXAAAHy5YzjXhE421.jpg "style=" float: none; "title=" Image 4.png "alt=" Wkiol1xi5frggoxaaahy5yzjxhe421.jpg "/>


2) Upgrade:

Instruction format: rpm {-u|--upgrade} [install-options] Package_file

RPM {-f|--freshen} [install-options] Package_file

This upgrade command is for two classes:

U|--upgrade: Install is an older version of the package--upgrade, if there is no old version of the package--install.

F|freshen: Install an older version of the package--upgrade if there is no old version of the package--and do not do the operation

---lodpackage: Downgrade the version of the installation package

--force: Enforcing the action


Considerations to Upgrade:

1, do not upgrade the kernel, Linux supports multiple versions of the kernel coexistence mechanism, so you can directly install the new version of the kernel.

2, if the original package configuration file after installation of this modification, upgrade, the new version of the configuration file will not overwrite the old version of the configuration file, but a separate new heart configuration file ending with. rpmnew.


The upgrade operation is not shown because the younger brother does not have the appropriate package available.




3) Enquiry:

Instruction format: rpm {-q|--query} [select-options] [query-options]

Query options:

-A: Find all

-P: Query work for packages that are not yet installed

-F: Query which package is generated by the specified file

-C: Querying the configuration file information for a package

-D: Querying program documentation

-I: More information

-L: Query package generation for all files

-R: Query the functionality that the specified package depends on

--provides: Lists the features provided by the specified package

--script: Script fragment with package comes in

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/64/wKioL1Xi5U3ROzqqAACo3M62vpk864.jpg "style=" float: none; "title=" Image 5.png "alt=" Wkiol1xi5u3rozqqaaco3m62vpk864.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/68/wKiom1Xi4zDyASHGAADqe_t0w_o536.jpg "style=" float: none; "title=" Image 6.png "alt=" Wkiom1xi4zdyashgaadqe_t0w_o536.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/64/wKioL1Xi5U2hKvlvAAQsddvfOKA779.jpg "style=" float: none; "title=" Image 7.png "alt=" Wkiol1xi5u2hkvlvaaqsddvfoka779.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/68/wKiom1Xi4zGzseBKAAMZWEFt1Oo045.jpg "style=" float: none; "title=" Image 8.png "alt=" Wkiom1xi4zgzsebkaamzweft1oo045.jpg "/>



4) Uninstall:

Instruction format: rpm {-e|--erase} [--allmatches] [--nodeps]

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/64/wKioL1Xi5ZbBK7GOAAGsT6_t41Y979.jpg "title=" Picture 9.png "alt=" Wkiol1xi5zbbk7goaagst6_t41y979.jpg "/>

5) Check:

Instruction format: rpm {-v|--verify} [select-options] [verify-options]

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/68/wKiom1Xi44jjp4nGAALWRT1XNQQ721.jpg "title=" Picture 10.png "width=" 529 "height=" 378 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:529px;height:378px; "alt=" Wkiom1xi44jjp4ngaalwrt1xnqq721.jpg "/>



6) Database rebuild

Database directory:/var/lib/rpm

RPM {--initdb |--rebuilddb}

INITDB: Initialization

If the database does not exist beforehand, it is created, otherwise, no action is taken;

REBUILDDB: Rebuilding

Recreate the database directly, whether it is present or not


Write here today, and later I will continue to add the RPM Package Manager's front-end tool: Yum tool, write is not very specific in place, if there is wrong to ask the great gods to point twos, younger brother humbly ~ ~

Package Manager (top)

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.