Skip to content

Instantly share code, notes, and snippets.

@jfstenuit
Last active February 9, 2017 13:29
Show Gist options
  • Save jfstenuit/f8a2d7a89a158cf362f7eda19f8b5dad to your computer and use it in GitHub Desktop.
Save jfstenuit/f8a2d7a89a158cf362f7eda19f8b5dad to your computer and use it in GitHub Desktop.
Transform a RHEL into CentOS

Download base packages

  wget http://mirror.centos.org/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
  wget http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-8.el6.centos.12.3.x86_64.rpm
  wget http://mirror.centos.org/centos/6/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm
  wget http://mirror.centos.org/centos/6/os/x86_64/Packages/yum-utils-1.1.30-37.el6.noarch.rpm

Check CentOS mirror for newer files if needed

Erase RHEL specific packages

  rpm -e –nodeps redhat-release-server
  rpm -e rhn-seup rhn-client-tools rhnsd rhn-check yum-rhn-plugin

Install all downloaded packages :

  rpm -Uhv –-force *.rpm
  • "U" is for upgrade
  • "hv" verbose and hash marks - nice display but you can ommit if you want
  • "force" is to force installation of packages even if the installed one is more recent

Now start upgrading

  yum upgrade

Reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment