最近朋友接了个活,需要部署的服务器是Contos7的,然后需要安装Docker,无法通过yum命令安装,Contos7的yum源已经不能使用了,那怎么办呢,我们可以切换为阿里云的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/
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
或
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
3.运行 yum makecache 生成缓存
更多详情也可以查看官网
centos镜像_centos下载地址_centos安装教程-阿里巴巴开源镜像站
觉得有帮助的小伙伴,点个赞吧