【Linux】CentOS7修改yum源为阿里源


  首先第一步需要切换到root权限下

1、备份本地yum源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak

2、获取阿里yum源配置文件

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、更新yum缓存

yum makecache

4、查看当前yum源

yum repolist

5、更新yum源成功

image-20210306112007412

猜你喜欢

转载自blog.csdn.net/Sunnyside_/article/details/114436575