Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1945297
  • 博文数量: 424
  • 博客积分: 1291
  • 博客等级: 中尉
  • 技术积分: 2682
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-13 01:34
个人简介

linux oracle 网络安全 编程

文章分类

全部博文(424)

文章存档

2016年(22)

2015年(53)

2014年(57)

2013年(242)

2012年(50)

分类: LINUX

2013-01-03 00:33:35

修改yum的更新源vi /etc/yum.repos.d/CentOS-Base.repo

在CentOS 5.5 里,默认的yum更新源是镜像列表来的,系统会根据你的速度及地区自动检测一个速度较快的更新源并使用此更新源,很多时候,所检测并用到的是163

也可以修改其它的或你认为快的源,只需要修改 /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
mirrorlist=
#baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=
#baseurl=
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=
#baseurl=
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=
#baseurl=
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=
#baseurl=
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=
#baseurl=
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

---------------------------------------------------------------------------------

如果要修改成163的,将上面的内容替换成如下的即可

# 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
baseurl=
gpgcheck=1
gpgkey=

[updates]
name=CentOS-$releasever - Updates
baseurl=
gpgcheck=1
gpgkey=

[addons]
name=CentOS-$releasever - Addons
baseurl=
gpgcheck=1
gpgkey=

[extras]
name=CentOS-$releasever - Extras
baseurl=
gpgcheck=1
gpgkey=

[centosplus]
name=CentOS-$releasever - Plus
baseurl=
gpgcheck=1
enabled=0
gpgkey=

阅读(504) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~