Chinaunix首页 | 论坛 | 博客
  • 博客访问: 36710
  • 博文数量: 12
  • 博客积分: 265
  • 博客等级: 二等列兵
  • 技术积分: 130
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-08 11:33
文章分类

全部博文(12)

文章存档

2012年(12)

我的朋友

分类: LINUX

2012-08-12 20:04:59

 
#cd /etc/yum.repos.d/
#mv CentOS-Base.repo CentOS-Base.repo.bak
#vi CentOS-Base.repo
加入如下内容:

点击(此处)折叠或打开

  1. # CentOS-Base.repo
  2. #
  3. # This file uses a new mirrorlist system developed by Lance Davis for CentOS.
  4. # The mirror system uses the connecting IP address of the client and the
  5. # update status of each mirror to pick mirrors that are updated to and
  6. # geographically close to the client. You should use this for CentOS updates
  7. # unless you are manually picking other mirrors.
  8. #
  9. # If the mirrorlist= does not work for you, as a fall back you can try the
  10. # remarked out baseurl= line instead.
  11. #
  12. #
  13.   
  14. [base]
  15. name=CentOS-$releasever - Base
  16. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  17. #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
  18. baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
  19. gpgcheck=1
  20. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

  21. #released updates
  22. [updates]
  23. name=CentOS-$releasever - Updates
  24. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  25. #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
  26. baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
  27. gpgcheck=1
  28. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

  29. #packages used/produced in the build but not released
  30. [addons]
  31. name=CentOS-$releasever - Addons
  32. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
  33. #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
  34. baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
  35. gpgcheck=1
  36. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

  37. #additional packages that may be useful
  38. [extras]
  39. name=CentOS-$releasever - Extras
  40. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  41. #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
  42. baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
  43. gpgcheck=1
  44. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

  45. #additional packages that extend functionality of existing packages
  46. [centosplus]
  47. name=CentOS-$releasever - Plus
  48. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
  49. #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
  50. baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
  51. gpgcheck=1
  52. enabled=0
  53. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#
rpm --import 
#
yum upgrade <执行后升级系统所有可以升级的包,不建议执行>
阅读(327) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~