目前,我们用CentOS还是比较多的,毕竟国内的CentOS相关的软件兼容和教程多。这里,我们拿到一台服务器后,还是需要更换成国内的镜像源,在这里我们记录CentOS7和CentOS8更换成阿里云源。
CentOS8
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
CentOS6
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
CentOS7
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
更新后,我们重新更新系统yum update -y 即可。
本文出处:老蒋部落 » CentOS8和CentOS7更换阿里云镜像源的方法记录 | 欢迎分享( 公众号:老蒋朋友圈 )