End Dates for CentOS Stream 8 and CentOS Linux 7
When software reaches its End of Life (EOL), the developer no longer supports it and no more updates are provided. This can cause issues with the repository.
To continue using CentOS 7, we have a few solutions. However, we also recommend upgrading the server's OS to a supported version that hasn't reached EOL.
Solution:
1. Connect to your VPS via SSH and run this command:
sudo vi /etc/yum.repos.d/CentOS-Base.repo
2. You will see these lines:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://centos.mirror.serveriai.lt/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
3. Change them to:
[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Or:
[base]
name=CentOS-$releasever - Base
baseurl=https://centos.mirror.serveriai.lt/7.9.2009/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
4. Save the updated file.
5. Verify the changes by running:
sudo yum list