From 1c2cb6f01c85477836b6153a968975e2d26f2fd7 Mon Sep 17 00:00:00 2001 From: wenyongda Date: Fri, 3 Jul 2026 16:05:32 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0Linux=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E5=AE=89=E8=A3=85=E6=96=87=E6=A1=A3=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9EAlmaLinux=E6=BA=90=E9=85=8D=E7=BD=AE=E5=8F=8Adnf?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_posts/Linux软件安装.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/source/_posts/Linux软件安装.md b/source/_posts/Linux软件安装.md index d2cba28..4218607 100644 --- a/source/_posts/Linux软件安装.md +++ b/source/_posts/Linux软件安装.md @@ -53,6 +53,8 @@ yum makecache #### 更换阿里源 +##### Rocky Linux + ```shell sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' \ @@ -61,13 +63,30 @@ sed -e 's|^mirrorlist=|#mirrorlist=|g' \ # 注意 8 系列 Rocky R 大些,9 系列 r 小写 (sysin) # 阿里云文档有误无法匹配:https://developer.aliyun.com/mirror/rockylinux -# 恢复 (sysin) +# 恢复 sed -e 's|^#mirrorlist=|mirrorlist=|g' \ -e 's|^baseurl=https://mirrors.aliyun.com/rockylinux|#baseurl=http://dl.rockylinux.org/$contentdir|g' \ -i.bak \ /etc/yum.repos.d/[Rr]ocky*.repo -yum makecache +dnf makecache +``` + +##### AlmaLinux + +```shell +sed -e 's|^mirrorlist=|#mirrorlist=|g' \ + -e 's|^#baseurl=https://repo.almalinux.org|baseurl=https://mirrors.aliyun.com/almalinux|g' \ + -i.bak \ + /etc/yum.repos.d/almalinux*.repo + +# 恢复 +sed -e 's|^#mirrorlist=|mirrorlist=|g' \ + -e 's|^baseurl=https://mirrors.aliyun.com/almalinux|#baseurl=https://repo.almalinux.org|g' \ + -i.bak \ + /etc/yum.repos.d/almalinux*.repo + +dnf makecache ``` ---