上一篇 下一篇 分享链接 返回 返回顶部

CentOS-9 stream更新华为云 yum源

发布人:弘速科技 发布时间:2024-07-05 21:15 阅读量:4159

1、备份配置文件:

 

cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

配置下列方案。

方案:

下载新的CentOS-Base.repo文件到/etc/yum.repos.d/目录下,选择 CentOS 版本

CentOS-8 stream的为

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.huaweicloud.com/repository/conf/CentOS-8-anon.repo

wget 用不了可使用 curl -o 代替wget -O

3、执行yum clean all清除原有 yum 缓存

4、执行yum makecache(刷新缓存)或者yum repolist all

 

如以上命令用完之后还是无法更新yum源就可以用以下命令

rm -rf /etc/yum.repos.d/*

运行完之后在重复以上操作

 

目录结构
全文
 

 

官方QQ群  980082857


用户服務條款

https://www.hosuyun.cn/newscontent/171.html

网站测试IP 

  https://www.hosuyun.cn/newscontent/223.html

Linux系统换yum源教程地址

https://www.baota.me/post-450.html

Centos系统开放防火墙端口

  https://www.hosuyun.cn/helpcontent/211.html

debian/utubun开放防火墙端口

  https://www.hosuyun.cn/helpcontent/212.html

 


查看详情 关闭
网站通知