English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux rpm command

Linux Command大全

The Linux rpm command is used for package management.

rpm (full name: redhat package manager) was originally a program specifically used for managing various packages in Red Hat Linux distributions. Due to its compliance with the GPL rules and its powerful and convenient features, it has gained widespread popularity and has gradually been adopted by other distributions. The introduction of RPM package management has made Linux easy to install and upgrade, indirectly enhancing its applicability.

语法

rpm [-acdhilqRsv][-b<完成阶段><套间档>+][-e<套件挡>][-f<file>+][-i<套件档>][-p<套件档>+][-U<套件档>][-vv][--addsign<package file>+][--allfiles][--allmatches][--badreloc][--buildroot<根目录>][--changelog][--checksig<package file>+][--clean][--dbpath<数据库目录>][--dump][--excludedocs][--excludepath<排除目录>][--force][--ftpproxy<主机名称或IP地址>][--ftpport<通信端口>][--help][--httpproxy<主机名称或IP地址>][--httpport<通信端口>][--ignorearch][--ignoreos][--ignoresize][--includedocs][--initdb][justdb][--nobulid][--nodeps][--nofiles][--nogpg][--nomd5][--nopgp][--noorder][--noscripts][--notriggers][--oldpackage][--percent][--pipe<执行指令>][--prefix<目的目录>][--provides][--queryformat<档头格式>][--querytags][--rcfile<配置档>][--rebulid<套件档>][--rebuliddb][--recompile<套件档>][--relocate<原目录>=<新目录>][--replacefiles][--replacepkgs][--requires][--resign<套件档>+][--rmsource][--rmsource<文件>][--root<根目录>][--脚本][--设置权限][--设置ugids][--short-电路][--签名][--target=<installation platform>+][--测试][--时间检查<检查秒数>][--由<套件档>触发][--触发][--验证][--版本][--功能特性<提供>][--功能特性<所需>]

Parameter description:

  • -a  Query all packages.
  • -b<completion stage><package file>+or-t <completion stage><package file>+  Set the completion stage of packaging the package and specify the file name of the package file.
  • -c  List only configuration files, this parameter needs to be used with ".-l"parameter usage.
  • -d  List only text files, this parameter needs to be used with ".-l"parameter usage.
  • -e<package file> or--erase<package file>  Delete the specified package.
  • -f<file>+  Query the package that owns the specified file.
  • -h or--hash  List tags when the package is installed.
  • -i  Display the relevant information of the package.
  • -i<package file> or--install<package file>  Install the specified package file.
  • -l  Display the file list of the package.
  • -p<package file>+  Query the specified RPM package file.
  • -q  Use query mode, when encountering any problems, the rpm command will ask the user first.
  • -R  Display the relevance information of the package.
  • -s  Display file status, this parameter needs to be used with ".-l"parameter usage.
  • -U<package file> or--upgrade<package file> Upgrade the specified package file.
  • -v  Display the execution process of commands.
  • -vv  Display detailed execution process of commands, convenient for troubleshooting.
  • -addsign<package file>+  Add a new signature authentication to the specified package.
  • --allfiles  Install all files.
  • --allmatches  Delete files that match the specified package.
  • --badreloc  Reconfigure files when errors occur.
  • --buildroot<root directory>  Set the directory to be used as the root directory when generating the package.
  • --changelog  Display the change log of the package.
  • --checksig<package file>+  Verify the signature authentication of this package.
  • --clean  Delete the directories created during the packaging process after the package packaging is completed.
  • --dbpath<database directory>  Set the directory where the RPM database is to be stored.
  • --dump  Display the verification information of each file. This parameter needs to be used with ".-l"parameter usage.
  • --excludedocs  Do not install files when installing the package.
  • --excludepath<excluded directory>  Ignore all files in the specified directory.
  • --force  Force replacement of package or file.
  • --ftpproxy<host name or IP address>  Specify the FTP proxy server.
  • --ftpport<communication port>  Set the communication port used by the FTP server or proxy server.
  • --help  Online help.
  • --httpproxy<host name or IP address>  Specify the HTTP proxy server.
  • --httpport<communication port>  Set the communication port used by the HTTP server or proxy server.
  • --ignorearch  Do not verify the structural correctness of the package file.
  • --ignoreos Do not verify the structural correctness of the package files.
  • --ignoresize Do not check if there is enough disk space before installation.
  • --includedocs Install the package and the file together when installing the package.
  • --initdb Confirm that the correct database can be used.
  • --justdb Update the database when no file is changed.
  • --nobulid Do not execute any completion phase.
  • --nodeps Do not verify the inter-relatedness of the package files.
  • --nofiles Do not verify the attributes of the file.
  • --nogpg Skip all GPG signature authentications.
  • --nomd5  Do not use MD5Code computation confirms the size and correctness of the confirmation file.
  • --nopgp Skip all PGP signature authentications.
  • --noorder Do not rearrange the installation sequence of the package to meet its inter-relatedness.
  • --noscripts Do not execute any installation Script file.
  • --notriggers Do not execute any Script file within the package packaging.
  • --oldpackage Upgrade to the old version of the package.
  • --percent Display the completion percentage during the installation of the package.
  • --pipe<execution command> Establish a pipeline, converting the output result into the input data of the execution command.
  • --prefix<destination directory> If the configuration file is reconfigured, place the file in the specified directory.
  • --provides Query the compatibility provided by this package.
  • --queryformat<header format> Set the representation method of the header.
  • --querytags List the tags that can be used in the header format.
  • --rcfile<configuration file> Use the specified configuration file.
  • --rebulid<package file> Install the original code package and regenerate the binary file package.
  • --rebuliddb Rebuild a database based on the existing database.
  • --recompile<package file> The effect of this parameter is similar to specifying"--rebulid"parameters are similar, when not generating a package file.
  • --relocate<original directory>=<new directory> Modify the file that would be placed in the original directory to be placed in the new directory.
  • --replacefiles Forcefully replace the file.
  • --replacepkgs Forcefully replace the package.
  • --requires Query the compatibility required by this package.
  • --resing<package file>+  Delete the existing authentication and generate a new signature authentication.
  • --rmsource Delete the original code after packaging the package.
  • --rmsource<file> Delete the original code and the specified file.
  • --root<root directory> Set the directory to be used as the root directory.
  • --List the variables of the Script used to install the package.
  • --setperms Set the permissions of the file.
  • --setugids Set the owner and group of the file.
  • --short-circuit Directly skip the steps of the specified completion stage.
  • --sign Generate PGP or GPG signature authentication.
  • --target=<installation platform>+  Set the installation platform for the generated package.
  • --test Only for testing, does not really install the package.
  • --timecheck<check seconds> Set the timing seconds for checking time.
  • --triggeredby<package> Query the packager of this package.
  • --triggers Show the packaging scripts within the package.
  • --verify The effect of this parameter is the same as specifying"-q"parameters are the same.
  • --version Display version information.
  • --whatprovides<functionality> Query the compatibility provided by this package for the specified functionality.
  • --whatrequires<functionality> Query the compatibility requirements of this package for the specified functionality.

Online Examples

Install Software

# rpm -hvi dejagnu-1.4.2-10.noarch.rpm 
Warning: dejagnu-1.4.2-10.noarch.rpm: V3 DSA Signature: NOKEY, key ID db42a60e
Preparing...           
########################################### [100%]

Display Software Installation Information

# rpm -qi dejagnu-1.4.2-10.noarch.rpm
【Chapter1Last Update: Tutorial, Similar Commands Related

Linux Command大全