Linux rpm command Parameters _unix Linux

Source: Internet
Author: User
Tags documentation ftp site hash
The toolkit was first launched by Red Hat and later borrowed by other Linux developers. Because it saves a lot of time for Linux users, it is widely used to install and remove software under Linux.

Here is a description of its specific use of the method.

[Root@ford/root] # Rpm-qa | More1.

We have a new software, before the installation, generally have to look at the contents of the package, assuming that this file is: linux-1.4-6.i368.rpm, we can use this command to view:

Rpm-qpi linux-1.4-6.i368.rpm

Details of the package will be listed, including how many files, file names, file sizes, creation time, compile date, and so on.

2. All of the files listed above are not necessarily installed when installed, just as the installation of a program in Windows is typical, complete, and customized, Linux will also allow you to choose the installation method, at this time we can use the following command to see what the package will be installed in the system, to facilitate our choice:

RPM-QPL LINUX-1.4-6.I368.RPM3.

After selecting the installation method, start the installation. We can use

RPM-IVH linux-1.4-6.i368.rpm

command to install the software. During the installation process, if you are prompted to install the software or for other reasons, but if we do want to execute the installation command, we can add a parameter "-replacepkgs" after-IVH:

rpm-ivh-replacepkgs LINUX-1.4-6.I368.RPM4.

Sometimes we uninstall one of the installed software, just perform

RPM-E the filename > command. Upgrading to a lower version of the software is a good way to improve its functionality, which eliminates the hassle of installing new software after uninstalling, and to upgrade a software, you only need to execute the following command:

RPM-UVH file name >

, note: This time the filename must be upgraded to upgrade the software patch 6. Another way to install the software is a unique Linux, but also a powerful feature of RMP: through the FTP site directly online installation software. When you find the site that contains the software you need and connect to the site, execute the following command to install online, such as installing linux-1.4-6.i368.rpm online, and using the command:

Rpm-i linux/redhat/...-1.4-6.i368.rpm7.>ftp://ftp.pht.com/pub/linux/redhat/...-1.4-6.i368.rpm

In our use of the computer process, will inevitably be wrong operation, if we mistakenly deleted a few files and affect the performance of the system, how to find out what is missing files? The RPM package provides a feature to find corrupted files, executing this command:

Rpm-va

, Linux will list all the corrupted files for you. You can fix it with a Linux installation CD. Linux system in a wide range of files, in the use of the process, will inevitably encounter the files we do not know, in Windows we can use the "Start/Find" menu to quickly determine which folder a file belongs to, in Linux, the following command line can help us quickly determine which package a file belongs to:

RPM-QF file name >

When each package is installed in the Linux system, the installation files will be in the RPM database "check-in", so we want to query the properties of an installed software, just go to this database to find it. Note: The query command at this time is different from some of the queries described just now, this method only applies to installed packages! Command format: First, install command format:

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

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

-H (or--hash) output hash mark (' # ') at installation

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

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

--excludedocs does not install document files in the package

--includedocs Installation Documentation

--replacepkgs forced reinstallation of installed packages

--replacefiles replace files that belong to other packages

--force ignores package and file conflicts

--noscripts does not run preinstallation and post-Setup scripts

--prefix <path> installs the package to the path specified by <path>

--ignorearch does not verify the structure of the package

--ignoreos does not check the operating system on which the package runs

--nodeps does not check dependency relationships

--ftpproxy
--ftpport <port> Specify the port number for FTP to <port> general options

-V Display additional information-VV display debugging information

--root <path> let rpm make <path> the path specified by "root" so that both the preinstallation program and the post installer are installed in this directory

--rcfile <rcfile> set RPMRC file as <rcfile>

--dbpath <path> Set the path of the RPM data inventory to <path> two, delete the command format:

RPM-E (or--erase) options pkg1 ... pkgn parameter pkg1 ... PKGN: Package details to be removed

--test only test for deletion

--noscripts does not run pre-installation and post-Setup scripts

--nodeps does not check dependencies General Options

-VV Display Debugging Information

--root <path> let rpm make <path> the path specified by "root" so that both the preinstallation program and the post installer are installed in this directory

--rcfile <rcfile> set RPMRC file as <rcfile>

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

Upgrade command Format rpm-u (or--upgrade) options file1.rpm ... filen.rpm parameter file1.rpm ... filen.rpm software package name details options

-H (or--hash) output hash mark (' # ') at installation

--oldpackage allows "Upgrade" to an older version--test only upgrade test

--excludedocs does not install document files in the package

--includedocs Installation Documentation--replacepkgs forced reinstallation of installed packages

--replacefiles replace files that belong to other packages

--force ignores package and file conflicts

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

--noscripts does not run preinstallation and post-Setup scripts

--prefix <path> installs the package to the path specified by <path>

--ignorearch does not verify the structure of the package

--ignoreos does not check the operating system on which the package runs

--nodeps does not check dependency relationships--ftpproxy
--ftpport <port> Specify the port number for FTP to <port> general options

-V Display additional information-VV display debugging information

--root <path> let rpm make <path> the path specified by "root" so that both the preinstallation program and the post installer are installed in this directory

--rcfile <rcfile> set RPMRC file as <rcfile>

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

Query command format: rpm-q (or--query) options parameter: Pkg1 ... PKGN: Querying installed Package details options

-P <file> (or '-') to query the package's files

-F <file> Query <file> which package belongs to

-A query for all installed packages

--whatprovides <x> Query-provided <x> feature package-G <group> query for packages belonging to <group> Group

--whatrequires <x> Query all required <x> feature package information options <null> Show full identity of package

-I display the package's summary information

-L displays a list of files in the package

-C Display profile 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 installation, uninstall, verify scripts

--queryformat (or--QF) displays query information in a user-specified manner

--dump displays all verified information for each file

--provides displays the functionality provided by the package

--requires (or-r) Displays the functionality required by the package General options

-V Display additional information-VV display debugging information

--root <path> let rpm make <path> the path specified by "root" so that both the preinstallation program and the post installer are installed in this directory

--rcfile <rcfile> set RPMRC file as <rcfile>

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

Verify installed Package command format: rpm-v (or--verify, or-y) options parameter Pkg1 ... pkgn package name package option to validate

-P <file> Verify against package file <file>

The package to which the-F <file> checksum <file> belongs

-a Verify verifies all packages

-G <group> Verify all packages that belong to group <group> detailed options

--noscripts does not run validation scripts

--nodeps Non-checksum dependency

--nofiles non-checksum file properties General Options

-V Display additional information

-VV Display Debugging Information

--root <path> let rpm make <path> the path specified by "root" so that both the preinstallation program and the post installer are installed in this directory

--rcfile <rcfile> set RPMRC file as <rcfile>

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

Verify file Syntax in package: Rpm-k (or--checksig) options file1.rpm ... filen.rpm parameters: file1.rpm ... filen.rpm package file name checksig--detailed options

--NOPGP non-checksum PGP signature General Options

-V Display additional information

-VV Display Debugging Information

--rcfile <rcfile> set RPMRC file as <rcfile>

Other RPM options

--REBUILDDB Rebuild RPM Database

--INITDB Create a new RPM database

--quiet as much as possible to reduce output

--help Display Help files

--version shows the current version of RPM

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.