1 备份现有的yum源
cd /etc/yum.repos.d/
mkdir bak
mv *.repo /etc/yum.repos.d/bak
2 创建阿里云yum源
方式2:
wget -O /etc/yum.repos.d/aliyun.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3 清理并重新加载yum源
yum clean all && yum makecache
yum install vim
yum install tree
原文链接:Centos 7 配置阿里云yum源_centos7阿里云yum源配置-CSDN博客