一起遨游网

一起遨游网为个人站长与玩家提供全面的源码技巧、海量建站素材、电脑技术、网络技巧一体的网站!

Centos stream 源使用帮助(替换国内源)

替换到 中国科学技术大学开源软件镜像 命令

http://mirrors.ustc.edu.cn/help/centos.html

sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
         -e 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=https://mirrors.ustc.edu.cn/centos|g' \
         -i.bak \
         /etc/yum.repos.d/CentOS-Stream-AppStream.repo \
         /etc/yum.repos.d/CentOS-Stream-BaseOS.repo \
         /etc/yum.repos.d/CentOS-Stream-Debuginfo.repo \
         /etc/yum.repos.d/CentOS-Stream-Extras.repo \
         /etc/yum.repos.d/CentOS-Stream-HighAvailability.repo \
         /etc/yum.repos.d/CentOS-Stream-Media.repo \
         /etc/yum.repos.d/CentOS-Stream-PowerTools.repo \
         /etc/yum.repos.d/CentOS-Stream-RealTime.repo

以上命令只替换了默认启用的仓库。替换之后请运行 yum makecache 更新缓存。

本原创文章未经允许不得转载 | 当前页面:一起遨游网 » Centos stream 源使用帮助(替换国内源)

评论

文章评论已关闭!