Detailed RPM command

  
                  

rpm Common Commands

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 it overwrites files belonging to other packages< Br>

--nodeps If the installation of this RPM package depends on other packages, even if other packages are not installed, the installation is forced.

5.Query whether a package is installed

# rpm -q < rpm package name>

6.Get information about the package being installed

//This article comes from the computer software and hardware application network www.45it.com

# rpm -qi < rpm package name>

7. List which files in the package

# rpm -ql < rpm package name>

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

#rpm -qf

9 You can combine several parameters together with

# rpm -qil < rpm package name>

10. List all installed rpm packages

# rpm -qa

11.Listing which files are included in an RPM package file that is not installed in the system?

# rpm -qilp < rpm package name>

<>

First, install

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) Output hash mark (``#'')

--test during installation only test the installation. Not actually installed.

--percent Outputs the progress of the installation as a percentage.

--excludedocs Do not install documentation files in packages

--includedocs Installation documentation

--replacepkgs Force reinstallation of installed packages

--replacefiles Replace files belonging to other packages

--force Ignore packages and file conflicts

--noscripts Do not run pre-installation and post-install scripts

--prefix Install the package to the specified path

--ignorearch Does not verify the structure of the package

--ignoreos Does not check the operating system running the package

--nodeps Do not check dependency relationships

--ftpproxy Use as FTP proxy

--ftpport Specify FTP port number as

Common Options

-v Display additional information

-vv Display debugging information

--root Let RPM use the specified path as the "root directory", so that the pre-installer and post-installation

Install the program will be installed in this directory

--rcfile Set the rpmrc file to

--dbpath Set the path of the RPM data inventory to

Second, delete

Command Format:

rpm -e ( or --erase) options pkg1 ... pkgN


pkg1 ... pkgN : Packages to be deleted

Detailed options

--test Only tests for deletion

--noscripts Do not run Pre-installation and post-install scripts

--nodeps Do not check dependencies

Common Options

-vv Display debug information

--root Let RPM The specified path will be used as the "root directory", so the pre-installer and post-install

programs will be installed to this directory.

--rcfile Set the rpmrc file to

--dbpath Set the path of the RPM data inventory to

3. Upgrade

Command Format

rpm -U ( or --upgrade) options file1.rpm ... fileN.rpm

Parameters

file1.rpm ... fileN.rpm The name of the package

Detailed options

-h (or --hash Output hash tag (``#'') when installing

--oldpackage Allow "upgrade" to an older version

--test Only upgrade test

- -excludedocs does not install the documentation files in the package

--includedocs installation documentation

--replacepkgs Force reinstallation of installed packages

--replacefiles Replacement belongs to other Package Piece

- force ignore the conflict
packages and documents

- progress percent as a percentage of output installed.

--noscripts Do not run pre-installation and post-install scripts

--prefix Install packages to the specified path

--ignorearch Does not verify packages Structure

--ignoreos does not check the operating system running the package

--nodeps does not check the dependency relationship

--ftpproxy is used as an FTP proxy

--ftpport Specify the port number of FTP as

Common Options

-v Display Additional Information

-vv Display Debug Information

--root Let RPM use the specified path as the "root directory", so the pre-installer and post-installer will be installed to this directory.

--rcfile Set the rpmrc file to

--dbpath The path where the RPM data inventory is located is

4. Query

Command format:

rpm -q ( or --query) options

Parameter:< Br>

pkg1 ... pkgN : Query installed packages

Detailed options

-p (or ``-'') Query package files

-f Query which package belongs to

-a Query all installed packages

--whatprovides Query packages that provide functionality

-g Query belongs to group Package

--whatrequires Query all packages that require functionality

Information Options

Show all identifiers for packages

-i Display packages Summary Information

-l Displaying a list of files in a package

-c Displaying a list of configuration files

-d Displaying a list of document files

-s Display List of files in the package and display the status of each file

--scripts Display installation, uninstallation, verification script

--queryformat (or --qf) Displayed in a user-specified manner Query Information

--dump Display all verified information for each file

--provides Display the functions provided by the package

--requires (or -R) Display the required functions of the package

Common Options

-v Display Additional Information

-vv Display Debug Information

--root Let RPM specify The path is used as the "root directory", so the pre-installer and post-installer will be installed to this directory.

--rcfile Set the rpmrc file to

--dbpath Set the RPM data repository. The path is

V. Verify the installed package

Command format:

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

Parameters

pkg1 ... pkgN Package name to be verified

Package options

-p Verify against package file

-f Verifying the package to which it belongs

-a Verify Verifying all packages

-g Verifying all belongings Group of packages

Detailed options

--noscripts Do not run verification scripts

--nodeps Do not verify dependencies

--nofiles No Check File Properties

Common Options

-v Display Additional Information

-vv Display Debug Information

--root Let RPM make the specified path For the "root directory", the pre-installer and post-installer will be installed to this directory.

--rcfile Set the rpmrc file to

--dbpath Set the path of the RPM data repository to

Six, check the files in the package

Syntax:

rpm -K ( or --checksig) options file1.rpm ... fileN.rpm

Parameter:

file1.rpm ... fileN.rpm File name of the package

Checksig--Detail options

--nopgp Do not verify PGP Signature

Common Options

-v Display Additional Information

- Vv display debugging information

--rcfile Set rpmrc file to

7. Other RPM options

--rebuilddb Rebuild RPM database

--initdb Create a new RPM repository

--quiet Reduce output as much as possible

--help Display help files

--version Display current version of RPM

Copyright © Windows knowledge All Rights Reserved