更换清华,阿里国内yum源

常用yum仓库及其源文件获取途径
转载weixin_34212189 最后发布于2018-08-30 11:19:55 阅读数 144 收藏
展开
1、阿里云yum源的替换

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
CentOS 6:

wget -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
3)、之后运行yum makecache fast 生成缓存

yum makecache fast
2、网易163yum源替换

CentOS 5

wget -O /etc/yum.repos.d/CentOS5-Base-163.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo
CentOS 6

wget -O /etc/yum.repos.d/CentOS6-Base-163.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
CentOS 7

wget -O /etc/yum.repos.d/CentOS7-Base-163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
3、Centos yum源文件的获取

不同的yum的获取途径是不同的;

1)清华镜像

https://mirror.tuna.tsinghua.edu.cn/help/centos/
2)阿里云的镜像文件位置

http://mirrors.aliyun.com/repo/
3)网易163yum文件获取;

http://mirrors.163.com/.help/

发布了2 篇原创文章 · 获赞 1 · 访问量 68

猜你喜欢

转载自blog.csdn.net/weixin_45515085/article/details/104051768