Setting Up the CentOS 7 Vault Repository

Sometimes, there’s a clear reason to install an older operating system. For me, it’s to run old applications or websites that only work with older software. Recently, I installed CentOS 7 minimal as a virtual machine. To install or update software on it using the yum command, I need to configure its software repository.

The challenge is that CentOS 7 has reached its end of life. However, its software repository is still available online, known as the ‘vault.’ To update or install any software on CentOS 7, you must set up this vault repository. Otherwise, these operations won’t work.

centos7-eol-reminder

This image taken from linuxiac website,
url here: https://linuxiac.com/centos-7-has-30-days-left-until-support-ends/

After you’ve successfully installed CentOS 7 minimal, the next step is to replace the contents of the default yum repository configuration file with the vault repository information. You’ll need to do this as the root user, like so:

# cat /dev/null > /etc/yum.repos.d/CentOS-Base.repo
# echo "# C7.9.2009 Repository

[C7.9.2009-base]
name=CentOS-7.9.2009 - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

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

[C7.9.2009-extras]
name=CentOS-7.9.2009 - Extras
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[C7.9.2009-centosplus]
name=CentOS-7.9.2009 - CentOSPlus
baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[C7.9.2009-fasttrack]
name=CentOS-7.9.2009 - Fasttrack
baseurl=http://vault.centos.org/7.9.2009/fasttrack/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
" > /etc/yum.repos.d/CentOS-Base.repo

next you clean yum cache and make new cache of this new base repository of vault.

# yum clean all
# yum makecache
# yum update

it shoud show updates for your new installed CentOS 7 and remember this is old OS and long has been end of lifed.

This entry was posted in linux, my life. Bookmark the permalink.

Leave a Reply

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