Daily linux Command Learning-rpm command

Source: Internet
Author: User

RPM command

RPM is a powerful Redhat package management tool that allows you to create, install, query, validate, upgrade, and uninstall each package, which stores files, including the files and names, versions, descriptions, and other information you need to install.

RPM supports 7 modes of operation by default, each with different options for installation, query, and verification. Signature confirmation, uninstallation, authoring, and rebuilding of the database. I am in the application of RPM command, mainly related to its installation, query and uninstall functions, so this section is only to introduce the RPM installation, query and uninstall function.

Installation mode: rpm-i [Installation Options] < package files >

Query mode: rpm-q [query Options]

Uninstall Mode: RPM-E < package name >

Validation mode: rpm-v|-y|--verify [Authentication Options]

Signature Confirmation Mode: RPM--checksig < package file >+

Production mode: rpm-b0 [production options] < package specifications >+

General Options:

The following options can be used in different modes.

-VV Display detailed debugging information

--keep-temps do not delete temporary files (/tmp/rpm-*), mainly used only when debugging rpm

--quiet limit display, display only error messages

--HELP instructions for displaying longer use methods

--version Displays the RPM version in use as 1 lines

--root <dir> Set the top-level directory as the default directory for all operations and run. If the default directory is "/" at the time of installation and is installed as standard

Installation options (for software installation mode)

--force equals the simultaneous use of--replacepkgs 、--replacefiles 、--oldpackage, which means that the installation is forced to overwrite

--oldpackage Remove the new package and replace it with the previous package

--replacefiles force installation of packages even if additional package files that are already installed are overwritten

--replacepkgs even if the installed package is re-installed

-h,--hash when unpacking Hashmark (#), a total of 50, with the-V option to use the display better

--noscripts do not perform preinstall, postinstall versions

--excludedocs do not install files labeled as text (help pages and Texinfo text)

--includedocs includes text files. This option is only available when excludedocs:1 is marked in the RPMRC file

--nodeps do not check dependencies before installing packages

--test does not actually install packages, check for conflicts and report

-U 、--upgrade to upgrade the currently installed package to the new version of RPM.

Software installation, common combination of instructions for RPM-IVH < package name;: Install package and show installation progress

RPM-UVH < package name;: Upgrade Package

Query options (for software query mode):

rpm-q [Query Options]

There are two sets of query options: Package selection and information selection.

Package Selection Options:< Package name > Query <package_name> Package

-A: Querying all packages

-F < file;: query includes packages for < files >

-P < package file;: query for installed or not installed < package files >

Information selection options:

-I: Display package name, version, description and other information

-R: Displays the package directory on which the current package depends

--provides: Displays the functionality provided by the package

-L: Show files in package

-S: Displays the status of the files within the package

-D: Display only text files (including-L)

-C: Show only settings files (including-L)

Common combination Directive-QPL: Lists file information in RPM packages [Query Package list]
-QPI: Lists description information for RPM packages [Query Package Install pack (s)]
-QF: Find which rpm package the specified file belongs to [Query file]

Uninstall option (for software uninstall mode)

RPM-E < package files >

--noscripts: Do not execute preuninstall, Postuninstall scripts

--nodeps: Do not check dependencies when uninstalling packages

--test: The package is not actually unloaded and is tested only. -VV option.

Re-authoring, re-compiling options

RPM--recompile < source pack file >+

RPM--rebuild < Source package file >+: Can be used to create a new binary package.

Used primarily for the installation of. SRC.RPM packages, such as:

RPM--recompile vim-4.6-4.src.rpm # This command will unpack and compile the source code and install it if the user uses the command:

RPM--rebuild vim-4.6-4.src.rpm # After the installation is complete, the compiled executable is also repackaged as a i386.rpm RPM package.

Daily linux Command Learning-rpm command

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.