I'm using fedora 23 and I want to change the default settings in dnf in order to use a specific server mirror from here.
- 53
- 1
- 1
- 7
2 Answers
There are multiple options, you can hard code it (/etc/yum.repos.d/fedora.repo) or using fastmirror.
In order to use fastmirror you must first activate it:
in /etc/dnf/dnf.conf add fastestmirror=true
then using this command dnf config-manager --add-repo add the mirror you want to use, you can add multiple mirrors and the fastest one will be used.
Example:
sudo dnf config-manager --add-repo http://ftp.byfly.by/pub/fedoraproject.org/linux/releases/23/Everything/x86_64/os/
You must use the path /linux/releases/23/Everything/x86_64/os/ for fedora 23 releases and for fedora 23 updates /linux/updates/23/x86_64/ otherwise will not work.
- 84
- 8
-
fastestmirror is unfortunately named; it has nothing to do with throughput and only ping time, and will generally cause trouble. https://twitter.com/KWF/status/1585319975438340097 https://twitter.com/carlwgeorge/status/1585442730162913282 – mkj Nov 10 '22 at 00:42
To change Fedora Mirror and some setting to reach highest speed do this
Edit the dnf configuration file
sudo nano /etc/dnf/dnf.conf
Add the following lines:
deltarpm=false
keepcache=true
ip_resolve=4
It depends on your own that you like DeltaRPM or not (true or false). Google it to find what exactly it does.
In the /etc/yum.repos.d/ directory there are files that need a small edit.
The main file is fedora-updates.repo
Add country=us (use your own country code) to the end of all of the "metalink" lines for the fedora repo files in /etc/yum.repos.d/
It's better to use de, nl or any european country that have the strong, fast servers. Bandwith capacity matters and not ping.
- 1
- 9
- 37
- 1
-
sorry for bumping an old topic but as it come up in google searches, I think its better to complete this with what I have done and got result – user8543335 Sep 02 '19 at 09:03