Get 50% Discount Offer 26 Days

Recommended Services
Supported Scripts
WordPress
Hubspot
Joomla
Drupal
Wix
Shopify
Magento
Typeo3
Update CentOS 7.9 Repositories After End-of-Life

CentOS 7 reached its End-of-Life (EOL) on June 30, 2024. After this date, CentOS no longer provides official updates, patches, or support for this version. However, you can still update your repositories and maintain security by using alternative Repositories: 

Updating CentOS 7.9 Repositories After End-of-Life

To ensure your CentOS 7.9 system continues to receive updates after reaching its end-of-life (EOL), you need to update the repository URLs to point to the CentOS Vault archives. 

Step 1: Backup the Current Repository File

Before making any changes, create a backup of the current repository file to allow for easy reversion if necessary:

cp -v /etc/yum.repos.d/CentOS-Base.repo{,-backup}

Note: Your CentOS 7 base repository may have a different name. The filename ‘CentOS-Base.repo’ is used here as an example.

Step 2: Edit the Repository File

Use a command line text editor like nano to open the repository file. To open the file with nano, run: 

sudo nano /etc/yum.repos.d/CentOS-Base.repo

Replace its contents with the following configuration:

[base] 
name=CentOS-$releasever - Base 
baseurl=https://vault.centos.org/7.9.2009/os/$basearch/ 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 
[updates] 
name=CentOS-$releasever - Updates 
baseurl=https://vault.centos.org/7.9.2009/updates/$basearch/ 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 
[extras] 
name=CentOS-$releasever - Extras 
baseurl=https://vault.centos.org/7.9.2009/extras/$basearch/ 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 
[centosplus] 
name=CentOS-$releasever - Plus 
baseurl=https://vault.centos.org/7.9.2009/centosplus/$basearch/ 
gpgcheck=1 
enabled=0 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

After updating the content, save the file and exit the editor. In nano, you can do this by pressing Ctrl + O to write the changes, then Enter to confirm, and Ctrl + X to exit.

Step 3: Clean YUM Cache and Rebuild and Update

Finally, clean the YUM cache and rebuild it to ensure the changes take effect: 

yum clean all && yum makecache && yum update

This guide ensures that your CentOS 7.9 system will continue to receive updates from the CentOS Vault, even after the official support period has ended. 


2 Comments

Leave a Reply

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

Lifetime Solutions:

VPS SSD

Lifetime Hosting

Lifetime Dedicated Servers