六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 685|回复: 0

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

[复制链接]
 楼主| 发表于 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源无法使用问题
该会员没有填写今日想说内容.
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表