tips_and_howtos:rhel_to_centos

How to migrate existing RedHat Enterprise Linux to a CentOS

This is a copy-paste instruction to complete RHEL → CentOS migration in one minute. Updated to include latest versions.

Often you have an expired subscription RedHat Enterprise Linux that is stuck to an earlier patch level. You could update from early RHEL patchlevel straight to the latest version of CentOS but I still recommend to do the initial conversion with identical version numbers just to reduce the variables of the process. I've seen a standard update go wrong with my cluster software so better not push our luck.

So we will do it in following order:

  • RHEL 7.n → CentOS 7.n
  • CentOS 7.n → CentOS 7.latest

That way I replace RHEL with a same patchlevel CentOS which I then upgrade to the latest version.

Also there is a page in the CentOS website about the subject so let's follow it with a few corrections.

mkdir upgrade; cd upgrade
wget 'http://vault.centos.org/7.0.1406/os/x86_64/Packages/centos-release-7-0.1406.el7.centos.2.3.x86_64.rpm'
wget 'http://vault.centos.org/7.0.1406/os/x86_64/Packages/centos-indexhtml-7-9.el7.centos.noarch.rpm'
wget 'http://vault.centos.org/7.0.1406/os/x86_64/Packages/yum-3.4.3-118.el7.centos.noarch.rpm'
wget 'http://vault.centos.org/7.0.1406/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-24.el7.noarch.rpm'
wget 'http://vault.centos.org/7.1.1503/os/x86_64/Packages/centos-release-7-1.1503.el7.centos.2.8.x86_64.rpm'
wget 'http://vault.centos.org/7.1.1503/os/x86_64/Packages/centos-indexhtml-7-9.el7.centos.noarch.rpm'
wget 'http://vault.centos.org/7.1.1503/os/x86_64/Packages/yum-3.4.3-125.el7.centos.noarch.rpm'
wget 'http://vault.centos.org/7.1.1503/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-29.el7.noarch.rpm'
wget 'http://vault.centos.org/7.2.1511/os/x86_64/Packages/centos-release-7-2.1511.el7.centos.2.10.x86_64.rpm'
wget 'http://vault.centos.org/7.2.1511/os/x86_64/Packages/centos-indexhtml-7-9.el7.centos.noarch.rpm'
wget 'http://vault.centos.org/7.2.1511/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm'
wget 'http://vault.centos.org/7.2.1511/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm'
wget 'http://vault.centos.org/7.3.1611/os/x86_64/Packages/centos-release-7-3.1611.el7.centos.x86_64.rpm'
wget 'http://vault.centos.org/7.3.1611/os/x86_64/Packages/centos-indexhtml-7-9.el7.centos.noarch.rpm'
wget 'http://vault.centos.org/7.3.1611/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm'
wget 'http://vault.centos.org/7.3.1611/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm'
wget 'http://vault.centos.org/7.4.1708/os/x86_64/Packages/centos-release-7.4.1708.el7.centos.x86_64.rpm'
wget 'http://vault.centos.org/7.4.1708/os/x86_64/Packages/centos-indexhtml-7-9.el7.centos.noarch.rpm'
wget 'http://vault.centos.org/7.4.1708/os/x86_64/Packages/yum-3.4.3-172.el7.centos.noarch.rpm'
wget 'http://vault.centos.org/7.4.1708/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-44.el7.noarch.rpm'
wget 'http://vault.centos.org/6.5/os/x86_64/Packages/centos-release-6-5.el6.centos.11.1.x86_64.rpm'
wget 'http://vault.centos.org/6.5/os/x86_64/Packages/centos-indexhtml-6-1.el6.centos.noarch.rpm'
wget 'http://vault.centos.org/6.5/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm'
wget 'http://vault.centos.org/6.5/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm'
wget 'http://vault.centos.org/6.6/os/x86_64/Packages/centos-release-6-6.el6.centos.12.2.x86_64.rpm'
wget 'http://vault.centos.org/6.6/os/x86_64/Packages/centos-indexhtml-6-2.el6.centos.noarch.rpm'
wget 'http://vault.centos.org/6.6/os/x86_64/Packages/yum-3.2.29-60.el6.centos.noarch.rpm'
wget 'http://vault.centos.org/6.6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm'
wget 'http://vault.centos.org/6.7/os/x86_64/Packages/centos-release-6-7.el6.centos.12.3.x86_64.rpm'
wget 'http://vault.centos.org/6.7/os/x86_64/Packages/centos-indexhtml-6-2.el6.centos.noarch.rpm'
wget 'http://vault.centos.org/6.7/os/x86_64/Packages/yum-3.2.29-69.el6.centos.noarch.rpm'
wget 'http://vault.centos.org/6.7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm'
wget 'ftp://ftp.funet.fi/pub/mirrors/centos.org/6.8/os/x86_64/Packages/centos-release-6-8.el6.centos.12.3.x86_64.rpm'
wget 'ftp://ftp.funet.fi/pub/mirrors/centos.org/6.8/os/x86_64/Packages/centos-indexhtml-6-2.el6.centos.noarch.rpm'
wget 'ftp://ftp.funet.fi/pub/mirrors/centos.org/6.8/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm'
wget 'ftp://ftp.funet.fi/pub/mirrors/centos.org/6.8/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm'

Remove packages and clean RHN subscriptions

yum remove rhnlib abrt-plugin-bugzilla redhat-release-notes*
rpm -e --nodeps redhat-indexhtml redhat-release-server-6Server
subscription-manager clean
yum remove subscription-manager

Install CentOS equivalent packages and work our way to the latest patches / updates.

rpm -Uvh --force *.rpm
yum clean all
yum upgrade
  • tips_and_howtos/rhel_to_centos.txt
  • Last modified: 2021/10/24 13:51
  • (external edit)