Linux rpm commands

Source: Internet
Author: User

Address: http://blog.csdn.net/deutschester/article/details/6309521

Run the rpm installation package
Binary and Source packages. The binary package can be directly installed 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. Common command combination:-ivh: installation displays the installation progress -- install -- verbose -- hash
-Uvh: Upgrade the software package -- Update;
-Qpl: lists the file information in the RPM Package [Query Package list].
-Qpi: lists the RPM Package description [Query package install Package (s)];
-Qf: Find the RPM package of the specified File [Query File];
-Va: Check all RPM software packages and find the missing file [View Lost].
-E: delete package rpm-q samba // check if the program is installed rpm-ivh/media/cdrom/RedHat/RPMS/samba-3.0.10-1.4E.i386.rpm // install by path and display progress
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 // used to check dependencies; not a real installation;
Rpm-Uvh -- oldpackage gaim-1.3.0-1.fc4.i386.rpm // The new version is downgraded to the old version rpm-qa | grep httpd # [search for whether the specified rpm package is installed] -- all search * httpd *
Rpm-ql httpd # [search for rpm packages] -- list all File Installation directories rpm-qpi Linux-1.4-6.i368.rpm # [view rpm packages] -- query -- package -- install package information
Rpm-qpf Linux-1.4-6.i368.rpm # [view rpm package] -- file
Rpm-qpR file. rpm # [View package] dependency
Rpm2cpio file. rpm | cpio-div # [Extract files] rpm-ivh file. rpm # [install new rpm] -- install -- verbose -- hash
Rpm-ivh [url] restart
Rpm-Uvh file. rpm # [upgrade an rpm] -- upgrade
Rpm-e file. rpm # [delete an rpm package] -- Common erase parameters: Install/Upgrade/Erase options:
-I, -- install package (s)
-V, -- verbose provide more detailed output
-H, -- hash print hash marks as package install( good with-V)
-E, -- Erase erase (uninstall) package
-U, -- upgrade = <packagefile> + upgrade package (s)
-- Replacepkge forcibly installs the software package no matter whether the software package is installed or not.
-- Test installation test, not actually installed
-- Nodeps forcibly installs software packages regardless of their Dependencies
-- Force ignores conflicting Query options (with-q or -- query) of software packages and files ):
-A, -- all query/verify all packages
-P, -- package query/verify a package file
-L, -- list files in package
-D, -- docfiles list all documentation files
-F, -- file query/verify package (s) owning file RPM source code packaging and Installation. Src. files ending with rpm, which are packaged from the source code of the Software. to install such RPM packages, you must run the following command: rpm -- recompile vim-4.6-4.src.rpm # This command will unpackage the source code and compile and install it if the user uses the command:

Rpm -- rebuild vim-4.6-4.src.rpm # After installation is complete, the compiled executable files are repackaged into the i386.rpm RPM package.

[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 property dependency suite

[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






In addition: # rpm-IVH -- aid samba *. RPM (you must install rpmdb before using this method to install and exclude dependencies)

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.