大佬教程收集整理的这篇文章主要介绍了CentOS 6 yum源 更换成阿里云扩展源,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
第一种:
1、rm -rf /etc/yum.repos.d/* (执行此操作的时候记得事先装好wget 不然 你就得挂载光盘用rpm装wget了。)
2、wget -P /etc/yum.repos.d/http://mirrors.aliyun.com/repo/epel-6.repohttp://mirrors.aliyun.com/repo/Centos-6.repo
这个时候,执行 yum repolist的结果如下
[root@di02 ~]# yum repolist
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
3.换源成功
第二种:
@H_443_45@mv/etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.BACkup2:下载新的CentOS-Base.repo 到/etc/yum.repos.d/
wget-O/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-6.repo
3:执行以下命令生成缓存
yumclean all
yum makecache
4:执行命令yumrepolist,结果如下换源成功
以上是大佬教程为你收集整理的CentOS 6 yum源 更换成阿里云扩展源全部内容,希望文章能够帮你解决CentOS 6 yum源 更换成阿里云扩展源所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。