dnf update 等を行うと、ダウンロード速度が遅い時がある。
IPアドレスを確認すると、海外のレポジトリサーバーへ接続している場合がある。
ロケーションは日本なので、日本のレポジトリサーバーへ接続して、ダウンロード速度を早くしたい
【RockyLinux】
/etc/yum.repos.d/xxxxx.repo の
mirrorlist=URL の末尾に、&country=JP を追記する
/etc/yum.repos.d/Rocky-BaseOS.repo の場合、
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever
を
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever&country=JP
と追記する
【Fedora】
/etc/yum.repos.d/xxxxx.repo の
mirrorlist=URL の末尾に、&country=JP を追記する
/etc/yum.repos.d/fedora.repo の場合、
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
を
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch&country=JP
と追記する
著者は、Rocky8 と fedora36 にて確認した。
おそらくCentOSも同じように設定可能だと思われる。
他のRH系ディストリビューションは触った事が無いので未確認。
yum時代は、fastestmirror.conf に「include_only=.jp」を指定していたが、
dnfになってから設定方法が不明だった。