AlmaLinux更换国内源

Centos 8已经过去大半年了(2021年12月31日停止维护)Centos7.9预计2024年6月30日停止维护,已知分支有
修订:2022-12-09

AlmaLinux

Rocky Linux

各有千秋,相关介绍请自行百度 以后小编将会以AlmaLinux为主写一些日常遇到的各种坑

上海交大 https://mirror.sjtu.edu.cn/almalinux/
替换默认源

sed -e 's|^mirrorlist=|#mirrorlist=|g' \
      -e 's|^# baseurl=https://repo.almalinux.org|baseurl=https://mirror.sjtu.edu.cn|g' \
      -i.bak \
      /etc/yum.repos.d/almalinux*.repo

生成缓存

dnf makecache

阿里源 : https://mirrors.aliyun.com/almalinux
替换默认源

sed -e 's|^mirrorlist=|#mirrorlist=|g' \
      -e 's|^# baseurl=https://repo.almalinux.org|baseurl=https://mirrors.aliyun.com|g' \
      -i.bak \
      /etc/yum.repos.d/almalinux*.repo

生成缓存

dnf makecache

腾讯源 : http://mirrors.cloud.tencent.com/almalinux/
替换默认源

sed -e 's|^mirrorlist=|#mirrorlist=|g' \
      -e 's|^# baseurl=https://repo.almalinux.org|baseurl=https://mirrors.cloud.tencent.com|g' \
      -i.bak \
      /etc/yum.repos.d/almalinux*.repo

生成缓存

dnf makecache

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注