rockylinux8.4更新源更改为国内源

国内更新如下:

 

机构链接支持类型带宽备注
南京大学 mirrors.nju.edu.cn http https rsync 10000  
上海交通大学 mirrors.sjtug.sjtu.edu.cn https rsync 1000  
山东大学 mirrors.sdu.edu.cn http https 1000  
重庆大学 mirrors.cqu.edu.cn http https 1000

这里以重庆大学更新源为例:

sed -e 's|^mirrorlist=|#mirrorlist=|g' \
    -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.cqu.edu.cn/rockylinux/|g' \
    -i.bak \
    /etc/yum.repos.d/Rocky-*.repo


生成源数据
[root@localhost ~]# dnf makecache

  

posted @ 2024-03-05 17:55  周智林  阅读(567)  评论(0)    收藏  举报