RPMFusion
1.1、RPMFusion简介

RPMFusion官网:https://rpmfusion.org

1.2、安装RPMFusion仓库
1.2.1、CentOS

方法一:通过yum安装:

sudo yum install -y --nogpgcheck https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/free/el/rpmfusion-free-release-$(rpm -E %centos).noarch.rpm
sudo yum install -y --nogpgcheck https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %centos).noarch.rpm

方法二:

1、使用curl下载RPMFusion仓库配置程序:

curl -LO https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/free/el/rpmfusion-free-release-$(rpm -E %centos).noarch.rpm
curl -LO https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %centos).noarch.rpm

2、通过rpm安装:

rpm -ivh rpmfusion-free-release-$(rpm -E %centos).noarch.rpm
rpm -ivh rpmfusion-nonfree-release-$(rpm -E %centos).noarch.rpm
1.2.2、Fedora

方法一:通过dnf安装:

sudo dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

方法二:

1、使用curl下载RPMFusion仓库配置程序:

curl -LO https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
curl -LO https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

2、通过rpm安装:

rpm -ivh rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
rpm -ivh rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
1.3、RPMFusion仓库的中国镜像
1.3.1、常用的RPMFusion的中国镜像
阿里开源镜像站https://mirrors.aliyun.com/rpmfusion
清华大学开源镜像站https://mirrors.tuna.tsinghua.edu.cn/rpmfusion
更多
1.3.2、替换方法

1、备份配置文件:

cp /etc/yum.repos.d/rpmforge.repo /etc/yum.repos.d/rpmforge.repo.bak

3、使用sed修改配置文件:

find /etc/yum.repos.d/ -name "rpmfusion-*.repo" | xargs sed -i "s/#baseurl/baseurl/g"
find /etc/yum.repos.d/ -name "rpmfusion-*.repo" | xargs sed -i "s/mirrorlist/#mirrorlist/g"
find /etc/yum.repos.d/ -name "rpmfusion-*.repo" | xargs sed -i "s@http://download1.rpmfusion.org@https://mirrors.tuna.tsinghua.edu.cn/rpmfusion@g"

4、使用yum更新缓存:

sudo yum makecache