---
category: help
layout: help
mirrorid: fedora
---

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
```
