Search

CentOS 6 Repo update URL starting 2024

  • Share this:

Following the month of December 2020, CentOS 6 will not get any updates. In addition, all sources have been disconnected from mirror servers in order to accurately represent the end of life (EOL) state of the system. Creating a fresh CentOS.repo configuration with updated urls is required in the event that you wish to install a few packages or update your system to the most recent version (CentOS 6.10).

 

Removing old repositories

Completely list all of the repositories that are now setup, and then remove the CentOS and epel settings afterward:

 

[root@server ~]# ls /etc/yum.repos.d/
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-fasttrack.repo  CentOS-Media.repo  CentOS-Vault.repo  epel.repo
[root@server ~]# rm /etc/yum.repos.d/CentOS*.repo
[root@server ~]# rm /etc/yum.repos.d/epel.repo

 

 Construct a CentOS repository setup that includes the most recent URLs.

On the website https://vault.centos.org/, older versions of CentOS are stored; we are going to construct a new repository configuration by using this server. As an additional measure, we have set metadata_expire to never since the sources will no longer be updated (they have reached their end of life).

 

[root@server ~]# cat /etc/yum.repos.d/CentOS.repo
[base]
name=CentOS-6.10 - Base
baseurl=http://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
#released updates
[updates]
name=CentOS-6.10 - Updates
baseurl=http://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
# additional packages that may be useful
[extras]
name=CentOS-6.10 - Extras
baseurl=http://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
# additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.10 - CentOSPlus
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
#contrib - packages by Centos Users
[contrib]
name=CentOS-6.10 - Contrib
baseurl=http://vault.centos.org/6.10/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

Add the settings for the EPEL repository.

 The next step is not required, and it is only required if EPEL has been used in the past:

[root@server ~]# cat /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
metadata_expire=never
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/$basearch/debug
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
metadata_expire=never
[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/SRPMS
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
metadata_expire=never

 

Finally, Check New Repo and update 

Remove all of the info that is currently available:  

yum clean all
yum check-update
yum repolist

 

To load a fresh list of all available packages and to check whether or not your local installation has all available updates, you should now type the command yum check-update. When you are finished, you may use yum install to install packages as you normally would.


 

 

 

Sys Admin

Sys Admin

I am a Red Hat Certified Engineer (RHCE) and working as an IT Professional since 2012...