Linux command details of the rpm command parameters using the method _linux

Source: Internet
Author: User

RPM Execution Installation package

Binary package (Binary) as well as source code package (sources) two. The binary package can be installed directly on the computer, and the source code package will be automatically compiled and installed by RPM. Source code packages often use src.rpm as the suffix name.
Common Command combinations:
-IVH: Installation shows installation progress--install--verbose--hash
-UVH: Upgrade package--update;
-QPL: List the file information in the RPM software package [Query Package list];
-QPI: Lists the description information for the RPM package [Query Package install Package (s)];
-QF: Find out which RPM package the specified file belongs to [Query file];
-va: Check all RPM packages, find missing files [View Lost];
-E: Deleting packages

Copy Code code as follows:

Rpm-q Samba//query program is installed
rpm-ivh/media/cdrom/redhat/rpms/ SAMBA-3.0.10-1.4E.I386.RPM//install and display progress by Path
Rpm-ivh--relocate/=/opt/gaim gaim-1.3.0-1.fc4.i386.rpm    //Specify the installation directory
RPM-IVH--test gaim-1.3.0-1.fc4.i386.rpm//for checking dependencies;
RPM-UVH--oldpackage gaim-1.3 .0-1.fc4.i386.rpm//New version degraded to older version
Rpm-qa | grep httpd #[Search Specifies whether the RPM package is installed]--all search *httpd*
rpm-ql httpd #[Search R PM Package]--list All file installation directories
Rpm-qpi linux-1.4-6.i368.rpm #[View RPM Package]--query--package--install package Information
RPM-QPF Linux-1 .4-6.i368.rpm #[View the RPM package]--file
RPM-QPR file.rpm #[View Package] dependencies
Rpm2cpio file.rpm |cpio-div   #[Extract Files ]
Rpm-ivh file.rpm #[Install a new Rpm]--install--verbose--hash
Rpm-ivh http://mirrors.kernel.org/fedora/core/4/i386/ os/fedora/rpms/gaim-1.3.0-1.fc4.i386.rpm
RPM-UVH file.rpm   #[upgrade a rpm]--upgrade
Rpm-e file.rpm& nbsp;    #[Delete an RPM package]--erase

Common parameters:
Install/upgrade/erase options:

Copy Code code as follows:

-I,--install install package (s)
-V,--verbose provide more detailed output
-H,--hash print hash marks as package installs (good with-v)
-E,--erase Erase (Uninstall) package
-U,--upgrade=<packagefile>+ upgrade package (s)
--replacepkge Install packages Regardless of whether the package has been installed
--test installation test, not actually installed
--nodeps Ignore package dependencies forced installation
--force ignores package and file conflicts
Query options (With-q or--query):
-A,--all query/verify all packages
-P,--package query/verify a package file
-L,--list list files in package
-D,--docfiles list all documentation files
-F,--file query/verify package (s) owning file

RPM Source Code Packaging installation
. src.rpm end of the file, these files are packaged by the source code of the software, the user to install such RPM software package, you must use the command:

Copy Code code as follows:

RPM--recompile vim-4.6-4.src.rpm #这个命令会把源代码解包并编译, install it, if the user uses the command:
The rpm--rebuild vim-4.6-4.src.rpm #在安装完成后, and the compiled executable files are repackaged into i386.rpm rpm packages.

[Root@localhost src]# RPM-IVH awstats-6.8-1.noarch.rpm
error:failed dependencies:
Perl (lwp::useragent) is needed by Awstats-6.8-1.noarch
[Root@localhost src]#

Files using the RPM attribute dependency suite

Copy Code code as follows:

[Root@localhost src]# RPM-QPR awstats-6.8-1.noarch.rpm
/bin/sh
/usr/bin/perl
Config (awstats) = 6.8-1
Perl >= 0:5.005
Perl (Lwp::useragent)
Perl (POSIX)
Perl (Socket)
Perl (time::local)
Perl (Strict)
Perl (VARs)
Rpmlib (compressedfilenames) <= 3.0.4-1
Rpmlib (payloadfileshaveprefix) <= 4.0-1

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.