华为云的yum源如何更换为阿里的源

1,进入yum的配置文件路径下

cd  /etc/yum.repos.d

2,备份配置文件

3,删除yum.repos.d下的文件

rm -rf CentOS-AppStream.repo

  rm -rf CentOS-Base.repo

  rm -rf CentOS-centosplus.repo

4,下载阿里的源配置文件

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

5,修改这个配置文件

全局替换

mirrors.cloud.aliyuncs.com 替换为 mirrors.aliyun.com
releasever 替换为 releasever-stream

做完这些工作,yum应该就可以正常使用了

 

posted @ 2022-03-02 16:16  陌风陌风  阅读(482)  评论(0)    收藏  举报