Common rpm commands
1. Install a package
# Rpm-ivh
2. Upgrade a package
# Rpm-Uvh
3. Remove a package
# Rpm-e
4. installation parameters
-- Force installation even if it overwrites files belonging to other packages
-- Nodeps if the installation of this RPM package depends on other packages, the installation is forced even if other packages are not installed.
5. check whether a package is installed.
# Rpm-q <rpm package name>
6. Obtain the installed package information.
# Rpm-qi <rpm package name>
7. List the files in the package
# Rpm-ql <rpm package name>
8. List the RPM packages of a file on the server.
# Rpm-qf
9. It can be used together with several parameters
# Rpm-qil <rpm package name>
10. list all installed rpm packages
# Rpm-qa
11. List the files contained in an RPM package that has not been installed into the system?
# Rpm-qilp <rpm package name>
<>
I. Installation
Command Format:
Rpm-I (or -- install) options file1.rpm... fileN. rpm
Parameters:
File1.rpm... fileN. rpm file name of the RPM package to be installed
Detailed options:
-H (or -- hash) outputs the hash mark (''#'') during installation (''#'')
-- Test only tests the installation and does not actually install it.
-- Percent: the installation progress is displayed as a percentage.
-- Excludedocs does not install the document files in the Software Package
-- Includedocs installation document
-- Replacepkgs force the installed software package to be reinstalled
-- Replacefiles: Replace the files of other software packages.
-- Force ignores conflicts between software packages and files
-- Noscripts does not run the pre-Installation and post-installation scripts
-- Prefix install the software package to the specified path
-- Ignorearch does not validate the structure of the software package
-- Ignoreos does not check the operating system of the software package.
-- Nodeps does not check Dependencies
-- Ftpproxy is used as an FTP Proxy
-- Ftpport specifies that the FTP port is
General options
-V: display additional information
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that the pre-installation program and post-Installation
Installation programs will be installed in this directory
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
Ii. Delete
Command Format:
Rpm-e (or -- erase) options pkg1... pkgN
Parameters
Pkg1... pkgN: package to be deleted
Detailed options
-- Test: only delete the test.
-- Noscripts does not run the pre-Installation and post-installation script programs
-- Nodeps does not check Dependencies
General options
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that the pre-installation program and post-Installation
All programs are installed in this directory.
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
Iii. Upgrade
Command Format
Rpm-U (or -- upgrade) options file1.rpm... fileN. rpm
Parameters
File1.rpm... fileN. rpm package name
Detailed options
-H (or -- hash) outputs the hash mark (''#'') during installation (''#'')
-- Oldpackage allows "Upgrade" to an old version
-- Test: only test the upgrade.
-- Excludedocs does not install the document files in the Software Package
-- Includedocs installation document
-- Replacepkgs force the installed software package to be reinstalled
-- Replacefiles: Replace the files of other software packages.
-- Force ignores conflicts between software packages and files
-- Percent: the installation progress is displayed as a percentage.
-- Noscripts does not run the pre-Installation and post-installation scripts
-- Prefix install the software package to the specified path
-- Ignorearch does not validate the structure of the software package
-- Ignoreos does not check the operating system of the software package.
-- Nodeps does not check Dependencies
-- Ftpproxy is used as an FTP Proxy
-- Ftpport specifies that the FTP port is
General options
-V: display additional information
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that both the pre-installation program and the post-installation program will be installed in this directory.
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
Iv. Query
Command Format:
Rpm-q (or -- query) options
Parameters:
Pkg1... pkgN: Query installed software packages
Detailed options
-P (or ''-'') queries the file of the software package.
-F: query which software package belongs.
-A: Query all installed software packages.
-- Whatprovides: a software package that provides functions for query
-G: query the software packages of the group.
-- Whatrequires: Query all required software packages
Information options
Show all packages
-I: displays the summary of the software package.
-L display the file list in the Software Package
-C: display the configuration file list
-D: display the document file list
-S: displays the file list in the package and the status of each file.
-- Scripts displays scripts for installation, uninstallation, and validation
-- Queryformat (or -- qf) displays the query information in a user-specified manner.
-- Dump: displays all verified information for each file.
-- Provides: displays the functions provided by the software package.
-- Requires (or-R) shows the functions required by the Software Package
General options
-V: display additional information
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that both the pre-installation program and the post-installation program will be installed in this directory.
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
5. Verify installed software packages
Command Format:
Rpm-V (or -- verify, or-y) options
Parameters
Pkg1... pkgN name of the software package to be verified
Package options
-P Verify against package file
-F verify the Software Package
-A Verify: verifies all software packages.
-G: verify all software packages belonging to the group
Detailed options
-- Noscripts does not run the validation script
-- Nodeps does not verify Dependencies
-- Nofiles does not verify file attributes
General options
-V: display additional information
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that both the pre-installation program and the post-installation program will be installed in this directory.
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
6. Verify the files in the Software Package
Syntax:
Rpm-K (or -- checksig) options file1.rpm... fileN. rpm
Parameters:
File1.rpm... fileN. rpm package file name
Checksig -- detailed options
-- Nopgp does not verify the PGP Signature
General options
-V: display additional information
-Vv: displays debugging information.
-- Rcfile sets the rpmrc file
VII. Other RPM options
-- Rebuilddb: rebuilding the RPM Database
-- Initdb creates a new RPM Database
-- Quiet: reduce output as much as possible
-- Help: display the help File
-- Version: displays the current version of RPM.
Author: "small ocean Enterprises"