CentOS8 修改yum源为阿里源

1.备份本地yum源

  [root@localhost Desktop]# cd /etc/yum.repos.d/

  [root@localhost yum.repos.d]# mv /etc/yum.repos.d/CentOS-Linux-BaseOS.repo /etc/yum.repos.d/CentOS-Linux-BaseOS.repo.backup

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

[root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Linux-BaseOS.repo http://mirrors.aliyun.com/repo/Centos-8.repo

3.更新yum缓存

[root@localhost yum.repos.d]# yum makecache

4.查看当前yum源

[root@localhost yum.repos.d]# yum repolist

原文地址:https://www.cnblogs.com/jerryspace/p/15634248.html