Software package management


Blog reference



rpm {i|install} [install-option] PACKAGES_FILE…

-h: Hash, with # indicating the installation progress, and each # indicates% 2

 -V| - verbose: displays the detailed process

 -VV: displays a more detailed process


RPM – IVH – test: test installation; But the installation is not really performed; In dry run mode

RPM – IVH – nodeps: ignore dependencies

RPM – IVH – replacepkgs: reinstall and replace the original installation

RPM – IVH – nosignature: do not check the legitimacy of the source

RPM – IVH – nodigest: do not check package integrity

RPM – IVH – force: forced installation, which can be reinstalled or degraded

RPM – IVH – scripts: do not execute package script fragments


rpm {q|–query} [select-options] [query-options]

rpm -q packages_ Name: query whether the specified package has been installed

RPM - QA: query all installed packages

rpm -qi packages_ Name: query the description of the specified package

rpm -ql packages_ Name: query the files generated by the specified installation package

rpm –qc packages_ Name: query the configuration file generated by the specified installation package

rpm –qd packages_ Name: query the help file generated by the specified installation package

rpm –qf files_ Name: query which package the specified file is generated by

rpm –qp files_ Name: query the specified uninstalled package file for query operation

– whatprovides capability: query which package provides the specified capability

– whatrequires capability: query which package the specified capability depends on

rpm –q –scripts packages_ Name: view the scripts contained in the specified package

rpm –q –changelog packages_ Name: query RPM package change log

rpm –R packages_ Name: query the capabilty of the specified package

Rpm2cpio package file | CPIO – ITV preview the files in the package

Rpm2cpio package file | CPIO – ID "*. Conf" release files in the package


rpm {-U|–upgrade}[install-options] PACKAGES_ File...: if there is an old version, upgrade it; otherwise, install it

rpm {-F|–freshen}[install-options] PACKAGES_ File...: if there is an old version, upgrade it. Otherwise, exit the installation

– oldpackages: degraded

be careful:

Do not upgrade the kernel; Linux supports the coexistence of multiple kernel versions. Therefore, it is necessary to directly install the new version of the kernel

If the configuration file of the source package has been modified after installation, when upgrading, the same configuration file provided by the new version will not overwrite the configuration file of the old version, and the new version of the file command will be reserved as a. Rpmnew file


rpm {-e|–erase}  [–allmatches] [–nodeps][–test] PACKAGES_NAME

Simple usage: RPM – e packages_ name

– nodeps: ignore dependencies

– test: Test unloading; Dry run mode

– allmatches: if multiple versions of a package are installed at the same time, this option uninstalls all at once, but the package configuration file has been modified after installation. During uninstallation, this file is usually not deleted, but retained by a file renamed. Rpmsave


Query whether the files generated after package installation have changed

rpm {-V|–verify} [select-options][verify-options]

Common usage: RPM – V packages_ name

When there is no output result, it indicates that the software package is complete and OK. When there is corresponding result output, it indicates that the corresponding content has been modified, as follows:

S file size differences the size of the file has changed

5 (MD5 sum differences) the content of MD5 fingerprint code has changed

The type of the M mode differences file or the properties of the file have changed

D device major / minor number mismatch the major and minor version numbers of the device have changed

L readlink (2) path mismatch link path changed

The owner of the U user ownership differences file has changed

The ownership group of the G group ownership differences file has changed

The creation time of the T mtime differences file has changed

P capabilities different

Note: before installing the software, it is best to verify the legitimacy of the software to be installed, so as to check whether the source and content of the software are legal, and avoid some unsafe things caused by unsafe factors to a certain extent

Legal source means that it is provided by the producer we trust; The signature is the characteristic code of the package encrypted by the author with his own private key

Legal content means that the package has not been modified twice; The success of integrity verification depends on the program signature provided by the manufacturer

Verification method: install the same signature extraction algorithm to extract the signature of the package and compare it with that provided by the original author

Import key

 rpm –import  /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Verify rpm – K packages_ name

Rebuild database

When we delete the files in the database, we cannot find the information of the query software package, because rpm – q is queried according to the data in the database. At this time, we need to rebuild the database

Database location


 rpm {–initdb|–rebuilddb}

 RPM – INITAB: initialization. If the database does not exist in advance, create a new one. Otherwise, no operation will be performed

 Rebuild DB: rebuild the database directly, regardless of whether it exists in advance


CD as local storage

Create Yum warehouse

Package compilation and installation

Recommended Today

Swift advanced (XV) extension

The extension in swift is somewhat similar to the category in OC Extension can beenumeration、structural morphology、class、agreementAdd new features□ you can add methods, calculation attributes, subscripts, (convenient) initializers, nested types, protocols, etc What extensions can’t do:□ original functions cannot be overwritten□ you cannot add storage attributes or add attribute observers to existing attributes□ cannot add parent […]