The rpm command of Linux Command Encyclopedia

The Linux rpm command is used to manage packages.

rpm (full spelling in English: redhat package manager) was originally a program used by the Red Hat Linux distribution to manage various Linux packages. It is very popular because it follows the GPL rules and is powerful and convenient. Gradually adopted by other distributions. The emergence of the RPM package management method makes Linux easy to install and upgrade, which indirectly improves the applicability of Linux.

grammar

rpm [-acdhilqRsv][-b<完成阶段><套间档>+][-e<套件挡>][-f<文件>+][-i<套件档>][-p<套件档>+][-U<套件档>][-vv][--addsign<套件档>+][--allfiles][--allmatches][--badreloc][--buildroot<根目录>][--changelog][--checksig<套件档>+][--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<根目录>][--scripts][--setperms][--setugids][--short-circuit][--sign][--target=<安装平台>+][--test][--timecheck<检查秒数>][--triggeredby<套件档>][--triggers][--verify][--version][--whatprovides<功能特性>][--whatrequires<功能特性>]

Dachang senior operation and maintenance engineer Linux entry dry content

Introduction to Linux Basics for Senior Operation and Maintenance Engineers of Dachang

Parameter description :

  • -a Query all packages.
  • -b<completion stage><package file>+ or -t <completion stage><package file>+ Set the completion stage of the packaging package and specify the file name of the package file.
  • -c only lists the configuration configuration files, this parameter needs to be used with the "-l" parameter.
  • -d Only list text files, this parameter needs to be used with the "-l" parameter.
  • -e <package file> or --erase <package file> delete the specified package.
  • -f<file>+ Query packages that own the specified file.
  • -h or --hash List flags when package is installed.
  • -i Display information about the package.
  • -i <package file> or --install <package file> Install the specified package file.
  • -l Displays a file listing for the package.
  • -p<package file>+ Query the specified RPM package file.
  • -q Use the query mode. When encountering any problems, the rpm command will first ask the user.
  • -R Displays dependency information for packages.
  • -s Display file status, this parameter needs to be used with "-l" parameter.
  • -U<package file> or --upgrade<package file> Upgrade the specified package file.
  • -v Displays the progress of the command execution.
  • -vv Displays the execution process of the command in detail, which is convenient for troubleshooting.
  • -addsign<package file>+ Add a new signature certificate to the specified package.
  • --allfiles Install all files.
  • --allmatches Delete files that match the specified suites.
  • --badreloc When an error occurs, reconfigure the file.
  • --buildroot<root directory> Set the directory to be used as the root directory when generating the package.
  • --changelog Display the changelog for the suite.
  • --checksig<package file>+ Check the signature certificate of this package.
  • --clean After packaging the package, delete the directories created during the packaging process.
  • --dbpath<database directory> Set the directory to store the RPM database.
  • --dump Display verification information for each file. This parameter needs to be used in conjunction with the "-l" parameter.
  • --excludedocs Do not install docs when installing the package.
  • --excludepath<exclude directory> ignore all files in the specified directory.
  • --force Forcefully replace a package or file.
  • --ftpproxy<host name or IP address> Specify FTP proxy server.
  • --ftpport<communication port> Set the communication port used by FTP server or proxy server.
  • --help Online help.
  • --httpproxy<host name or IP address> Specify 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 archive.
  • --ignoreos Do not verify the structural correctness of package files.
  • --ignoresize Do not check for sufficient disk space before installing.
  • --includedocs Include docs when installing the package.
  • --initdb Verify that the correct database is available.
  • --justdb update the database without changing any files.
  • --nobulid Do not perform any completion phase.
  • --nodeps Do not verify dependencies of package files.
  • --nofiles Do not verify file attributes.
  • --nogpg Skip all GPG signature verification.
  • --nomd5 Do not use MD5 encoding calculations to confirm file size and correctness.
  • --nopgp Skip all PGP signature verification.
  • --noorder Do not rearrange the installation order of packages so that they are dependent on each other.
  • --noscripts Do not execute any installation script files.
  • --notriggers Do not execute any script files inside the suite package.
  • --oldpackage Upgrade to an older version of the package.
  • --percent Show percent complete when installing packages.
  • --pipe<execution command> Create a pipeline and convert the output result to the input data of the execution command.
  • --prefix<destination directory> If reconfiguring the file, put the file in the specified directory.
  • --provides Query the compatibility provided by this package.
  • --queryformat<file header format> Set the representation of the file header.
  • --querytags list the tags available for the header format.
  • --rcfile<configuration file> Use the specified configuration file.
  • --rebulid<package file> Install the original code package, the package that regenerates the binary files.
  • --rebuliddb Rebuild a database based on the existing database.
  • --recompile<package file> The effect of this parameter is similar to specifying the "--rebulid" parameter, when no package file is generated.
  • --relocate<original directory>=<new directory> Relocate files that would have been in the original directory to the new directory.
  • --replacefiles Forcefully replace files.
  • --replacepkgs Forcefully replace packages.
  • --requires Query the compatibility required by this package.
  • --resing<package file>+ Delete existing certificate, regenerate signed certificate.
  • --rmsource After packaging the suite, remove the original code.
  • --rmsource<file> Remove source code and specified files.
  • --root<root directory> Set the directory to be used as the root directory.
  • --scripts List the Script variables of the installed package.
  • --setperms Set file permissions.
  • --setugids Sets the owner and group of the file.
  • --short-circuit directly skip the step of the specified completion phase.
  • --sign Generate PGP or GPG signed certificates.
  • --target=<installation platform>+ Set the installation platform of the generated package.
  • --test is for testing only, does not actually install the package.
  • --timecheck<check seconds> Set the number of seconds to check the time.
  • --triggeredby<package_file> Query the packager of this package.
  • --triggers Display the wrapper script in the package file.
  • --verify The effect of this parameter is the same as specifying the "-q" parameter.
  • --version Display version information.
  • --whatprovides<features> Query the compatibility provided by the package for the specified features.
  • --whatrequires<feature> Query the compatibility required by the package for the specified feature.

example

install software

# rpm -hvi dejagnu-1.4.2-10.noarch.rpm 
警告:dejagnu-1.4.2-10.noarch.rpm: V3 DSA 签名:NOKEY, key ID db42a60e
准备...           
########################################### [100%]

Display software installation information

# rpm -qi dejagnu-1.4.2-10.noarch.rpm

【第1次更新 教程、类似命令关联】

Dachang senior operation and maintenance engineer Linux entry dry content

Dachang senior operation and maintenance engineer Linux basics introduction dry content

Introduction to Linux Basics and Practice of Enterprise Application Deployment

Enterprise-level combat of Shell programming for Linux operation and maintenance

Guess you like

Origin blog.csdn.net/m0_37449634/article/details/131433300