Use this command line script to pin Rocky repository urls to 8.4
Code Block |
sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=https://dl.rockylinux.org/vault/$releasever|baseurl=https://dl.rockylinux.org/vault/rocky/8.4|g' \
-i.bak \
/etc/yum.repos.d/Rocky-AppStream.repo \
/etc/yum.repos.d/Rocky-BaseOS.repo \
/etc/yum.repos.d/Rocky-Devel.repo \
/etc/yum.repos.d/Rocky-Extras.repo \
Info |
---|
Must be done before running an updated. |
In the /etc/yum/vars directory, add file named releasever
containing the requested version.
i.e.
Code Block |
---|
echo 7.8.2023 > /etc/yum/vars/releasever |
Expand |
---|
title | manually update repo config files |
---|
|
preinstall epel repo config Code Block |
---|
dnf install epel-release |
Add repository config variables Code Block |
---|
echo [VERSION] > /etc/yum/vars/releasever
echo [CONTENTDIR] > /etc/yum/vars/contentdir
# i.e.
# echo 9.1 > /etc/yum/vars/releasever
# echo vault/rocky > /etc/yum/vars/contentdir |
Script to pin Rocky repository urls to specific release version Code Block |
---|
sudo -i
sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=|baseurl=|g' \
-i.bak \
/etc/yum.repos.d/ |
|
|
...
...
...
...
...
...
...
...
References
Output variables
Code Block |
---|
dnf config-manager --dump-variables |