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 更新缓存。

此处评论已关闭