原文链接:https://www.cnblogs.com/bincoding/p/7892762.html

1、备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

CentOS 6

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、之后运行yum makecache生成缓存

最新文章

  1. hdu 1312(DFS)
  2. 【推荐】使用Jquery+EasyUI进行框架项目开发案例讲解之一---员工管理源码分享
  3. 软件测试工作中涉及的Linux命令整理
  4. VM参数简介
  5. Windows VC++常见问题汇总
  6. 使用Django清理数据库中的数据
  7. AutoFac使用方法总结
  8. 在Net MVC中应用JsTree
  9. [Swift]LeetCode18. 四数之和 | 4Sum
  10. Python内置函数(23)——format
  11. Android adb 串口调试
  12. flutter image_picker使用照相机
  13. 智能合约遇到的小错误 network up to date解决办法
  14. 微信小程序 thirdScriptError sdk uncaught third Error regeneratorRuntime is not defined ReferenceError: regeneratorRuntime is not defined
  15. PAT A1108 Finding Average (20 分)——字符串,字符串转数字
  16. Python 扩展技术总结(转)
  17. python 翻译爬虫
  18. java.security.MessageDigest (2) 生成安全令牌!
  19. Mysql 索引与Key
  20. jquery.validate.js自定义表单验证

热门文章

  1. jquery 的combobox 处理级联
  2. JavaScript ES6部分语法
  3. Navigator与UserAgent笔记
  4. TCP,UDP,IP包头格式及说明(zz)
  5. ubuntu 16.04 qtcreator 闪退
  6. AC日记——[NOIP2015]运输计划 cogs 2109
  7. (转)zeromq 安装
  8. 让你的apache支持ipv6
  9. Spring Cloud 常用依赖
  10. ubuntu 16.04.1 LTS zabbix-agent安装