RPM common Commands and RPM parameters introduction

Source: Internet
Author: User

RPM is the abbreviation for Redhatpackagemanager, a software package installation and management program developed by Redhat, similar to the uninstaller on the Windows platform. With RPM, users can install and manage applications and system tools on Linux themselves. RPM allows the user to install the package directly in binary mode, and can query the user whether the library file is already installed, and when the program is removed with RPM, it intelligently asks the user if they want to delete the program. If you use RPM to upgrade the software, RPM retains the original configuration file so that the user does not have to reconfigure the new software. RPM maintains a database that contains all the information about the package, which allows the user to query the package. RPM is designed for Linux, but it has been shifted to SunOS, Solaris, AIX, IRIX and other Unix systems. RPM complies with the GPL, and users are free to use and disseminate rpm under the GPL.

RPM has 10 basic modes: They are installed, queried, verified, deleted, and so on.
Installation mode: Rpm–i

Query mode: RPM–Q

Validation mode: Rpm–v or –verify

Delete mode: Rpm–e

1. Install a Package

# RPM-IVH

2. Upgrade a Package

# RPM-UVH

3. Remove 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>

<<RPM Chinese Manual >>

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

The--test is only for installation, and the test is not actually installed.

--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 not verifying PGP signatures

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

RPM common Commands and RPM parameters introduction

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.