IT星球论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 112|回复: 0

[yum源配置]CentOS-5的yum源无法使用问题

[复制链接]

2004

主题

1

好友

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

优秀会员 助人为乐 辛勤工作 技术精英 多才多艺 优秀班竹 灌水天才 星球管理 宣传大使 灌水之王 财富勋章 版主勋章 动漫勋章 勤奋会员 论坛精英 PS高手 心 8 闪游皮肤 双鱼座 8★8➹ 志愿者 乖

发表于 2017-10-16 11:51:19 |显示全部楼层
[yum源配置]Centos-5的yum源无法使用问题
vi /etc/yum.repos.d/CentOS-Base.repo,将其内容配置如下:
  1. #
  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. #
  7. # If the mirrorlist= does not work for you, as a fall back you can try the
  8. # remarked out baseurl= line instead.
  9. #
  10. #


  11. [base]
  12. name=CentOS-$releasever - Base
  13. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  14. #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
  15. baseurl=http://vault.centos.org/5.11/os/$basearch/
  16. gpgcheck=1
  17. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


  18. #released updates
  19. [updates]
  20. name=CentOS-$releasever - Updates
  21. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  22. #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
  23. baseurl=http://vault.centos.org/5.11/updates/$basearch/
  24. gpgcheck=1
  25. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


  26. #additional packages that may be useful
  27. [extras]
  28. name=CentOS-$releasever - Extras
  29. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  30. #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
  31. baseurl=http://vault.centos.org/5.11/extras/$basearch/
  32. gpgcheck=1
  33. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5




  34. #additional packages that extend functionality of existing packages
  35. [centosplus]
  36. name=CentOS-$releasever - Plus
  37. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
  38. #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
  39. baseurl=http://vault.centos.org/5.11/centosplus/$basearch/
  40. gpgcheck=1
  41. enabled=0
  42. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5




  43. #contrib - packages by Centos Users
  44. [contrib]
  45. name=CentOS-$releasever - Contrib
  46. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
  47. #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
  48. baseurl=http://vault.centos.org/5.11/contrib/$basearch/
  49. gpgcheck=1
  50. enabled=0
  51. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
复制代码
执行
yum clean all
yum make cache
接下下就可以使用了
[yum源配置]CentOS-5的yum源无法使用问题
该会员没有填写今日想说内容.
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

回顶部