Last active
January 12, 2025 07:38
-
-
Save StudioEtrange/fb9904064b872fabc3c6477da9e5fd9f to your computer and use it in GitHub Desktop.
Configuration to set old repositories for old Centos and Ubuntu distribution
-
Progressivly all old centos packages are not accessible anymore from regular repositories for old Centos version (6, 7, 8..) . They are all stored in https://vault.centos.org/. i.e Centos 7 old packages have been moved on first July 2024.
-
To update centos yum configuration, use
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
- when an ubuntu distribution reach end of lines, we need to update repositories url
sed -i.bak 's/fr\.archive\.ubuntu\.com/old-releases\.ubuntu\.com/g' /etc/apt/sources.list
apt update
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment