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

 

posted @ 2021-12-02 17:17  玉米炖排骨  阅读(1088)  评论(0编辑  收藏  举报