Configure your CentOS 7 virtual machine to use vault repositories

Now that CentOS 7 has reached EOL on June 30, 2024, users are strongly encouraged to migrate their virtual machines to either AlmaLinux 8, Rocky Linux 8 or Oracle Linux

One of the first consequence of the EOL is that all CentOS 7 package repositories have been moved from their default location and archived on https://vault.centos.org, and therefore if users still want to be able to install or reinstall RPM packages, they would need to perform the steps below in order to access the new vault repos:

  1. Disable the current repositories to avoid conflicts with the vault repositories. Open a terminal and execute the following commands:
$ sudo yum-config-manager --disable \*
  1. Add the following content at the end of the /etc/yum.repos.d/CentOS-Vault.repo file:
$ sudo cat /etc/yum.repos.d/CentOS-Vault.repo
[...]
[base-vault]
name=CentOS-$releasever - Base - Vault
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[updates-vault]
name=CentOS-$releasever - Updates - Vault
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[extras-vault]
name=CentOS-$releasever - Extras - Vault
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
  1. Update the system to ensure everything is working correctly with the new repositories.
$ sudo yum clean all
$ sudo rm -rf /var/cache/yum/
$ sudo yum makecache

NOTE: All latest ProComputers packaged CentOS 7 images have already the vault repos configured.

For any questions related to this article, please contact ProComputers Support.

Why choose ProComputers?

With over 10 years of experience working with Microsoft Azure, ProComputers provides open-source software bundled together into solutions ready to be launched on-demand in the cloud.

ProComputers is a proud sponsor of the AlmaLinux OS Foundation and the Rocky Enterprise Software Foundation.

Red Hat and CentOS are trademarks or registered trademarks of Red Hat, Inc. or its subsidiaries in the United States and other countries. We are not affiliated with, endorsed by or sponsored by Red Hat or the CentOS Project.

All other trademarks are the property of their respective owners.