CentOS force dnf to use mirrors of a specific location
0
votes
2
answers
3914
views
Using CentOS 8.
I would like to force
dnf
to only use mirrors in the vicinity of a certain location without having to manually maintain a list of desirable mirrors. So I looked to modify the repo config files in /etc/yum.repo.d/
.
Take /etc/yum.repo.d/CentOS-Linux-BaseOS.repo
for example, this is its default state:
[baseos]
name=CentOS Linux $releasever - BaseOS
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
I would like to know if there is a parameter when querying mirrorlist.centos.org
I can specify to filter by location, something like this:
mirrorlist=http://mirrorlist.centos.org/?country=us&other-params-ommitted
(country=
I tried, didn't do anything)
I haven't been able to find any relevant documentation on the site's API.
Asked by cyqsimon
(905 rep)
Sep 15, 2021, 08:55 AM
Last activity: Oct 30, 2024, 12:47 AM
Last activity: Oct 30, 2024, 12:47 AM