Linux centos6.6 Yum Detailed

Source: Internet
Author: User
Tags install package files

Introduction to the installation method of CentOS Yum

Yum can resolve dependencies on its own, and Yum is dependent on rpm

Yum needs to build a file server to store RPM packages

Server for File services:

FTP Service

HTTP Service

Local Files Directory

NFS Services


Yum corresponds to RPM:

RPM is the base package Manager

Yum is the front-end tool for RPM


The path that the warehouse points to: The parent directory where the Repodata directory resides


Yum command-line tools:

Configuration file: Point to the location of the warehouse and related configuration information, each Yum command line can point to multiple warehouses at the same time, the warehouse can be prioritized and other related configuration;


There are two components:

Master configuration file:/etc/yum.conf

Provide common configuration files for each warehouse point;

Definitions of each warehouse:/etc/yum.repos.d/*.repo


Directive=value


Note: The file ends with a. Repo; one or more warehouses can be configured in each repo configuration file;


MAIN]: Provide public configuration information


Each warehouse configuration

[Repositoryid]

# for the current system of Yum, this Repositoryid is used to uniquely identify this repository point, so it must be unique;

Name=

# current warehouse description information;

baseurl=url://path/to/repository/

# indicates the access path of the repository, usually a repository that is output on a file server;


Url:

FTP Service

Ftp://SERVER/PATH/TO/REPOSITORY

HTTP Service

Http://SERVER/PATH/TO/REPOSITORY

Local directory:

File:///PATH/TO/REPOSTIROY


Enabled={1|0}

Whether this warehouse can be used

Gpgcheck={1|0}

Whether to validate the package

Gpgkey=url://path/to/keyfile

Indicates the path to the Gpgkey file;

cost=#

Indicates the current repository access cost, which defaults to 1000;


Yum command:

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


command is one of:

* Install Package1 [Package2] [...]

* Update [PACKAGE1] [Package2] [...]

* Update-to [Package1] [Package2] [...]

* Check-update

* upgrade [Package1] [Package2] [...]

* Upgrade-to [Package1] [Package2] [...]

* Distribution-synchronization [Package1] [Package2] [...]

* Remove | Erase Package1 [Package2] [...]

* List [...]

* Info [...]

* provides | Whatprovides Feature1 [Feature2] [...]

* Clean [Packages | metadata | expire-cache | rpmdb | plugins | all]

* Makecache

* Groupinstall group1 [group2] [...]

* Groupupdate group1 [group2] [...]

* grouplist [hidden] [Groupwildcard] [...]

* Groupremove group1 [group2] [...]

* GroupInfo group1 [...]

* Search string1 [string2] [...]

* Shell [filename]

* RESOLVEDEP DEP1 [DEP2] [...]

* Localinstall Rpmfile1 [rpmfile2] [...]

(Maintained for legacy reasons Only-use install)

* Localupdate Rpmfile1 [rpmfile2] [...]

(Maintained for legacy reasons Only-use Update)

* Reinstall Package1 [Package2] [...]

* Downgrade Package1 [Package2] [...]

* Deplist Package1 [Package2] [...]

* Repolist [all|enabled|disabled]

* Version [all | installed | available | group-* | nogroups* | grouplist | groupinfo]

* History [Info|list|packages-list|packages-info|summary|addon-info|redo|undo|rollback|new|sync|stats]

* Load-transaction [Txfile]

* Check

* Help [command]


Warehouse Management:

repolist: List all available warehouses that have been configured

repolist [all|enabled|disabled]


Cache Management:

clean: Cleanup cache

Clean [Packages | metadata | expire-cache | rpmdb | plugins | all]

Makecache: Cache creation

automatically connect to each available warehouse, download its no data, and create it as a cache;


Package View:

Yum list [All | glob_exp1] [GLOB_EXP2] [...]


yum list {available|updates|installed|extras|obsoletes} [GLOB_EXP1] [...]


grouplist [hidden] [Groupwildcard] [...]


Package Installation:

Install package1 [Package2] [...]


Note: You only need to provide the package name;


If a package has several different versions in different warehouses, the latest version is installed by default;


If you are installing the specified version: Install package-version ...


Reinstall (Overwrite installation)

Reinstall Package1 [Package2] [...]


Package Upgrade:

Update [package1] [Package2] [...]


Package demotion:

downgrade Package1 [Package2] [...]


Check which upgrades are available:

Check-update


Unloading:

Remove | Erase Package1 [Package2] [...]


All packages that depend on the package being uninstalled will be uninstalled;


Inquire:

Brief information about the query program: INFO package ...


search for the specified keyword in the package name and sumary information: Searching KEYWORD ...


Query which package the specified file is installed on build: Provides|whatprovides/path/to/somefile


To install or upgrade a local package file:

localinstall rpmfile1 [Rpmfile2] [...]


used to install package files that do not exist in the warehouse, which may be dependent on some packages in the warehouse;


localupdate rpmfile1 [Rpmfile2] [...]


Package Group Management:

List all package groups: Grouplist

Show specified package group details: GroupInfo group1 [...]


Installation: Groupinstall group1 [group2] [...]


Uninstall: Groupremove group1 [group2] [...]


Upgrade: Groupupdate group1 [group2] [...]


Note: You can manage package groups directly with install, remove, or update:

@GROUP_NAME


Yum Install @ "Server Platform Development"


Available options for the Yum command:

-y: Auto Answer "yes"

--disablerepo=: Temporarily disables a repository that is configured and enabled in the configuration file;

--enablerepo=: Temporarily enables a specified repo;

--nogpgcheck: It is forbidden to do package verification;



Yum has built-in variables for storing the current platform's phase information;

(1) $raleasever: The major version number of the current OS release;

For example, for CentOS 6.6 x86_64, the major version number is 6;

(2) $arch: Platform

i386, i486

(3) $basearch: Basic platforms, such as i686, i586, i486 and i386, are i386;

(4) $YUM 0-$YUM 9



How to use the release CD as a Yum repository

(1) Mount the disc to a specified mount point, such as/media/cdrom

(2) Create a new yum repo configuration file similar to the following:

[Dvdbase]

Name=centos 6.6 x86_64 on DVD1

Baseurl=file:///media/cdrom

Gpgcheck=0

Enabled=1


This article is from the "Big rookie Linux" blog, make sure to keep this source http://58dream.blog.51cto.com/10078511/1631985

Linux centos6.6 Yum Detailed

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.