RPM Command Details (install, upgrade, uninstall)

Source: Internet
Author: User


rpm Command Details (install, upgrade, uninstall)

RPM Common Commands
1. Install a Package
# RPM-IVH

2. Upgrade a Package
# RPM-UVH

3. Uninstalling a Package
# RPM-E

4. Installation Parameters
--force Force installation Even if overwriting files belonging to other packages
--nodeps if the RPM package is installed depending on other packages, it is forced to install even if the other packages are not loaded.

5. Query whether a package is installed
#Rpm-q < RPM package name>

6. Get information about the packages that are installed
#Rpm-qi < RPM package name>

7. List what files are in the package
# RPM-QL < RPM package name>

8. List which RPM package a file on the server belongs to
#RPM-QF

9. Can synthesize several parameters to a
# Rpm-qil < RPM package Name>

10. List all installed RPM package
# Rpm-qa

11. List what files are included in the RPM package file that is not installed into the system?
# RPM-QILP < RPM package name>

<>
First, installation

Command format:

rpm-i (or--install) options file1.rpm ... filen.rpm

Parameters:

file1.rpm. filen.rpm the file name of the RPM package that will be installed

Detailed options:

-H (or--hash) output hash mark (' # ') during installation
--test only tests the installation and does not actually install it.
--percent outputs the progress of the installation as a percentage.
--excludedocs do not install the documentation files in the package
--includedocs Installation Documentation
--replacepkgs Force reinstallation of installed packages
--replacefiles replacing files belonging to other packages
--force ignoring package and file conflicts
--noscripts do not run pre-install and post-install scripts
--prefix Install the package to the specified path
--ignorearch not verifying the structure of the package
--ignoreos does not check the operating system that the package runs
--nodeps does not check dependency relationships
--ftpproxy used as an FTP proxy
--FTPPORT specifies that the port number for FTP is

Common options

-V Show additional information
-VV Display Debug Information
--root let rpm make the specified path "root" so that the preinstallation program and the post-security
The installer will be installed in this directory
--rcfile set the RPMRC file to
--dbpath set the path of the RPM data inventory where

Second, delete

Command format:

RPM-E (or--erase) options pkg1 ... pkgn

Parameters

Pkg1. PKGN: Package to remove

Detailed options

--test perform only the deleted tests
--noscripts do not run pre-install and post-install scripts
--nodeps does not check for dependencies

Common options

-VV Display Debug Information
--root let rpm make the specified path "root" so that the preinstallation program and post-installation
The program will be installed in this directory
--rcfile set the RPMRC file to
--dbpath set the path of the RPM data inventory where

Third, upgrade

Command format

rpm-u (or--upgrade) options file1.rpm ... filen.rpm

Parameters

file1.rpm. filen.rpm software package Name

Detailed options

-H (or--hash) output hash mark (' # ') during installation
--oldpackage allow "Upgrade" to an older version
--test only for upgrade testing
--excludedocs do not install the documentation files in the package
--includedocs Installation Documentation
--replacepkgs Force reinstallation of installed packages
--replacefiles replacing files belonging to other packages
--force ignoring package and file conflicts
--percent outputs the progress of the installation as a percentage.
--noscripts do not run pre-install and post-install scripts
--prefix Install the package to the specified path
--ignorearch not verifying the structure of the package
--ignoreos does not check the operating system that the package runs
--nodeps does not check dependency relationships
--ftpproxy used as an FTP proxy
--FTPPORT specifies that the port number for FTP is

Common options

-V Show additional information
-VV Display Debug Information
--root let rpm make the specified path "root" so that the preinstallation and post-Setup programs will be installed in this directory
--rcfile set the RPMRC file to
--dbpath set the path of the RPM data inventory where

Iv. Inquiries

Command format:

rpm-q (or--query) options

Parameters:

Pkg1 ... PKGN: Querying Installed Packages

Detailed options

-P (or "-") query the package file
-F query which package belongs to
-A queries all installed packages
--whatprovides query provides the functionality of the package
-G query packages that belong to a group
--whatrequires querying all packages that require functionality

Information options

Displays the full identity of the package
-I displays the package's summary information
-L display the list of files in the package
-C Display configuration file list
-D displays a list of document files
-S Displays the list of files in the package and displays the status of each file
--scripts display Install, uninstall, check script
--queryformat (or--QF) displays query information in a user-specified manner
--dump Show all verified information for each file
--provides displays the functionality provided by the package
--requires (or-r) displays the features required by the package

Common options

-V Show additional information
-VV Display Debug Information
--root let rpm make the specified path "root" so that the preinstallation and post-Setup programs will be installed in this directory
--rcfile set the RPMRC file to
--dbpath set the path of the RPM data inventory where

V. Verifying the installed Packages

Command format:

rpm-v (or--verify, or-y) options

Parameters

Pkg1. PKGN the package name to be verified

Package options

-P Verify against package file
The package to which the-F checksum belongs
-A Verify check all packages
-G verifies all packages belonging to the group

Detailed options

--noscripts do not run a validation script
--nodeps not verifying dependencies
--nofiles not verifying file properties

Common options

-V Show additional information
-VV Display Debug Information
--root let rpm make the specified path "root" so that the preinstallation and post-Setup programs will be installed in this directory
--rcfile set the RPMRC file to
--dbpath set the path of the RPM data inventory where

Vi. verifying the files in the package

Grammar:

Rpm-k (or--checksig) options file1.rpm ... filen.rpm

Parameters:

file1.rpm. filen.rpm software package file name

checksig--Detailed Options

--NOPGP Do not verify PGP signature

Common options

-V Show additional information
-VV Display Debug Information
--rcfile set the RPMRC file to


Seven, other RPM options

--REBUILDDB Rebuilding RPM Database
--INITDB Create a new RPM library
--quiet reduce the output as much as possible
--help Display Help files
--version Show current version of RPM



This article is from the Linux Security Advisor blog, so be sure to keep this source http://chengyangyang.blog.51cto.com/9473151/1661799

RPM Command Details (install, upgrade, uninstall)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.