I saw the following tweet today.
Just found out we need to do a massive migration AWAY from RHEL. What's everybody's favorite alternative (Ubuntu, CentOS, SUSE)? #linux—
Jim Rispin (@jimrispin) August 27, 2013
I was faced with the same task a couple years ago and discovered that it’s actually a lot simpler than you’d guess. (It helps that 99(.44)% of the code between the same versions of Red Hat Enterprise Linux, Scientific Linux, and CentOS is identical.) After determining the minimum number of packages I needed to remove, replace, or install, and in what order to do everything, I came up with the procedure detailed below. Once I tested it on a few boxes and was satisfied with the results, I handed the job off to puppet and it took care of converting the rest of my RHEL boxen to SL. (If you’re interested in seeing the puppet manifest I used to do this, let me know in the comments.)
Because I told him I would, I’m sharing the process I used to convert RHEL 6.x (x86_64) servers to SL 6.x. (If you’re not Jim Rispin, well, then I guess you can read it, too.) Like this blog title says, no reboots or downtime were necessary. We even did our conversion in the middle of a weekday with no noticeable impact. Let’s get going.
- Add Scientific Linux repositories to your RHEL box.
- You can install yum-conf-sl6x-1-2.noarch.rpm from the SL6x repo to add SL6x (x86_64) public mirrors to yum.
- Alternatively, create mirrors of the SL6x repos on your local network and point yum to those.
- Remove RHEL-specific repos:
- Clear the yum cache
yum clean all
- Install yum and redhat-logos packages from the SL6x repo.
yum install yum redhat-logos
- Remove proprietary RHEL packages, but leave dependencies.
rpm -e --nodeps --allmatches redhat-release redhat-release-server redhat-indexhtml
- Install branding packages from the SL6x repo.
yum install sl-release sl-release-notes sl-bookmarks sl-indexhtml redhat-rpm-config
- Finally, replace all occurrences of “Red Hat Enterprise” with “Scientific” in the grub boot menu.
sed -i -e 's|Red Hat Enterprise|Scientific|g' /boot/grub/grub.conf
- There is no step 8.
That’s really all there is to it.