fedora
仓库配置文件为 /etc/yum.repos.d/fedora.repo
,系统默认的 updates
仓库配置文件为 /etc/yum.repos.d/fedora-updates.repo
。Fedora 22 或以后的版本,执行以下命令:
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
将以下保存为 fedora-ustc.repo
:
[fedora] name=Fedora $releasever - $basearch - ustc failovermethod=priority baseurl=https://mirrors.ustc.edu.cn/fedora/releases/$releasever/Everything/$basearch/os/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch enabled=1 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-debuginfo] name=Fedora $releasever - $basearch - Debug - ustc failovermethod=priority baseurl=https://mirrors.ustc.edu.cn/fedora/releases/$releasever/Everything/$basearch/debug/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch enabled=0 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-source] name=Fedora $releasever - Source - ustc failovermethod=priority baseurl=https://mirrors.ustc.edu.cn/fedora/releases/$releasever/Everything/source/SRPMS/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch enabled=0 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
将以下保存为 fedora-updates-ustc.repo
:
[updates] name=Fedora $releasever - $basearch - Updates - ustc failovermethod=priority baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/$basearch/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [updates-debuginfo] name=Fedora $releasever - $basearch - Updates - Debug -ustc failovermethod=priority baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/$basearch/debug/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&arch=$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [updates-source] name=Fedora $releasever - Updates Source - ustc failovermethod=priority baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/SRPMS/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
先备份 /etc/yum.repos.d/fedora.repo
和 /etc/yum.repos.d/fedora-updates.repo
将 fedora-ustc.repo
和 fedora-updates-ustc.repo
放入 /etc/yum.repos.d/
中.
运行:
sudo dnf makecache
## 第3个:TUNA(清华大学软件源)http://mirrors.tuna.tsinghua.edu.cn/help/fedora/
Fedora 的软件源配置文件可以有多个,其中:系统默认的 fedora
仓库配置文件为 /etc/yum.repos.d/fedora.repo
,系统默认的
updates
仓库配置文件为 /etc/yum.repos.d/fedora-updates.repo
。将上述两个文件先做个备份,分别替换为下面内容,即可使用TUNA 的软件源镜像。
fedora
仓库
(/etc/yum.repos.d/fedora.repo)
[fedora] name=Fedora $releasever - $basearch failovermethod=priority baseurl=https://mirrors.tuna.tsinghua.edu.cn/fedora/releases/$releasever/Everything/$basearch/os/ enabled=1 metadata_expire=28d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailable=False
updates
仓库
(/etc/yum.repos.d/fedora-updates.repo)
[updates] name=Fedora $releasever - $basearch - Updates failovermethod=priority baseurl=https://mirrors.tuna.tsinghua.edu.cn/fedora/updates/$releasever/$basearch/ enabled=1 gpgcheck=1 metadata_expire=6h gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailable=False
更新本地缓存
sudo dnf makecache
## 第4个:FZUG源
# dnf config-manager --add-repo=http://repo.fdzh.org/FZUG/FZUG.repo
或
# dnf install http://repo.fdzh.org/FZUG/free/23/x86_64/fzug-release-23-0.1.noarch.rpm
或
# wget http://repo.fdzh.org/FZUG/FZUG.repo -P /etc/yum.repos.d/
# dnf install [PackageName]
$ dnf list --disablerepo=* --enablerepo=fzug-free --enablerepo=fzug-nonfree | grep -i fzug
安装好以上几个源之后,基本够日常使用。
列出所有可用软件:
```
sudo dnf list
```
本文出自 “wzbao” 博客,请务必保留此出处http://wzbao.blog.51cto.com/11237209/1917345
Fedora25安装完成后需要做的——第一步——配置最基础的几个软件源
原文地址:http://wzbao.blog.51cto.com/11237209/1917345