cente os7切换阿里数据源

1)可以执行
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

但是在我的虚拟机环境下的Linux执行第一个会报错
在这里插入图片描述
这里报错是因为系统中没有wget依赖包
2)运行yum makecache生成缓存
在这里插入图片描述
切换镜像源之后执行

 yum -y install wget

如下图,wget也能使用,镜像源也能使用了
在这里插入图片描述

发布了24 篇原创文章 · 获赞 6 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/li_yan_sring/article/details/84438737