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

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