Skip to content

Instantly share code, notes, and snippets.

@nicholastay
Created April 19, 2022 03:31
Show Gist options
  • Save nicholastay/6f532b98782477f812c67323d1670fc1 to your computer and use it in GitHub Desktop.
Save nicholastay/6f532b98782477f812c67323d1670fc1 to your computer and use it in GitHub Desktop.
yum-based system (rocky) set mirrors to fixed ones - useful for firewalled env
sed -i 's/^mirrorlist=/#mirrorlist=/g;s/^#baseurl.*\/\(.*\)\/$basearch.*/baseurl=https:\/\/mirror.aarnet.edu.au\/$contentdir\/$releasever\/\1\/$basearch\/os\/\nbaseurl=https:\/\/rockylinux.mirror.digitalpacific.com.au\/$releasever\/\1\/$basearch\/os\//g' /etc/yum.repos.d/Rocky-*.repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment