Chinaunix首页 | 论坛 | 博客
  • 博客访问: 407115
  • 博文数量: 60
  • 博客积分: 1082
  • 博客等级: 上士
  • 技术积分: 648
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-24 18:24
个人简介

奋斗的人,交心的人,碰见喷子,绝对不手软。

文章分类
文章存档

2015年(1)

2014年(18)

2013年(17)

2012年(21)

2011年(3)

分类: LINUX

2012-05-12 15:38:14

   刚装完的Centos6.2的yum源默认是官网的源,使用yum起来比较慢,就想使用163的源,以下是我的步骤,有这方面的需求的可以看下:首先,备份下Centos-base.repo
#mv /etc/yum.repos.d/Centos-Base.repo /etc/yum.repos.d/Centos-Base.repo.bak
#vi /etc/yum.repos.d/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-6

#released updates

[updates]

name=CentOS-$releasever - Updates

#mirrorlist=

baseurl=

gpgcheck=1

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

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

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

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

 

完成以上保存退出,使用yum clean all,清空以前的yum 缓存,再yum makecache下,就可以了,如果需要安装其它的源,可手动添加,如增加RPMforge源:

rpm  -ivh 

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