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