diff --git a/contents/rpmfusion.mdx b/contents/rpmfusion.mdx
index 398eb1bd..ca285f31 100644
--- a/contents/rpmfusion.mdx
+++ b/contents/rpmfusion.mdx
@@ -32,10 +32,10 @@ cname: 'rpmfusion'
{
title: '发行版',
items: [
- ['CentOS/RHEL 7', { version: '7' }],
- ['CentOS/RHEL 6', { version: '6' }],
['CentOS/RHEL 8', { version: '8' }],
['CentOS/RHEL 9', { version: '9' }],
+ ['CentOS/RHEL 7', { version: '7' }],
+ ['CentOS/RHEL 6', { version: '6' }],
]
},
]}
@@ -47,54 +47,61 @@ cname: 'rpmfusion'
-注意:没有将当前用户设为管理员的用户,需要将 `sudo CMD` 替换为 `su -c 'CMD'`,并输入 root 密码。
-
### 修改链接指向镜像站
-安装成功后,修改 `/etc/yum.repos.d/` 目录下以 `rpmfusion` 开头,以 `.repo` 结尾的文件。具体而言,需要将文件中的 `baseurl=` 开头的行等号后面链接中的 `http://download1.rpmfusion.org/` 替换为
+安装成功后,使用以下命令修改 `/etc/yum.repos.d/` 目录下以 `rpmfusion` 开头,以 `.repo` 结尾的文件:
-
-```
-{{http_protocol}}{{mirror}}/
+```shell
+{{sudo}}sed -e 's!^metalink=!#metalink=!g' \
+ -e 's!^mirrorlist=!#mirrorlist=!g' \
+ -e 's!^#baseurl=!baseurl=!g' \
+ -e 's!https\?://download1\.rpmfusion\.org/!{{http_protocol}}{{mirror}}/!g' \
+ -i.bak /etc/yum.repos.d/rpmfusion*.repo
```
-
-替换后的文件类似如下:
+以 Fedora 下的 `/etc/yum.repos.d/rpmfusion-free.repo` 为例,替换后的文件类似如下:
```ini
[rpmfusion-free]
name=RPM Fusion for Fedora $releasever - Free
-baseurl={{http_protocol}}{{mirror}}/free/fedora/releases/$releasever/Everything/$basearch/os/
-mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch
+baseurl=https://mirrors.ustc.edu.cn/rpmfusion/free/fedora/releases/$releasever/Everything/$basearch/os/
+#metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-$releasever&arch=$basearch
enabled=1
-metadata_expire=7d
+metadata_expire=14d
+type=rpm-md
gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$basearch
+repo_gpgcheck=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
[rpmfusion-free-debuginfo]
name=RPM Fusion for Fedora $releasever - Free - Debug
-mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-debug-$releasever&arch=$basearch
+baseurl=https://mirrors.ustc.edu.cn/rpmfusion/free/fedora/releases/$releasever/Everything/$basearch/debug/
+#metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-debug-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
+type=rpm-md
gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$basearch
+repo_gpgcheck=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
[rpmfusion-free-source]
name=RPM Fusion for Fedora $releasever - Free - Source
-baseurl={{http_protocol}}{{mirror}}/free/fedora/releases/$releasever/Everything/source/SRPMS/
-mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-source-$releasever&arch=$basearch
+baseurl=https://mirrors.ustc.edu.cn/rpmfusion/free/fedora/releases/$releasever/Everything/source/SRPMS/
+#metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
+type=rpm-md
gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$basearch
+repo_gpgcheck=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
```
### 更多
-RHEL/CentOS 用户请参考 [RPMFusion 官方指南](http://rpmfusion.org/Configuration)。
+RHEL/CentOS 用户可参考 [RPMFusion 官方指南](http://rpmfusion.org/Configuration)。