RPM---Linux Software installation and management

Source: Internet
Author: User
Tags sha1

There are too many options for installing commands on Linux, so it's easy to find them later.

Summary:

INSTALL:RPM-IVH Package Full Name installation

UPGRADE:RPM-UVH Package Full Name upgrade

ERASE:RPM-E Package Name Removal

Search RPM:

RPM-Q Package Name Query package is installed

Rpm-qa query all installed RPM packages

RPM-QI Package Name query installed RPM information

RPM-QIP Package Name query for non-installed RPM information

RPM-QL package name to see where RPM is installed

RPM-QLP package name see the preset installation location for RPM

RPM-QF System file name eg:rpm-qf/usr/share/locale/de/lc_messages/lrzsz.mo view file input which RPM package

RPM Check

Rpm-v Installed package Name

The file extraction----in RPM package can be used when some system files are missing.

Rpm2cpio Package Full Name | Cpio-idv. File Absolute Path eg:rpm2cpio/mnt/cdrom/packages/coreutils-5.97-23.el5.rpm | Cpio-idv./bin/ls

YUM--RPM on-line installation method!!!

Other Reference blogs:

RPM Command Daquan Linux learning CentOS (23)--linux Software Management source code and RPM package management

----------------------------------------------------The following is more information----------------------------------------------------

In Redhatcentos

Linux packages are divided into two main categories

    • SOURCE Package

The script installation package---the so-called script installation package is the installation process that encapsulates the installation of the source package and the binary package.

    • Binary package (RPM package system default package)

RPM Package Location: RPM package is generally located in the packages directory of the system CD.

Naming rules: httpd-2.2.15-15.e16.centos.1.i686.rpm--------Package full name-----------operation package is not installed, use the full name of the package, note the path!!! Eg:install Upgrade

--HTTPD Package name---------------------------------------------------Package name--------------The package name is applied when the package is installed, (search/var/lib/ Database in rpm/) Eg:erase search

--2.2.15 software version

Number of--15 software releases

--e16.centos for Linux platforms

--i686 for the hardware platform

--RPM-RPM Package Extension

RPM Package Dependencies:

    • Tree-dependent: A-->b-->c solution: First install C, then install B, and finally install a.
    • Ring-dependent: A-->b-->c-->a Solution: Simultaneous install A/B/C
    • Module dependency (library file dependency): Query url:http://www.rpmfind.net/Workaround: Install the RPM package containing the dependent files (. So) first, then the target RPM package.

RPM Installation:

RPM-IVH package full name usually first install the main package, and then install the add-on package

Option

-I install Installation

-v Verbose Show more information

-H Hash Show progress

--nodeps does not detect dependencies---------------nothing. Do not force the installation, even if the installation of software is not available.

Note: Display 2 of 100% before the true installation succeeds!!! The first one is just ready for success.

RPM Upgrade:

RPM-UVH Package Full Name

Options

-U Upgrade Upgrade

If the installation package is higher than the current version, the upgrade operation is performed. Otherwise, it will not be installed. The same as the installation command if it is not currently installed.

RPM Uninstall:

RPM-E Package Name

Options

-E Erase Uninstall

--nodeps does not detect dependencies

EG:RPM-E httpd

When uninstalling, you need to download the other packages that depend on it first.

RPM Query:

    • Query whether the package is installed

RPM-Q Package Name

#查询包是否安装

-Q queries (query)

Rpm-qa

#查询所有已经安装的rpm包

-A All

    • Querying package Details

RPM-QI Package Name

Options

-I query Software information information

-P query does not install package information packages

 [[email protected] ~]# Rpm-qi geditname:gedit Relocations: (not relocatable) version:2.16.0 vendor:red Hat, INC.R      Elease:9.el5 Build date:2008 January 09 Wednesday 23:13 50 seconds install date:2014 June 24 Tuesday 18:45 10 seconds Build host:hs20-bc2-4.build.redhat.comgroup:applications/editors Source RPM:GEDIT-2.16.0-9.EL5.SRC.R pmsize:17719102 License:gplsignature:dsa/sha1, January 10, 2008 Thursday 20:04 02 seconds, Key ID 532 6810137017186packager:red Hat, Inc.  
 1 [[email protected] software]# RPM-QIP httpd-2.2.3-91.el5.centos.x86_64.rpm 2 Warning:                        Httpd-2.2.3-91.el5.centos.x86_64.rpm:header V3 DSA Signature:nokey, key ID e8562897 3 name:httpd Relocations: (not relocatable) 4 version:2.2.3 vendor:centos 5 Release:9 1.el5.centos build date:2014 September 16 Tuesday 23:09 48 seconds 6 Install Date: (not installed) Build Hos         t:builder17.centos.org 7 Group:system environment/daemons Source rpm:httpd-2.2.3-91.el5.centos.src.rpm 8 Size : 3325176 License:apache Software License 9 signature:dsa/sha1, September 19, 2014 Friday 19 o'clock 4 8 minutes 33 seconds, Key ID a8a447dce856289710 URL:HTTP://HTTPD.APACHE.ORG/11 summary:apache http Server-description:13  The Apache HTTP Server is a powerful, efficient, and EXTENSIBLE14 web server.15 [[email protected] software]#
    • File installation location in query package

RPM-QL Package Name

Options

-L lists List

-p query where installation packages will be installed information package

1 [[Email protected] software]# RPM-QLP httpd-2.2.3-91.el5.centos.x86_64.rpm  2 Warning: Httpd-2.2.3-91.el5.centos.x86_64.rpm:header V3 DSA Signature:nokey, key ID e8562897 3/etc/httpd 4/etc/httpd/conf 5/et C/HTTPD/CONF.D 6/etc/httpd/conf.d/readme 7/etc/httpd/conf.d/proxy_ajp.conf 8/etc/httpd/conf.d/welcome.conf 9/etc/ Httpd/conf/httpd.conf10/etc/httpd/conf/magic11/etc/httpd/logs12/etc/httpd/modules13/etc/httpd/run

RPM Default installation location--------------is not a hard standard, just used to install location, individual software is not comply with this standard.

/etc/configuration File installation directory

/usr/bin/executable Command installation directory

/usr/lib/where the library of functions used by the program is saved

/usr/share/doc/Basic software User manual save location

/usr/share/man Help File Save location

    • Query which RPM package the system files belong to

RPM-QF System file name (must be installed through the RPM file to be able to reverse query)

Options

-F Query which package file the system files belong to

    • Querying package dependencies

RPM-QR Package Name

Options

-R Query Package dependency requires

-p query For information about packages not installed package

1 [[Email protected] var]# RPM-QR lrzsz 2 libc.so.6   3 libc.so.6 (glibc_2.0)   4 libc.so.6 (glibc_2.1)   5 libc.so. 6 (glibc_2.3)   6 libc.so.6 (glibc_2.3.4)   7 libc.so.6 (glibc_2.4)   8 libnsl.so.1   9 Rpmlib ( Compressedfilenames) <= 3.0.4-110 rpmlib (partialhardlinksets) <= 4.0.4-111 rpmlib (PayloadFilesHavePrefix) <= 4.0-112 rtld (Gnu_hash)  [[email protected] var]# rpm-qrp/root/software/httpd-2.2.3-91.el5.centos.x86_64.rpm 14 Warning:/root/software/httpd-2.2.3-91.el5.centos.x86_64.rpm:header V3 DSA signature:nokey, key ID e856289715/bin/ Bash  16/bin/mktemp  17/bin/mv  18/bin/rm  19/bin/sh  20/bin/sh  21/bin/sh  22/bin /sh  23/bin/sh  24/etc/mime.types  25/sbin/chkconfig  26/usr/bin/find  

RPM Package Check:

Rpm-v Installed package Name

Options

The-V checksum specifies that the files in the RPM package verify have no output, which means OK; If the message is displayed, the file is passive-the file is modified.

File extraction in RPM package

Rpm2cpio Package Full Name | Cpio-idv. File absolute Path

Rpm2cpio convert RPM package to cpio Format command

Cpio is a standard tool for creating software files and extracting files from files

Cpio Options < [file | device]

Options

-I copy-in mode, restore

-D automatically create a new directory when restoring

-V shows the restore process

1 [[Email protected] ~]# RPM-QF/BIN/LS2 coreutils-5.97-23.el53 [[email protected] ~]# Rpm2cpio/mnt/cdrom/packages/coreu tils-5.97-23.el5.rpm | Cpio-idv./bin/ls4 [[email protected] ~]# cp/root/bin/ls/bin/

RPM---Linux Software installation and management

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.