With Margo Linux (Lesson 6) Linux Package Manager rpm & Yum

Source: Internet
Author: User
Tags aliyun

First, RPM

1. What is rpm

RPM is an abbreviation for Red Hat Package Manager and is intended to be managed by Red Hat packages, as the name implies in the package management that Red Hat has contributed, and in mainstream releases such as Fedora, Redhat, Mandriva, SuSE, Yellowdog, etc. , as well as the release version that was developed two times on the basis of these editions.

2.RPM syntax format

1) Query, verify
RPM {-q|--query} [select-options] [query-options]

RPM {-v|--verify} [select-options] [verify-options]

2) installation, uninstall upgrade, etc.

installing, upgrading, and removing PACKAGES:
RPM {-i|--install} [install-options] package_file ...

RPM {-u|--upgrade} [install-options] package_file ...

RPM {-f|--freshen} [install-options] package_file ...

RPM {-e|--erase} [--allmatches] [--nodeps] [--noscripts]
[--notriggers] [--test] Package_name ...

3. Common parameters

-I: Installation

-V: Displays the installation process

-H: Show hash value

-P: Query does not install package contents

-A: Querying all packages that have been installed

-F Query The file here has that package installation generated

-C Querying all configuration file contents

-A: Querying all packages that have been installed

-C Query making configuration information generated by the package

-D query to develop the document information generated by the package

-L query to make all files generated by the package

Configuration information generated by the query-making package

-D query to develop the document information generated by the package

-L query to make all files generated by the package

-P query for non-installed RPM files with file names

--nodeps: Ignore dependency installation

--replacekgs: Reinstall

Common parameter combinations:

-IVH: Show detailed installation process

-UVH: If there is no legacy package, upgrade

-FVH: If there is no legacy package, do not install

--nodeps Ignore dependencies

--oldpackage: Downgrade

--force: Mandatory

4.RPM Package Command Specification

name-version-release.arch.rpm

Name: Package Name

Version: Major version number

Release: Minor version number

ARCH: Architecture Type

5. How to get the RPM package

How to get RPM packages

1). Packages provided by the release version

2). Fedora-epel

3). Official site of the project

4). Search Engine

Http://rpmfind.net

Http://rpm.pbone.net

http://pkgs.org

6. Example:

1). Install man-pages-3.53-5.el7.noarch.rpm

RPM–IVH man-pages-3.53-5.el7.noarch.rpm

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/73/1E/wKiom1X1YpXzjfRLAAAgi3ohuMk123.jpg "width=" 244 "height="/>

2). Query the system to start all the man program

Rpm–qa | grep ' ^man '

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/73/1E/wKiom1X1YpWy6WoTAAA9JAVlK8E508.jpg "width=" 244 "height=" "/>"

3). Uninstalling Man-pages-3.53-5.el7.noarch

Rpm–ev Man-pages-3.53-5.el7.noarch

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/73/1E/wKiom1X1YpawtK79AAAfh7MfyI4973.jpg "width=" 244 "height="/>

4). Upgrade Man-pages-3.53-5.el7.noarch

RPM–UVH man-pages-3.53-5.el7.noarch.rpm

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/73/1E/wKiom1X1Ypbw60NVAAAkpNYkpGU349.jpg "width=" 244 "height="/>

5). Query for a package that is not installed

RPM–QIP zlib-devel-1.2.7-13.el7.x86_64.rpm

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/73/1E/wKiom1X1Ypeg02LYAABQII_s9uY836.jpg "width=" 244 "height=" 111 "/>

6). Query what files are generated after Yum installation

rpm-qf/usr/share/yum-cli/shell.py

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/73/1E/wKiom1X1YpeyJuxhAAAcuxIKSv0236.jpg "width=" 244 "height="/>

7). Query yum for all configuration files

RPM–QC Yum

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/73/1E/wKiom1X1YpiC3JysAAAszyHzLOY565.jpg "width=" 244 "height=" "/>"

8). Verify that the Yum program is modified

Rpm-v Yum

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/73/1E/wKiom1X1Ypihd3QrAAAmPtLGDkM747.jpg "width=" 244 "height="/>

Second, yum

Yum (full name Yellow dog Updater Modified) is a shell front end package Manager in Fedora and Redhat as well as SuSE. Based on RPM package management, the ability to automatically download RPM packages from specified servers and install them, automatically handle dependency relationships, and install all dependent software packages at once, without the hassle of downloading and installing them over and over again.

1. Command syntax

Yum [options] [command] [package ...]

2. Common parameters

Parameters:

1). Single package:

Install installation

Remove Uninstall

Search query

list [all|installed|availiable] list of installed, not installed, available packages

Reinstall re-installation

Clean all Clear Cache

Makecache Creating a cache

2). Package Group

Description: A group of packages that implement a feature that consists of a package group that contains multiple packages

Grouplist List Package Groups

GroupInfo Display Package Group information

GROUPINTSLL Installing package Groups

Groupremove Uninstalling package Groups

--disablerepo=xxx Disabling the installation source

--enablerepo=xxx Enabling the installation source

3.yum configuration file

/ETC/YUM.CONF: Defines the global configuration, which is defined for all warehouses using the yum command function

/etc/yum.repos.d/*.repo: Define the Yum repository

4. Example

1). Define a yum parameter named Aliyun.repo

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/73/1E/wKiom1X1YpizOTstAAAbPnWfv3k507.jpg "width=" 244 "height="/>

2). Specify Aliyun for the Yum Warehouse installation httpd

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" http:// S3.51cto.com/wyfs02/m00/73/1e/wkiom1x1ypmczufxaaa67daj1so458.jpg "width=" 244 "height="/>

3). List all available package groups

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/73/1E/wKiom1X1YpnCLulOAACyN0wzdAs584.jpg "width=" 244 "height=" 218 "/>

4). Install the Development Tools package

Note: The installation package needs to be referenced using "".

650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/73/1E/wKiom1X1YprQ_57VAAB1jr6sYrY591.jpg "width=" 244 "height=" "/>

With Margo Linux (Lesson 6) Linux Package Manager rpm & Yum

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.