How to Switch CentOS 7 Repository to Vault After EOL

Posted by

I’m managing several CentOS 7 servers that need additional packages. As the original repository is unavailable, I replaced it with the CentOS Vault repository.

Run the following command to replace it

sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo

Good Luck šŸ™‚

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.