Skip to content

Commit

Permalink
rocky: Use content tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Apr 26, 2024
1 parent 58cb1f3 commit 50a43e6
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions docs/rocky.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,33 @@ x86_64, aarch64

操作前请做好相应备份。

对于 Rocky Linux 8,使用以下命令替换默认的配置

```shell
sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.ustc.edu.cn/rocky|g' \
-i.bak \
/etc/yum.repos.d/Rocky-AppStream.repo \
/etc/yum.repos.d/Rocky-BaseOS.repo \
/etc/yum.repos.d/Rocky-Extras.repo \
/etc/yum.repos.d/Rocky-PowerTools.repo
```

对于 Rocky Linux 9,使用以下命令替换默认的配置

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

以上命令只替换了默认启用的仓库。替换之后请运行 `dnf makecache`
更新缓存。
=== "Rocky Linux 8"

使用以下命令替换默认的配置:

```shell
sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.ustc.edu.cn/rocky|g' \
-i.bak \
/etc/yum.repos.d/Rocky-AppStream.repo \
/etc/yum.repos.d/Rocky-BaseOS.repo \
/etc/yum.repos.d/Rocky-Extras.repo \
/etc/yum.repos.d/Rocky-PowerTools.repo
```

=== "Rocky Linux 9"

使用以下命令替换默认的配置:

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

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

## 相关链接

Expand Down

0 comments on commit 50a43e6

Please sign in to comment.