Centos 5 EOL Updates

As you know CentOS 5 EOL is (End-Of-Life) from March 31 2017. Which leads to the following very interesting problem:

# yum update
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/
removing mirrorlist with no valid mirrors: /var/cache/yum/extras/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: extras

 

The problem is that short lists of CentOS mirrors 5 already kicking in and attempt to directly get content obtained after refusal:

# curl 'http://mirrorlist.centos.org/?release=5&arch=i386&repo=os'
Invalid release

 

In general overall the most prudent idea to reinstall the tin with a normal distribution that supports working distributive upgrade. Unfortunately mine is not the case and it does not stand as an option on the table. So we had to play a little gypsy scheme – begin to use Vault mirror. At the moment completely clear creature and sanity know, I will not receive any updates that is not the aim of the exercise, and just want to have working with yum to install package that I need. For this purpose commented out all mirrorlist variables and add baseurl in /etc/yum.repos.d/CentOS-Base.repo. Finally we get yum repo on the type of

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://vault.centos.org/5.11/os/i386/
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://vault.centos.org/5.11/updates/i386/
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://vault.centos.org/5.11/extras/i386/
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Finally play a yum clean all && yum update. If everything ended without an error then we successfully completed the scheme and we can safely install outdated packages.

 

leave a reply

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

anti SPAM *