Files
jcutmirror/docs/zh/rocky.mdx
2024-02-16 22:43:23 +08:00

51 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
mirrorId: rocky
---
## Rocky Linux 源使用帮助
### 地址
[https://mirrors.jcut.edu.cn/rocky/](https://mirrors.jcut.edu.cn/rocky/)
### 说明
Rocky Linux 软件源
### 收录架构
x86_64, aarch64
### 收录版本
8, 9
---
### 使用说明
对于 Rocky Linux 8使用以下命令替换默认的配置
```shell
sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.jcut.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.jcut.edu.cn/rocky|g' \
-i.bak \
/etc/yum.repos.d/rocky-extras.repo \
/etc/yum.repos.d/rocky.repo
```
以上命令只替换了默认启用的仓库。替换之后请运行 `dnf makecache` 更新缓存。
> 本项文档参照 http://mirrors.ustc.edu.cn/help/rocky.html 编写。