== Convert Red Hat Enterprise Linux (RHEL) System To CentOS == To convert a server from Red Hat Enterprise Linux to CentOS one needs to: 1. Replace the ''comps'' package; 2. Update the ''initscripts'' package; 3. Replace the ''redhat-release'' package with ''centos-release''; 4. Update the ''rpmdb-redhat'' package; 5. Install the ''Yellowdog Updater Modified (YUM)''. Practical examples follow. (Keep in mind that these upgrades were all performed in spring of 2009, so newer versions of the packages mentioned may be available by now.) === RHEL 3 to CentOS 3 === {{{ # cat /etc/redhat-release Red Hat Enterprise Linux ES release 3 (Taroon Update 5) # # url=http://mirror.centos.org/centos/3.9/os/i386/RedHat/RPMS # # rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-3 # # rpm -e comps-3ES-0.20070529 # rpm -i $url/comps-3.9centos.0-0.20070617.i386.rpm # # rpm -q initscripts initscripts-7.31.22.EL-2 # rpm -F $url/initscripts-7.31.31.EL-1.centos.1.i386.rpm # # rpm -e redhat-release-3ES-13.5.1 # rpm -i $url/centos-release-3-9.1.i386.rpm # # rpm -q rpmdb-redhat rpmdb-redhat-3-0.20070529 # rpm -F $url/rpmdb-redhat-3.9-0.20070703.i386.rpm # # rpm -i $url/yum-2.0.8-2.centos3.noarch.rpm # rpm -i $url/centos-yumconf-1-11.noarch.rpm # rpm -i $url/centos-yumcache-3.9-0.20070703.noarch.rpm # # cat /etc/redhat-release CentOS release 3.9 (Final) # }}} === RHEL 4 to CentOS 4 === {{{ # cat /etc/redhat-release Red Hat Enterprise Linux ES release 4 (Nahant Update 7) # # url=ftp://linux-repo/pub/centos/4/os/i386 # # rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4 # # rpm -e comps-4WS-0.20080711 # rpm -i $url/disc1/CentOS/RPMS/comps-extras-10.1-1.noarch.rpm # rpm -i $url/disc1/CentOS/RPMS/comps-4.7CENTOS-0.20080805.i386.rpm # # rpm -q initscripts initscripts-7.93.33-1.el4 # rpm -U --force $url/disc1/CentOS/RPMS/initscripts-7.93.33-1.centos4.i386.rpm # # rpm -e --nodeps redhat-release-4WS-8.0.el4_7.1 # rpm -i $url/disc1/CentOS/RPMS/centos-release-4-7.i386.rpm # # rpm -e rpmdb-redhat-4-0.20080711 # rpm -i $url/disc1/CentOS/RPMS/rpmdb-CentOS-4.7-0.20080805.i386.rpm # # rpm -i $url/disc1/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm # rpm -i $url/disc1/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm # rpm -i $url/disc1/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm # rpm -i $url/disc1/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm # rpm -i $url/disc1/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm \ $url/disc1/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.i386.rpm # # cat /etc/redhat-release CentOS release 4.7 (Final) # }}} === RHEL 5 to CentOS 5 === {{{ # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.1 (Tikanga) # # url=http://mirror.centos.org/centos/5/os/i386/CentOS # # rpm -e rhel-instnum rhn-check rhn-client-tools rhnlib rhnsd rhn-setup yum-rhn-plugin # rpm -e yum-updatesd # # rpm -e redhat-release-notes-5Server-9 # rpm -e --nodeps redhat-release-5Server-5.1.0.2 # # rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 # # rpm -i $url/centos-release-5-2.el5.centos.i386.rpm $url/centos-release-notes-5.2-2.i386.rpm # # rpm -F $url/initscripts-8.45.19.EL-1.el5.centos.1.i386.rpm # # rpm -i $url/python-iniparse-0.2.3-4.el5.noarch.rpm # rpm -F $url/yum-3.2.8-9.el5.centos.1.noarch.rpm $url/yum-metadata-parser-1.1.2-2.el5.i386.rpm # rpm -i $url/yum-fastestmirror-1.1.10-9.el5.centos.noarch.rpm # rpm -i $url/gamin-python-0.1.7-8.el5.i386.rpm # rpm -i $url/yum-updatesd-0.9-2.el5.noarch.rpm # # cat /etc/redhat-release CentOS release 5.3 (Final) # }}}