Linux System Package management tool RPM

Source: Internet
Author: User

What is rpm :

RPM Full name is "RedHat Package Manager", referred to as RPM, this software management mechanism is developed by RedHat this company. RPM is a set of management mechanisms for installing the software you need into your Linux system in a database-logged way. Its biggest feature is the software you want to install first compiled, and packaged into the RPM mechanism of the installation package, through the packaging of the software in the default database record this software installation must have the dependency property software, with the installation, do not have to install.


part of the program :

Before compiling: source code

Compiling files

Binaries:/bin,/sbin,/usr/bin,/usr/sbin,/usr/local/bin,/usr/local/sbin

Library files:/lib,/lib64,/usr/lib,/usr/lib64,/usr/local/lib,/usr/local/lib64

Configuration files:/etc,/etc/dir,/usr/local/{etc,conf}

Help files:/usr/share/man,/usr/share/doc

Man Handbook:/usr/share/man, /usr/local/share/man


Package naming Format :

Rp-pppoe-3.1-5. i386. rpm

Software name software version information published in the number of times appropriate for the hardware platform extension


The current distributions in the release of software, the content of the software will be divided into general use and development of the use of two categories: the latter is generally not installed, because most of the end users do not develop software

Pam-x x.rpm

Pam-devel-x x.rpm


Package Fetch Method :

System's release disc image or official site

To mount a disc:

Mount-r/dev/cdrom/media/

Official site

Mirrors.sohu.com

Mirrors.163.com

Mirrors.aliyun.com

Url:

Http://rpmfind.net

Http://rpm.pbone.net

http://pkge.org

Note: Before installing, verify its legality;


RMP How to use

Installation

-IVH: Install, display the installation process, display the installation progress

#rpm-IVH zsh-5.0.2-14.el7.x86_64.rpm in preparation ... ################################# [100%] Upgrading/installing ... 1:zsh-5.0.2-14.el7 ################################# [100%]

--nodeps: ignoring dependencies; side effects: Successful installation but not necessarily running successfully

650) this.width=650, "src=" Http://s2.51cto.com/wyfs02/M01/7D/8E/wKioL1bqun7xTJOIAABQo8yetf4771.png "title=" Q) $RZ ( @SA%w (piq}$2) zcha.png "alt=" Wkiol1bqun7xtjoiaabqo8yetf4771.png "/>

--replacepkgs: Overwrite installation: Reinstall and overwrite the original file

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7D/8E/wKioL1bqu7fwpi56AABB_q7924k145.png "title="%9h@3b %0x5m]et_]m7@vln2.png "alt=" Wkiol1bqu7fwpi56aabb_q7924k145.png "/>

--force: Forced installation

RPM-IVH--force zsh-5.0.2-14.el7.x86_64.rpm


Upgrade:

-UVH: Upgrade if old version is installed, otherwise install

#rpm-UVH zsh-5.0.2-14.el7.x86_64.rpm in preparation ... ################################# [100%] package zsh-5.0.2-14.el7.x86_64 already installed

-FVH: If an older version is installed, upgrade, or exit

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7D/91/wKiom1bqvveDzut2AAApGW3rVQw024.png "title=" h$ Moin5o~l$xb%cf@ih_7~6.png "alt=" wkiom1bqvvedzut2aaapgw3rvqw024.png "/>--oldpackage; downgrade to old version

--nodeps: Ignoring dependencies


Note: Be sure not to upgrade the kernel; Linux allows multiple cores to coexist, so you can install multiple different versions of the kernel

Note: If the package configuration file has been modified after the upgrade, the new version of the file will not overwrite the old version of the configuration file and the new version of the profile is renamed (. rpmnew) after saving


Unloading:

-EVH: Uninstalling, and displaying the execution process

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7D/8E/wKioL1bqwJmzNkoeAAASvnC7l7g892.png "title=" 2gs3iv ) KH (1nm}h[75vxd$1.png "alt=" Wkiol1bqwjmznkoeaaasvnc7l7g892.png "/>

--test: Test Uninstall

--allmatches: If a package installs multiple versions at the same time, this option uninstalls all at once

Note: If the package configuration file has been modified since it was uninstalled, this file is usually not deleted, but is renamed with the suffix (. rpmsave) after it is retained


Inquire:

- Q: Query whether a package is installed

#rpm-Q zsh-5.0.2-14.el7.x86_64.rpm package is not installed zsh-5.0.2-14.el7.x86_64.rpm

-QA: Querying all installed packages

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7D/8E/wKioL1bqw-7AtSt1AAAKIqfv0lM898.png "title=" [)) { H4G8071C9N8H@Z848X7.png "alt=" Wkiol1bqw-7atst1aaakiqfv0lm898.png "/>

#rpm-qa | grep "Zsh"

-QF: Query which package installs a file for build

#rpm-qf/etc/passwdsetup-2.8.71-5.el7.noarch

    

#rpm  -qpi gcc-4.8.5-4.el7.x86_64.rpmName        :  Gccversion     : 4.8.5release     : 4. el7architecture: x86_64install date:  (not installed) group        : Development/LanguagesSize        :  39010978license     : gplv3+ and gplv3+ with exceptions  and GPLv2+ with exceptions and LGPLv2+ and BSDSignature    : rsa/sha256, 2015 November 25   Wednesday  22 30 minutes, 54 seconds, key id  24c6a8a7f4a80eb5source rpm  : gcc-4.8.5-4.el7.src.rpmbuild date  :  November 19, 2015   Thursday  23 01 minutes 53 seconds build host  : worker1.bsys.centos.orgrelocations :   (not relocatable) Packager    : centos buildsystem 

-ql: Query the list of files for a package installation

#rpm-QL zsh|less/bin/zsh/etc/skel/.zshrc/etc/zlogin/etc/zlogout/etc/zprofile/etc/zshenv/etc/zshrc/usr/lib64/zsh /usr/lib64/zsh/5.0.2/usr/lib64/zsh/5.0.2/zsh/usr/lib64/zsh/5.0.2/zsh/attr.so/usr/lib64/zsh/5.0.2/zsh/cap.so ...

-QC: Query the configuration file path generated after a package is installed

#rpm-QC ZSH/ETC/SKEL/.ZSHRC/ETC/ZLOGIN/ETC/ZLOGOUT/ETC/ZPROFILE/ETC/ZSHENV/ETC/ZSHRC

-QD: Querying all Help files generated after a package is installed

#rpm-QD zsh/usr/share/doc/zsh-5.0.2/bugs/usr/share/doc/zsh-5.0.2/contributors/usr/share/doc/zsh-5.0.2/faq/usr/ share/doc/zsh-5.0.2/features/usr/share/doc/zsh-5.0.2/licence/usr/share/doc/zsh-5.0.2/machines/usr/share/doc/ zsh-5.0.2/news/usr/share/doc/zsh-5.0.2/readme/usr/share/doc/zsh-5.0.2/completion-style-guide/usr/share/doc/ zsh-5.0.2/zsh-development-guide/usr/share/doc/zsh-5.0.2/zshprompt.pl ...

-Q--changelog: View changelog information that changes with the version when a package is made

*  Five  8 month  14 2015 Kamil Dudka <[email protected]> -  5.0.2-14- fix alias handling in command substitution  (#1253555) *  Four  7 Month  30 2015 kamil dudka <[email protected]> - 5.0.2-13-  fix parser regression introduced by the fix for bug # 1241023*  three  7 month  08 2015 kamil dudka <[email protected]> -  5.0.2-12- fix command substitutions to parse contents as they  are read in  (#1241023) *  five  5 month  22 2015 kamil dudka <[ Email protected]> - 5.0.2-11- fix sigsegv of the syntax check  in ksh emulation mode  (#1222867) *   5 Month  18 2015 Kamil  dudka <[email protected]> - 5.0.2-10- signal safety when updating global state  (# 1163823) ...

-Q--provides Query the capabilities provided by a package

#rpm-Q--provides zshconfig (zsh) = 5.0.2-14.el7zsh = 5.0.2-14.el7zsh (x86-64) = 5.0.2-14.el7

-Q--requires: Querying the capabilities that a package depends on

#rpm-Q--requires zsh/bin/sh/bin/sh/bin/sh/bin/sh/bin/zsh/sbin/install-info

-Q--scripts: Query the script executed when a package is installed or uninstalled

#rpm-Q--scripts zshpostinstall scriptlet (using/bin/sh): if [!-f/etc/shells]; Then echo "/bin/zsh" >/etc/shellselse grep-q "^/bin/zsh$"/etc/shells | | echo "/bin/zsh" >>/etc/shellsfiif [-f/usr/share/info/zsh.info.gz]; then# this was needed so that--excludedocs works./sbin/install-info/usr/share/info/zsh.info.gz/usr/share/info/dir--en try= "* zsh: (zsh). An enhanced Bourne shell. " Fi:preuninstall scriptlet (using/bin/sh):

There are four types of scripts:

Preinstall: script executed before the installation process starts

Postinstall: Scripts executed after the installation process

Preuninstall: Scripts executed prior to uninstallation

Postuninstall: script executed after uninstallation process is complete

This article is from the "11249394" blog, please be sure to keep this source http://11259394.blog.51cto.com/11249394/1752359

Linux System Package management tool RPM

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.