Fedora之配置yum源

Fedora之配置yum源

Fedora Workstation Version: 31

😄 Written by Zak Zhu

参考

我配置的yum源

yum源需求

  1. Fedora
  2. 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
    
posted @ 2020-03-23 18:43  ZakZhu  阅读(2195)  评论(0编辑  收藏  举报