Rpm command details, rpm command

Source: Internet
Author: User

Rpm command details, rpm command
 Http://www.rpm.org/max-rpm/s1-rpm-install-additional-options.html#S2-RPM-INSTALL-REPLACEFILES-OPTION1. Common rpm commands(01) install a package: # rpm-ivh
(02) upgrade a package: # rpm-Uvh
(03) Remove a package: # rpm-e
(04) 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.
(05) check whether a package is installed: # rpm-q <rpm package name>
(06) obtain the information of the installed package: # rpm-qi <rpm package name>
(07) list the files in the package: # rpm-ql <rpm package name>
(08) list the RPM packages of a file on the server: # rpm-qf
(09) 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 file not installed in the system: # rpm-qilp <rpm package name>2. rpm Parameters(1) Installation command
Command Format: # rpm-I (or -- install) [options] file1.rpm... fileN. rpm
Parameter List: 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 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(2)DELETE command
Command Format: # rpm-e (or -- erase) [options] pkg1... pkgN
Parameter List: pkg1... pkgN (software 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 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 to (3)Upgrade command
Command Format: # rpm-U (or -- upgrade) [options] file1.rpm... fileN. rpm
Parameter List: 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 output 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 to (4)Query command
Command Format: # rpm-q (or -- query) [options]
Parameter List: 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.
-G: query the software packages of the group.
-- Whatprovides: a software package that provides functions for query
-- 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 to (5)Verify installed software packages
Command Format: # rpm-V (or -- verify, or-y) [options]
Parameter List: pkg1... pkgN (package name to be verified)
Package options:
-P check package file
-F verify the Software Package
-A. Verify 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 to (6)Verify files in the Software Package
Syntax: # rpm-K (or -- checksig) [options] file1.rpm... fileN. rpm
Parameter: file1.rpm... fileN. rpm (File Name of the software package)
Detailed options:
-- Nopgp does not verify the PGP Signature
General options:
-V: display additional information
-Vv: displays debugging information.
-- Rcfile: Set the rpmrc file to (7)Other Parameter 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. -- replacepkgs forces you to reinstall the installed software package (

Install the Package Even If Already Installed
# rpm -iv cdp-0.33-2.i386.rpmInstalling cdp-0.33-2.i386.rpm#
# rpm -iv cdp-0.33-2.i386.rpmInstalling cdp-0.33-2.i386.rpmpackage cdp-0.33-2 is already installederror: cdp-0.33-2.i386.rpm cannot be installed#         
# rpm -iv --replacepkgs cdp-0.33-2.i386.rpmInstalling cdp-0.33-2.i386.rpm#  

-- Replacefiles: Install the Package Even If It Replaces Another Package's Files

# rpm -iv cdp-0.33-2.i386.rpmInstalling cdp-0.33-2.i386.rpm# 
# rpm -iv cdp-0.33-3.i386.rpmInstalling cdp-0.33-3.i386.rpm/usr/bin/cdp conflicts with file from cdp-0.33-2error: cdp-0.33-3.i386.rpm cannot be installed#
# ls -al /usr/bin/cdp-rwxr-xr-x   1 root     root        34460 Feb 25 14:27 /usr/bin/cdp#          
# ls -al /usr/bin/cdp-rwxr-xr-x   1 root     root        34444 Apr 24 22:37 /usr/bin/cdp#       
# rpm -iv --replacefiles cdp-0.33-3.i386.rpmInstalling cdp-0.33-3.i386.rpm#






Http://www.rpm.org/max-rpm/s1-rpm-install-additional-options.html#S2-RPM-INSTALL-REPLACEFILES-OPTION
 

 

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.