CentOSyum不能用

 
CentOSyum不能用
2016-09-26 20:03:16 /故事大全

修改/etc/yum.repos.d/Centos-Base.repo

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

#

#

[base]

name=CentOS-$releasever - Base - 163.com

baseurl=//mirrors.163.com/centos/$releasever/os/$basearch/

#mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

gpgcheck=1

gpgkey=//mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-$releasever - Updates - 163.com

baseurl=//mirrors.163.com/centos/$releasever/updates/$basearch/

#mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

gpgcheck=1

gpgkey=//mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras - 163.com

baseurl=//mirrors.163.com/centos/$releasever/extras/$basearch/

#mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras

gpgcheck=1

gpgkey=//mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus - 163.com

baseurl=//mirrors.163.com/centos/$releasever/centosplus/$basearch/

#mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus

gpgcheck=1

enabled=0

gpgkey=//mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users

[contrib]

name=CentOS-$releasever - Contrib - 163.com

baseurl=//mirrors.163.com/centos/$releasever/contrib/$basearch/

#mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib

gpgcheck=1

enabled=0

gpgkey=//mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

文件免费下载地址://download.csdn.net/detail/chenyiming_1990/7032825

centos /etc/yum.repo.d/中.repo源的配置与编写详解

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

#

#

[base] //唯一标识的名称

name=CentOS-$releasever - Base //所使用的.repo文件的名字

mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

#mirrorlist 是由 yum 程式自行去捉映射站台, baseurl 则是指定固定的一個容器网址

#baseurl=//mirror.centos.org/centos/$releasever/os/$basearch/

#其中url支持的协议有 // ftp:// file://三种。baseurl后可以跟多个url,你可以自己改为速度比较快的镜像站,但baseurl只能有一个

gpgcheck=1 #gpg签名检查

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#gpg密钥的位置,应指定本机的密钥文件只有可以与服务器上的密钥进行校验。

#released updates

#该段指向的路径是软件升级时需要的软件包

[updates]

name=CentOS-$releasever - Updates

mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

//该路径对应服务器上的update文件夹,即自动到服务器updates文件夹里找软件包

#baseurl=//mirror.centos.org/centos/$releasever/updates/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released

#该段指向的路径是已经使用了或者已经制作出来的软件,但并没有发行

[addons]

name=CentOS-$releasever - Addons

mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons

#baseurl=//mirror.centos.org/centos/$releasever/addons/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

#该段指向的路径是可能有用的其他的软件

[extras]

name=CentOS-$releasever - Extras

mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras

#baseurl=//mirror.centos.org/centos/$releasever/extras/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages

#该段指向的路径是已经存在的软件的扩展软件、插件等等

[centosplus]

name=CentOS-$releasever - Plus

mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus

#baseurl=//mirror.centos.org/centos/$releasever/centosplus/$basearch/

gpgcheck=1

enabled=0 #enabled=0表示这个源停用 如果enabled不写 表示enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users

#该段指向的路径是系统使用者所贡献的软件

[contrib]

name=CentOS-$releasever - Contrib

mirrorlist=//mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib

#baseurl=//mirror.centos.org/centos/$releasever/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

所属专题:
如果您觉得本文或图片不错,请把它分享给您的朋友吧!

 
搜索
 
 
广告
 
 
广告
 
故事大全
 
版权所有- © 2012-2015 · 故事大全 SITEMAP站点地图-Foton Auman手机看故事 站点地图-Foton Auman