first option
In China, 163 and Sohu provide good sources, and now we add them to our source library.
1. Add the source of Sohu
Go to the website http://mirrors.sohu.com/, find the fedora directory on the left, click help on the right of the line, and then
Download fedora-sohu.repo and fedora-updates-sohu.repo, put them in /etc/yum.repos.d/
Run yum makecache to generate the cache
2. Add the source of 163
Go to the website http://mirrors.163.com/ , find the fedora directory on the left, click the help on the right of the line, and then
Download fedora-163.repo and fedora-updates-163.repo, put them in /etc/yum.repos.d/
Run yum makecache to generate the cache
Now you can run the command ls /etc/yum.repos.d to see if there are two more sources in this directory,
The second option
# vi /etc/yum.repos.d/fedora-cn.repo
=============================================================================
[fedora-mirrors.sohu.com]
name=Fedora $releasever - $basearch - sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/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-mirrors.sohu.com]
name=Fedora $releasever - $basearch - Debug - sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/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-mirrors.sohu.com]
name=Fedora $releasever - Source - sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/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-mirrors.163.com]
name=Fedora $releasever - $basearch - 163.com
failovermethod=priority
baseurl=http://mirrors.163.com/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-mirrors.163.com]
name=Fedora $releasever - $basearch - Debug - 163.com
failovermethod=priority
baseurl=http://mirrors.163.com/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-mirrors.163.com]
name=Fedora $releasever - Source - 163.com
failovermethod=priority
baseurl=http://mirrors.163.com/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
=============================================================================
# vi /etc/yum.repos.d/fedora-update-cn.repo
=============================================================================
[updates-mirrors.sohu.com]
name=Fedora $releasever - $basearch - Updates - sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/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