Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1314581
  • 博文数量: 273
  • 博客积分: 5865
  • 博客等级: 准将
  • 技术积分: 3280
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-11 10:01
文章分类

全部博文(273)

文章存档

2015年(33)

2014年(11)

2013年(11)

2012年(136)

2011年(32)

2010年(50)

分类: LINUX

2012-08-04 09:30:04

 

# 备份
# mv /etc/yum.repos.d/CentOS-Base.repo{,.bak}
# 修改
# vi /etc/yum.repos.d/CentOS-Base.repo

Config代码 收藏代码

  1. # CentOS-Base.repo 
  2. # The mirror system uses the connecting IP address of the client and the 
  3. # update status of each mirror to pick mirrors that are updated to and 
  4. # geographically close to the client. You should use this for CentOS updates 
  5. # unless you are manually picking other mirrors. 
  6. # If the mirrorlist= does not work for you, as a fall back you can try the  
  7. # remarked out baseurl= line instead. 
  8. [base] 
  9. name=CentOS-$releasever - Base 
  10. #mirrorlist=
  11. baseurl=
  12. gpgcheck=1
  13. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  14. #released updates  
  15. [updates] 
  16. name=CentOS-$releasever - Updates 
  17. #mirrorlist=
  18. baseurl=
  19. gpgcheck=1
  20. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  21. #additional packages that may be useful 
  22. [extras] 
  23. name=CentOS-$releasever - Extras 
  24. #mirrorlist=
  25. baseurl=
  26. gpgcheck=1
  27. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  28. #additional packages that extend functionality of existing packages 
  29. [centosplus] 
  30. name=CentOS-$releasever - Plus 
  31. #mirrorlist=
  32. baseurl=
  33. gpgcheck=1
  34. enabled=0
  35. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  36. #contrib - packages by Centos Users 
  37. [contrib] 
  38. name=CentOS-$releasever - Contrib 
  39. #mirrorlist=
  40. baseurl=
  41. gpgcheck=1
  42. enabled=0
  43. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# yum clean all
# yum makecache     #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
# yum install vim*    #测试域名是否可用

附:增加RPMforge源

1,download the rpmforge package:

2,Install DAG's GPG key

sudo rpm --import

如果上面出现错误,确认下:

sudo rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm

3,sudo rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm

4,试试看:sudo yum install htop

开始更新系统:

yum update

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