Fedora之配置yum源
Fedora之配置yum源
Fedora Workstation Version: 31
😄 Written by Zak Zhu
参考
- 阿里云官方镜像站 (https://developer.aliyun.com/mirror/)
- Virson Ma | RHEL/CentOS/Fedora各种源(EPEL、Remi、RPMForge、RPMFusion)配置 (https://www.cnblogs.com/mawanglin2008/p/3532247.html)
我配置的yum源
yum源需求
- Fedora
- Rpmfusion
yum源配置
0. 备份
-
cd /etc/yum.repos.d/ mkdir fedora-repos-defaults
-
mv fedora*{[^defaults],defaults}
1. 添加Fedora源
-
wget -O /etc/yum.repos.d/fedora.repo http://mirrors.aliyun.com/repo/fedora.repo
-
wget -O /etc/yum.repos.d/fedora-updates.repo http://mirrors.aliyun.com/repo/fedora-updates.repo
-
# 阿里已修改fedora-updates.repo配置, 下面命令不需要执行 !! # sed -i "s@releasever/@releasever/Everything/@g" fedora-updates.repo
2. 添加Rpmfusion源
-
yum install --nogpgcheck https://mirrors.aliyun.com/rpmfusion/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm rm rpmfusion-free-updates-testing.repo -rf
-
sed -i "s/^metalink/#metalink/" rpmfusion-free*
-
sed -i "s@#baseurl=http://download1.rpmfusion.org@baseurl=https://mirrors.aliyun.com/rpmfusion@g" rpmfusion-free*
3. 更新
-
rm /var/cache/yum -rf
-
yum makecache