找回密码
 立即注册

QQ登录

只需一步,快速开始

centos5安装yum源

最近用到一台centos5的机器~居然yum不能,发现源是阿里云的。。。。

目前centos5 阿里云和163的源已经完成不能用了,只能国外找了
找到一个
分享下:
  1. cd /etc/yum.repos.d

  2. vi CentOS-Base.repo
复制代码

  1. # The mirror system uses the connecting IP address of the client and the  
  2. # update status of each mirror to pick mirrors that are updated to and  
  3. # geographically close to the client.  You should use this for CentOS updates  
  4. # unless you are manually picking other mirrors.  
  5. #  
  6. # If the mirrorlist= does not work for you, as a fall back you can try the   
  7. # remarked out baseurl= line instead.  
  8. #  
  9. #  


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


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


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




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




  42. #contrib - packages by Centos Users  
  43. [contrib]  
  44. name=CentOS-$releasever - Contrib  
  45. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib  
  46. #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/  
  47. baseurl=http://vault.centos.org/5.11/contrib/$basearch/  
  48. gpgcheck=1  
  49. enabled=0  
  50. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
复制代码


保存后
  1. yum clean all
  2. yum makecache
复制代码

因为是国外源,比较慢~可以去喝杯茶~慢慢等

本教程由无限星辰工作室CRX349独家整理和提供,转载请注明地址,谢谢。本文地址:https://www.xmspace.net/thread-671-1-1.html
无限星辰工作室  好集导航 Discuz全集下载  星辰站长网  集热爱361  一品文学  手机小游戏合集   海外空间网 星辰api  星辰支付二维码管理平台 阿里云服务器 腾讯云服务器
服务Discuz!建站|DiscuzQ配置|二开|小程序|APP|搬家|挂马清理|防护|Win/Linux环境搭建|优化|运维|
服务理念:专业 诚信 友好QQ842062626 服务项目 Q群315524225

发表于 2018-10-26 14:43:17 | 显示全部楼层 |阅读模式

回复 | 使用道具 举报

该帖共收到 0 条回复!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

美图秀

    • fastadmin 后台界面使用字段数组类型
    • Discuz!x3.5 修改标题高亮颜色
    • Discuz!x3.5 应用中心 下载应用一直下载中
    • 帖子定时显示
    • 论坛辅助审核
拖动客服框
Online Service
点击这里给我发消息
点击这里联系我们
微信扫一扫
在线客服
快速回复 返回顶部 返回列表