Linux---YUM

Source: Internet
Author: User

I. Introduction to Yum

Yum is Yellow dog Updater, Modified, a shell front-end package manager in Fedora and Redhat as well as SuSE. Based on the RPM manager, the ability to automatically download RPM packages from specified servers and install them automatically handles dependency relationships and installs all dependent packages at once, without the hassle of downloading and installing them over and over again. Yum provides commands for finding, installing, and deleting one, a group, or even all of the packages, and the commands are brief and good to remember.

Yum command form: Yum [option][command][package ...]

Option:-H: Help-y: Installation procedure Select Prompt All select Yes-q: Do not display the installation process

Command: For the action to be taken

Package: Manipulating objects


Ii. basic use of the Yum command

1. Installation

Yum Install all installed

Yum Install Package1 installs the specified installation package Package1

Yum groupinstall group1 Installer group group1 (below is a case introduction)

2. Updates and Upgrades

Yum Update all Updates

Yum updage package1 Update the specified package Package1

Yum check-update Check for updatable programs

Yum Upgrade Package1 upgrade specified package Package1

Yum groupupdate group1 upgrade program group Group1

3. Find and display

Yum Info package1 Displays installation package information Package1

Yum list shows all packages that are installed and can be installed

Yum List Package1 shows the installation of the specified package Package1

Yum groupinfo group1 Display program group group1 information

Yum search string finds the installation package based on the keyword string

4, remove the program (if the dependency is not involved, it is recommended to use RPM)

Yum Remove or erase (basic no, but occasionally see) package1 Remove Package packageq1

Yum Groupremove Group Remove program groups group1

Yum deplist package1 View program Package1 dependencies

5. Clear the Cache

Yum Clean packages clears the package from the cache directory

Yum clean headers Clear the headers (RPM header file) from the cache directory

Yum clean oldheaders Clear Cache directory for old headers

Yum Clean or the following

Yum Clear All (=yum clean Packages;yum cleaning oldheaders) clears the cache directory of packages as well as the old headers

6. For example:

Yum Grouplist: Found installable package name "A and B"

Yum Groupinstall "A and B"//"" must have, avoid being considered to be three packages

So all the software in the package is automatically installed.

7.

Third, the Yum Warehouse

1. Simple description of the Yum Warehouse

Yum terminology C/S architecture

The role of several files in the Yum repository

Primary.xml.gz: List of all rpm packages; dependencies; List of files generated per RPM installation

Filelist.xml.gz: All RPM packages in the current warehouse all Files list

OTHER.XML.GZ: Additional information. Change log for RPM packages

Repomd.xml: The timestamp and checksum of the above three files is recorded

COMPS*.XML:RPM Packet Grouping information

2. Some instructions for yum.conf configuration file

Yum.conf located under/etc directory (centos7.1 originally intended to use 6.6, the result is minimal installation resulting in fewer files)


[Main]
cachedir=/var/cache/yum/$basearch/$releasever #yum的缓存目录
Keepcache=0
debuglevel=2 #除错级别 Default is 2
Logfile=/var/log/yum.log #顾名思义是yum的日志文件
Exactarch=1 #{1|0} whether to upgrade and install packages that are consistent with your package CPU system
Obsoletes=1
Gpgcheck=1 #{1|0} represents whether the GPG check, 1 inspection
Plugins=1

Installonly_limit=5
metadata_expire=1800
# PUT YOUR REPOS here OR in separate files named File.repo
# IN/ETC/YUM.REPOS.D

3. Building a software Warehouse

About the Repo file

[REPO_ID]

Name=description

Baseurl=

ftp://

/HTTP

file:///

Enable={1|0}

Gpgcheck={1|0}

gpgkey=

Created: Sercer.repo

[Base]

Name=rhel5 Server

baseurl=ftp://

Enable=1

Gpacheck=0

[VT]

Name=rhel5 VT

baseurl=ftp://

Enable=1

Gpgcheck=0

Create a disc yum source

Vim Cdrom.repo

[Base]

Name=rhel5 CDROM Server

Baseurl=file:///media/cdrom/server

Enable=1

Gpgcheck=0


Iv. Supplementary

1. Import Key Process

RPM--import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5


Linux---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.