Common rpm commands

Source: Internet
Author: User
Common rpm commands 1. install a Pack # rpm-ivh2. upgrade a Pack # rpm-Uvh3. remove a Pack # rpm-e4. installation parameter -- force installation even if it overwrites files belonging to other packages -- nodeps if the RPM Package's security...

Common rpm commands
1. install a package
# Rpm-ivh
2. upgrade a package
# Rpm-Uvh
3. remove a package
# Rpm-e
4. installation parameters
-- Force installation even if it overwrites files belonging to other packages
-- Nodeps if the installation of this RPM package depends on other packages, the installation is forced even if other packages are not installed.
5. check whether a package is installed.
# Rpm-q <rpm package name>
6. obtain the installed package information.
# Rpm-qi <rpm package name>
7. list the files in the package
# Rpm-ql <rpm package name>
8. list the RPM packages of a file on the server.
# Rpm-qf
9. it can be used together with several parameters
# Rpm-qil <rpm package name>
10. list all installed rpm packages
# Rpm-qa
11. list the files contained in an RPM package that has not been installed into the system?
# Rpm-qilp <rpm package name>
<>
I. Installation
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) outputs the hash mark (''#'') during installation (''#'')
-- Test only tests the installation and does not actually install it.
-- Percent: The installation progress is displayed as a percentage.
-- Excludedocs does not install the document files in the software package
-- Includedocs installation document
-- Replacepkgs force the installed software package to be reinstalled
-- Replacefiles: replace the files of other software packages.
-- Force ignores conflicts between software packages and files
-- Noscripts does not run the pre-installation and post-installation scripts
-- Prefix install the software package to the specified path
-- Ignorearch does not validate the structure of the software package
-- Ignoreos does not check the operating system of the software package.
-- Nodeps does not check dependencies
-- Ftpproxy is used as an FTP proxy
-- Ftpport specifies that the FTP port is
General options
-V: display additional information
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that the pre-installation program and post-installation
Installation programs will be installed in this directory
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
II. delete
Command format:
Rpm-e (or -- erase) options pkg1... pkgN
Parameters
Pkg1... pkgN: package to be deleted
Detailed options
-- Test: only delete the test.
-- Noscripts does not run the pre-installation and post-installation script programs
-- Nodeps does not check dependencies
General options
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that the pre-installation program and post-installation
All programs are installed in this directory.
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
III. upgrade
Command format
Rpm-U (or -- upgrade) options file1.rpm... fileN. rpm
Parameters
File1.rpm... fileN. rpm Package name
Detailed options
-H (or -- hash) outputs the hash mark (''#'') during installation (''#'')
-- Oldpackage allows "upgrade" to an old version
-- Test: only test the upgrade.
-- Excludedocs does not install the document files in the software package
-- Includedocs installation document
-- Replacepkgs force the installed software package to be reinstalled
-- Replacefiles: replace the files of other software packages.
-- Force ignores conflicts between software packages and files
-- Percent: The installation progress is displayed as a percentage.
-- Noscripts does not run the pre-installation and post-installation scripts
-- Prefix install the software package to the specified path
-- Ignorearch does not validate the structure of the software package
-- Ignoreos does not check the operating system of the software package.
-- Nodeps does not check dependencies
-- Ftpproxy is used as an FTP proxy
-- Ftpport specifies that the FTP port is
General options
-V: display additional information
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that both the pre-installation program and the post-installation program will be installed in this directory.
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
IV. query
Command format:
Rpm-q (or -- query) options
Parameters:
Pkg1... pkgN: query installed software packages
Detailed options
-P (or ''-'') queries the file of the software package.
-F: query which software package belongs.
-A: query all installed software packages.
-- Whatprovides: a software package that provides functions for query
-G: query the software packages of the group.
-- Whatrequires: query all required software packages
Information options
Show all packages
-I: displays the summary of the software package.
-L display the file list in the software package
-C: Display the configuration file list
-D: Display the document file list
-S: displays the file list in the package and the status of each file.
-- Scripts displays scripts for installation, uninstallation, and validation
-- Queryformat (or -- qf) displays the query information in a user-specified manner.
-- Dump: displays all verified information for each file.
-- Provides: displays the functions provided by the software package.
-- Requires (or-R) shows the functions required by the software package
General options
-V: display additional information
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that both the pre-installation program and the post-installation program will be installed in this directory.
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
5. verify installed software packages
Command format:
Rpm-V (or -- verify, or-y) options
Parameters
Pkg1... pkgN name of the software package to be verified
Package options
-P Verify against package file
-F verify the software package
-A Verify: verifies all software packages.
-G: verify all software packages belonging to the group
Detailed options
-- Noscripts does not run the validation script
-- Nodeps does not verify dependencies
-- Nofiles does not verify file attributes
General options
-V: display additional information
-Vv: displays debugging information.
-- Root ask RPM to use the specified path as the "root directory", so that both the pre-installation program and the post-installation program will be installed in this directory.
-- Rcfile sets the rpmrc file
-- Dbpath: set the path of the RPM data inventory
6. verify the files in the software package
Syntax:
Rpm-K (or -- checksig) options file1.rpm... fileN. rpm
Parameters:
File1.rpm... fileN. rpm package file name
Checksig -- detailed options
-- Nopgp does not verify the PGP signature
General options
-V: display additional information
-Vv: displays debugging information.
-- Rcfile sets the rpmrc file
VII. other RPM options
-- Rebuilddb: rebuilding the RPM database
-- Initdb creates a new RPM database
-- Quiet: reduce output as much as possible
-- Help: Display the help file
-- Version: displays the current version of RPM.

Author: "Small Ocean Enterprises"
 

Related Article

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.