[013操作系统原理系列] | yum配置解析

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

name=CentOS-$releasever - Base
#“mirrorlist”表示yum在互联网上查找升级文件的URL地址。其中“$basearch”代表了系统的硬件构架#,如“i386”、“x86_64”等,同时,yum在资源更新时,会检查baseurl/repodata/repomd.xml文件。#“repomd.xml”是一个索引文件,它的作用是提供了更新rpm包文件的西下载信息和SHA校验值。#“repomd.xml”包含了三个文件,分别是“other.xml.gz”、"filelists.xml.gz"和“primary.xml.gz”,
#表示的含义依次是“其他更新包列表”、“更新文件集中列表”和“主要更新包列表”
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
#gpgcheck表示是否启用gpg检查,1代表启用,0代表不启用校验,如果启用,就是需要在配置文件里面#注明GPG-RPM-KEY的位置,可以看到下面的gpgkey字段
gpgcheck=1

#gpgkey指定GPG密钥地址
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#本段是update更新模块要用到的部分配置
[updates]
name=CentOS-$releasever - Updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
#本段指定的是有用的额外软件部分(extras)配置
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
#本段指定的是扩展的额外软件包部分(centosplus)配置
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值