Migration from RHN to RHSM or RHN Satellite

The user interface for RHN is shutting down July, 2017 and will no longer be supported. Staying on RHN is not recommended. Two migration solutions are suggested below in detail. If you need help, please feel free to contact John Rose (rose@iastate.edu)

 

Unsubscribe from RHN

NOTE: for private IP cases, please talk to John Rose (rose@iastate.edu) before working on migration
NOTE: remove old bootstrap scripts and the Cyclops.pub key from /root if they exist

1. On target server, 
    yum install subscription-manager
    yum update
    yum repolist
        NOTE: record the list of repos

2. On RHN Hosted, locate the server record and choose "Delete system"

3. On target server,
   3.1 
        rm /etc/sysconfig/rhn/systemid
           NOTE: also remove any files that start with systemid
   3.2
        vi /etc/sysconfig/rhn/up2date
            Remove “https://cyclops.iastate.edu/XMLRPC;” from serverURL
            Remove “/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT;” from sslCACert
   3.3
        cd /var/cache/yum/<arch>/<product>/
            NOTE: for example, cd /var/cache/yum/x86_64/6workstation    
        ls 
            NOTE: remove all directories that correspond to channels subscribed to on RHN Classic (a.k.a. hosted)
   3.4
        rpm -e rhn-org-trusted-ssl-cert
   3.5 
        rpm -e gpg-pubkey-5e1f0a03-40aca522
            NOTE: ignore errors if it does not exist
   3.6 
        vi /etc/yum/pluginconf.d/rhnplugin.conf
            NOTE: set enabled=0; when registering with RHN Satellite, it will be enabled again

NOTE: now you have unsubscribed from RHN Classic. Next you will subscribe to Redhat Subscription Manager (RHSM) or RHN Satellite

 

Solution 1: migrate to RedHat Subscription Manager

On target server, 

    subscription-manager register

        NOTE: type subscription credentials and verify subscription by following 2 commands

            subscription-manager identity

            subscription-manager attach

        NOTE: alternatively, on RHSM GUI, "Attach Subscription"

    subscription-manager list --consumed

        NOTE: alternatively, on RHSM GUI, for consumed subscription

    yum repolist

        NOTE: Third-party non-Red Hat repos should not be affected

        NOTE: expect to see "-rpms" added at the end of each Red Hat repo name

        NOTE: If additional repos you don't want were added, remove them with

            subscription-manager repos --disabled=<REPOID>

 

Solution 2: migrate to RHN Satellite

1. On target server,

   vi bootstrap.sh

       Comment out the first instance of "exit 1"

       Set ACTIVATION_KEYS=<YourActivationKey>

       Set ORG_GPG_KEY=Cyclops.pub

   sh bootstrap.sh

       NOTE: it may take a few minutes to register.

   look for the target server and choose "Alter Channel Subscription"

   Make sure that subscribed channels are the same as previously recorded by using RHN Classic 

3. On target server,    

   yum clean all; yum repolist

   yum check-update