Generally switching between RedHat clones of the same vintage is pretty easy. All you should have to do is download and install a handful of packages, then issue an update to bring in any patches that have been issued since your last one. Since you want to disable SELinux as well, it's only a small extra step.
As ewwhite mentioned, the differences between CentOS/ScientificLinux/RHEL are all fairly low key. They primarily come down to default included repositories and how quickly updates are released. Both CentOS and SL are, by design, binary compatible with RHEL.
I haven't tested this, but you should be able to do your migration as easily as this:
- Edit
/etc/selinux/config
and set SELINUX
to disabled
- Reboot
- Delete the packages that define this as an SL system:
rpm -e --nodeps sl-release sl-indexhtml
- Go to the mirror of your choice and browse to the CentOS 6.2 directory
- Download the rpms for
centos-release-6
and centos-indexhtml-6
- Install these packages using rpm
- Perform a full update, this should also take you to 6.3:
yum clean all && yum update -y yum && yum update -y glibc && yum update
After getting yourself a cup of coffee and a sandwich you should have a fully functional CentOS 6.3 system. Afterwards I would also recommend checking out your installed packages to look for any SL specific cruft that may be left behind.
rpm -qa --qf "%{NAME} %{VENDOR} \n" | awk '/Scientific Linux/ {print $1}'
This will produce a list of all packages that are still installed that were built by the Scientific Linux group. You can simply issue a yum reinstall
on each of those and get the CentOS specifics. Something like this should work.
rpm -qa --qf "%{NAME} %{VENDOR} \n" | awk '/Scientific Linux/ {print $1}' | xargs yum reinstall -y
After all this it might also be worth your time to look for old abandoned packages. Install the yum-utils
package and run the package-cleanup --orphans
command. That will give you a list of every installed package that is not in a currently configured repository. Manually review this list before taking any action. It will give you anything you've installed from SL that isn't available in CentOS as well as rpm you have downloaded and installed manually. So some of the orphans you may want, and some you may not.
As I said, I haven't tested this on anything recent, but I have successfully converted CentOS systems to RHEL using the above steps. Also, in this day and age the SELinux policies are good enough that they should very rarely cause you problems. If you decide to turn it back on you should be able to do something like this.
First edit the /etc/selinux/config
file and change SELINUX
to either targeted
or strict
. Then reboot to re-enable selinux. Then you'll need to have the system relabel everything. I would also restore all the contexts just to make sure.
genhomedircon
restorecon -R / # Add a -v if you're *really* curious
Some daemons don't do a great job of picking this up, so you may need to reboot again after doing this.