CentOS 7 切换yum源为阿里云

203 阅读1分钟

1.切换yum源为阿里云

# 备份yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

# 切换yum源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

# 生成缓存
yum makecache  

2.下载必要工具

# 安装vim编辑器
yum -y install vim

# 安装wget工具
yum -y install wget