summaryrefslogtreecommitdiffstats
path: root/computer/convert_rhel7_to_centos.rst
blob: 577c69471a82208cc93f1a967c9860a527e60f77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Convert RHEL-7 to CentOS
########################

:date: 2018-05-02T18:43:00
:category: computer
:tags: linux

I have tried to suggest update of `Migration Guide`_ for
RHEL7→CentOS7 migration, but apparently after CentOS was bought
by Red Hat, there is not enough desire to document such
migration, ehm ehm. So, just recording this for posteriority::

    URLBASE=http://mirror.centos.org/centos/7/os/x86_64/Packages
    cd /tmp
    mkdir TMP
    cd TMP
    wget $URLBASE/centos-indexhtml-7-9.el7.centos.noarch.rpm \
        $URLBASE/centos-release-7-4.1708.el7.centos.x86_64.rpm \
        $URLBASE/yum-3.4.3-154.el7.centos.noarch.rpm \
        $URLBASE/yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm
    subscription-manager remove --all
    yum remove rhnlib abrt-plugin-bugzilla redhat-release-notes\* \
        subscription-manager\*
    rpm -e --nodeps redhat-release-workstation redhat-indexhtml
    for dir in /usr/share/redhat-release\;\* ; do rm -fv $dir ; done
    rmdir /usr/share/redhat-release
    rpm -Uvh *
    yum clean all && rm -rf /var/cache/yum
    yum upgrade
    yum upgrade
    yum distro-sync
    package-cleanup --orphans
    cd .. && rm -rf TMP

I am not sure what’s the deal with
``/usr/share/redhat-release*``, but it is just necessary to get
rid of all variants of such directory.

.. _`Migration Guide`:
    https://wiki.centos.org/HowTos/MigrationGuide