RPM command is the management tool for the RPM software package. RPM was originally a program that is specially used to manage the linux kits. Because it follows the GPL rules and has powerful and convenient features, it is widely welcomed. Gradually adopted by other distribution versions. The emergence of the RPM kit management method makes Linux easy to install, upgrade, and indirectly increases the applicability of Linux.
The
RPM command is very powerful, and the specific use is as follows:
- Query information about the RPM software package installed in the Linux system
- Query information about the installation file of the RPM software package
- Install RPM software package to the current Linux system
- Uninstall the installed RPM software package from the Linux system
- upgrade the current Linux system RPM software package
parameter | Note |
---|---|
-a, –all | Query/Verify All software packages |
-f, –file | Query/Verifying File Software Pack |
-g, –group | Software package in the query/verification group |
-p, –package | Query/Verify a software package |
–whatrequires | Query/Verification software package dependencies required |
parameters | Instructions |
---|---|
-c, –configfiles | List all configuration files |
-d, –docfiles | List all program documents |
-L, –licensefiles | List all license documents |
–dump | Basic file information |
-l, –list | List file in the software package |
–queryformat=QUERYFORMAT | Print information with this format |
-s, –state | Display the status of the file list |
parameters | Instructions |
---|---|
–nofiledigest | No verification file summary |
–nofiles | No verification software package file |
–nodeps | No verification package dependencies |
–noscript | Do not execute verification script |
parameters | Note |
---|---|
–allfiles | Install all files, including configuration files, otherwise the configuration file will be skipped |
-e, –erase=+ | Clear (uninstalled) software package |
–excludedocs | No installation program document |
–excludepath=
|
3 3 3 |
–force | – REPLACEPKGS -REPLACEFILES abbreviation |
-F, –freshen=+ | If the software package has been installed, upgrade the software package |
-i, –install | Installation software package |
–justdb | update the database, but not modify the file system |
–nodeps | No verification software package dependencies |
–nofiledigest | No verification file summary |
–nocontexts | Safety context of not installing files |
–noorder | Don’t re -sort the software package installation to meet the dependencies |
–noscripts | Do not execute software package script |
–notriggers | Any script triggered by this software package |
–oldpackage | Update to the old version of the software package (with -FORCE automatically completes this function) |
–percent | Print percentage when installing the software package |
–prefix= |
If you can regatt it, you can regain the software package to |
–relocate== | Put the file from the regulation to |
–replacefiles | File of conflict between software packages |
–replacepkgs | If the software package already has, reinstall the software package |
–test | not really installed, but just judge whether it can be installed |
-U, –upgrade=+ | upgrade software package |
–reinstall=+ | Re -installation software package |
–quiet | Provide less detailed information output |
-v, –verbose | Provide more detailed information output |
–version | RPM version number used for printing |
–scripts | List the script content in the installation/delete package |
–conflicts | List the function of conflicting conflict with this package |
–provides | List the function provided by this package |
–requires | List the function required for the program package |
–changelog | List the change of this package |
Package management query function: command format
The query function of
[[email protected] /]# rpm {-q|--query} [select-options] [query-options]
RPM is extremely powerful and is one of the extremely important functions. For a few common examples, more detailed and specific, please refer to #Man RPM
#Query system all installed software;[email protected]/]# RPM -QA
#If paging, add a pipeline | and more command;[email protected]/]# RPM -QA | More
#装 Whether the system is installed with the Xorg package[email protected]/]# RPM -QA | GREP XORG
#安 Which software package belongs to a file that has been installed;
Grammar RPM -QF file name[email protected]/]# RPM -QF /usr /bin /ALSA -INFO
Alsa-Utils -.0.28-2.nd7.1.x86_64
Note: The absolute path of the file name should be pointed out
#软 Where is the installation package installed;
Grammar: RPM -QL software name or RPM RPMQuery -QL software name[email protected]/]# RPM -QL Xorg
#安 A information about a installed software package
Grammar format: RPM -QI software name[email protected]/]# RPM -QI Xorg
#Look at the configuration file of the installed software;
Grammar format: RPM -QC software name[email protected]RPMS]# RPM -QC Xorg
#View a document installation position that has been installed:
Grammar format: RPM -QD software name[email protected]/]# RPM -QD Xorg
#Look at the software package and file dependent on the installation software;
Grammar format: RPM -QR software name[email protected] /]# rpm -qR rpm-python
[[email protected]/]# RPM-QPL ALSA-Utils -.0.28-2.nd7.1.x86_64.rpm
#View the location of the document of the software package;
Grammar: RPM -QPD XXX.RPM[email protected]RPMS]# RPM-QPD ALSA-Utils -.0.28-2.nd7.1.x86_64.rpm
#View the configuration file of a software package;
Grammar: RPM -QPC XXX.RPM[email protected]RPMS]# RPM-QPC ALSA-Utils -.0.28-2.nd7.1.x86_64.rpm
#View the dependence of a software package
Grammar: RPM-QPR ALSA-Utils -.0.28-2.nd7.1.x86_64.rpm[email protected]Archives]# RPM-QPR ALSA-Utils -.0.28-2.nd7.1.x86_64.rpm
#Installation, upgrading, deletion of software packages, etc.
#Installation and upgrade a RPM package;[email protected]/]# RPM -IVH xxx.rpm Note: This is used to install a new RPM package; [[email protected]/]# RPM -UVH xxx.rpm Note: This is used to upgrade a RPM package;
#If there is a dependent relationship, please solve the dependencies. In fact, the software package manager can solve the dependency well. Please see the introduction of the previous software package manager; The bag; that can only be used to resolve the dependence relationship by compiling the bag he depends, or forced installation;
grammar structure:[email protected]/]# RPM -IVH xxx.rpm -Nodeps -FORCE
#Delete an RPM package;[email protected]RPMS]# RPM -E ALSA -Utils
#Import signature: [[[[[email protected]RPMS]# RPM -IMPORT signature file[email protected]FC40]# RPM-IMPORT RPM-Key-X86_64
Regarding the signature function of RPM, please refer to Man RPM for details