RedHat Subscription Manager - Unix in Depth PDF
RedHat Subscription Manager - Unix in Depth PDF
Home Operating System Virtulization Clustering Storage Scripting Networking Database Miscellaneous Contact Us
Recent write-ups
2. Prerequisites
3. Registering a System
Let's register a machine which has internet connectivity and to register a machine use
"subscription-manger" command.
[root@jumpbox~]# subscription-manager register --username <email address> --password 'secret'
Registering to: subscription.rhn.redhat.com:443/subscription
The system has been registered with ID: bbfaf1-3b23-4943-8a8b-4r
Or else we can just use "subscription-manger register" and key in the username and
password when prompted.
[root@jumpbox~]# subscription-manager register
Registering to: subscription.rhn.redhat.com:443/subscription
Username: <username>
Password:
The system has been registered with ID: e1029b-75fe-4b8-b2b7-08ac831
Registration process can be bifurcated to two parts, first one is to register a machine and
create an entry on the subscription service and the second one is to copy the necessary cert
files and configure the server but for a offline registration we have to manually register a
machine on the RedHat portal rather than depending on subscription manager and then we
need to import the required pem files on to the server.
www.unixindepth.com/p/rhsm.html 1/10
1/2/2020 RedHat Subscription Manager: Unix In Depth
Login to RedHat customer portal and navigate to systems then after click on "New" to
register a machine.
So once machine is created we need to assign a valid subscription for this navigate to
"systems" again and click on the newly created machine and navigate to "subscriptions"
tab.Click on "Attach subscriptions"
www.unixindepth.com/p/rhsm.html 2/10
1/2/2020 RedHat Subscription Manager: Unix In Depth
Once the subscriptions are attached we can see "Download Certificates" button click on it to
download the certificates.
Now copy the zip file to the server and try to unzip it.when unzipped it will create
consumer_export.zip and try to even unzip this file then go to
export/entitlement_certificates folder.
[root@jumpbox cert]# unzip 1291764e-1ec7-48db-862f-4a236a01_certificates.zip
Archive: 1291764e-1ec7-48db-862f-4a236a01_certificates.zip
signed Candlepin export for 1291764e-1ec7-48db-862f-4a236a01
inflating: consumer_export.zip
inflating: signature
[root@jumpbox entitlement_certificates]# ls
1258361295534975836.pem 6965237657922911947.pem
www.unixindepth.com/p/rhsm.html 3/10
1/2/2020 RedHat Subscription Manager: Unix In Depth
certificate=/root/cert/export/entiitlement_certificates/6965237657922911947.pem
Successfully imported certificate 1258361295534975836.pem
Successfully imported certificate 6965237657922911947.pem
Now run the subscription manager to check the status and the status will be Unknown as
the system is offline.
[root@jumpbox ~]# subscription-manager status
+-------------------------------------------+
System Status Details
+-------------------------------------------+
Overall Status: Unknown
4. Restoring a Registration
At times we may loose registration and subscription information due to hardware failures or
for any other reason in such scenarios we can restore the information by using the original
system UUID.
UUID of a system can be found using either RedHat portal or run "subscription-manager
identity" command.
[root@jumpbox ~]# subscription-manager identity
system identity: 135e20bf-acd3-4232-ab97-5eabeb
name: jumpbox.homelabs.com
org name: 7240
org ID: 7240
I have reinstalled a new machine and i will be using the same system ID to register this new
machine.
[root@jumpbox ~]# subscription-manager register --username <email> --password <secret> --
consumerid=135e20bf-acd3-4232-ab97-5eabeb
The system has been registered with ID: 135e20bf-acd3-4232-ab97-5eabeb
By this we can register a new machine using the existing UUID also please make sure that
the original machine entry exists on the RedHat customer portal.
5. Subscriptions
A Subscription is a list of products purchased and the resulting subscription contains all the
details (support level,validity,contract number etc...) of the product purchased.So once a
machine is registered we need to attach a valid subscription.
www.unixindepth.com/p/rhsm.html 4/10
1/2/2020 RedHat Subscription Manager: Unix In Depth
Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Developer Suite
Provides: Red Hat Software Collections (for RHEL Server)
We need to make sure that our systems are up to date and for this we will have to run "yum
update" but the administrators cannot simply run "yum update" as this will update the
machine to the latest minor version.So to avoid this we will have to set our preferred
release version.
By setting a preferred release version subscription manager limits the system to access the
repositories associated with that O.S version instead of automatically using the newest
version.
For example i am using RedHat 7.2 and if i set my release preference to 7.3 then the
machine will be receiving packages,updates and errata of RedHat 7.3 by this we will be
locking our machines to preferred version.
www.unixindepth.com/p/rhsm.html 5/10
1/2/2020 RedHat Subscription Manager: Unix In Depth
If you observe the output each repository will have a keyword "Enabled" and if the Enabled
value is set to "0" then the repository is considered to be disabled and if the value is set to
"1" then the repository is considered to be enabled.
So far we have been discussing on how subscription manager works but now we will learn
how to configure subscription manager.
www.unixindepth.com/p/rhsm.html 6/10
1/2/2020 RedHat Subscription Manager: Unix In Depth
[root@jumpbox ~]# pwd
/etc/rhsm
[root@jumpbox ~]# ls -ltr
total 8
drwxr-xr-x. 2 root root 6 Oct 13 2015 facts
-rw-r--r--. 1 root root 1659 Oct 13 2015 rhsm.conf
drwxr-xr-x. 2 root root 6 Oct 13 2015 pluginconf.d
-rw-r--r--. 1 root root 1492 Oct 13 2015 logging.conf
drwxr-xr-x. 2 root root 27 Jul 18 15:25 ca
Oct 23 15:32:11 jumpbox .homelabs.com systemd[1]: Starting Enable periodic update of entitlement
certificates....
Oct 23 15:32:11 jumpbox .homelabs.com systemd[1]: Started Enable periodic update of entitlement
certificates..
www.unixindepth.com/p/rhsm.html 7/10
1/2/2020 RedHat Subscription Manager: Unix In Depth
[root@jumpbox ~]# subscription-manager config --rhsmcertd.autoattachinterval=720
Similarly we can even change the cert interval check value (default value is 240 min)
[root@jumpbox ~]# subscription-manager config --rhsmcertd.certcheckinterval=100
rhsm.log file tracks all the results generated by subscription-manager and subscription-
manager-gui commands.
[root@jumpbox ~]# cat /var/log/rhsm/rhsm.log
2017-10-23 11:17:21,519 [DEBUG] subscription-manager:4170 @cache.py:110 - Wrote cache:
/var/lib/rhsm/cache/written_overrides.json
2017-10-23 11:17:21,522 [INFO] subscription-manager:4170 @repolib.py:296 - repos updated: Repo updates
Subscriptions are assigned to a machine based on their system's architecture for example
subscriptions for 64 bit and 32 bit platforms are different and these characteristics of a
machine are called as facts. These facts can be viewed and can be even updated when ever
a hardware configuration change happens by doing so you will be sending the updated facts
to RedHat subscription service so that it can update the list of subscriptions which matches
the system architecture.
www.unixindepth.com/p/rhsm.html 8/10
1/2/2020 RedHat Subscription Manager: Unix In Depth
12. miscellaneous
Hoping that this article has given a good hands-on experience on Red Hat Subscription
Manager!!!!
Feel free to Post your comments and i will get back to you as early as possible.
No comments :
Post a Comment
Home
Email Subscription
Email address...
Submit
www.unixindepth.com/p/rhsm.html 9/10