How to Register a system and Enable Red Hat Subscription
Register a system and Enable Red Hat Subscription is required for Redhat support and updating packages from Redhat repository.
How to Register a system and Enable Red Hat Subscription: 4 Easy steps
Step 1:- Verify Server requirements
# cat /etc/redhat-release
Red Hat Enterprise Linux Server
release 7.7 (Maipo)
Note: For CentOS no subscription required only check if getting all updates using
# yum list all
# subscription-manager
list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product
Name: Red Hat Enterprise Linux Server
Product
ID: 85
Version: 7.7
Arch: x86_64
Status: Unknown
Status
Details:
Starts:
Ends:
# subscription-manager status
WARNING
This system
has already been registered with Red Hat using RHN
Classic.
Your system
is being registered again using Red Hat Subscription Management. Red Hat
recommends that customers only register once.
To learn how
to unregister from either service please consult this Knowledge Base Article:
https://access.redhat.com/kb/docs/DOC-45563
Note: If warning coming use below command to unsubscribe from RHN Classic
# rm -rf
/etc/sysconfig/rhn/systemid
Set Proxy details if using in your network.
# vi /etc/rhsm/rhsm.conf
# vi /etc/rhsm/rhsm.conf
# Server hostname:
hostname = subscription.rhsm.redhat.com
# Server
prefix:
prefix = /subscription
# Server
port:
port = 443
# Set to 1
to disable certificate validation:
insecure = 0
# Set the
depth of certs which should be checked
# when
validating a certificate
ssl_verify_depth
= 3
# an http
proxy server to use
proxy_hostname
=
# port for
http proxy server
proxy_port =
# user name
for authenticating to an http proxy, if needed
proxy_user =
# password
for basic http proxy auth, if needed
proxy_password
=
#
host/domain suffix blacklist for proxy, if needed
no_proxy =
[rhsm]
# Content
base URL:
baseurl = https://cdn.redhat.com
# Repository
metadata GPG key URL:
repomd_gpg_url
=
# Server CA
certificate location:
ca_cert_dir
= /etc/rhsm/ca/
Note: If all
parameters in red are same then proceed
Step 2:- Set
Proxy
# vi /etc/rhsm/rhsm.conf
set proxy IP and port as below
# an http
proxy server to use
#proxy_hostname
=
proxy_hostname
= xxx.xxx.xxx.xxx
# port for
http proxy server
#proxy_port
=
proxy_port = xxxx
Step 3:- (RHEL Subscription)
# subscription-manager register
Registering
to: subscription.rhsm.redhat.com:443/subscription
Username: xxxxxxxxx
Password: xxxxxxxxxx
The system
has been registered with ID: xxxxxxxxxxxxxxxxxxxxxxxxxxx
The
registered system name is: Machine Name
[Localhost.localdomain
~]# subscription-manager auto-attach
Auto-attach preference: enabled
[Localhost.localdomain
~]# subscription-manager subscribe
Installed
Product Current Status:
Product
Name: Red Hat Enterprise Linux Server
Status: Subscribed
# subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product
Name: Red Hat Enterprise Linux Server
Product
ID: 85
Version: 7.7
Arch: x86_64
Status: Subscribed
Status
Details:
Starts: 10/15/2019
Ends: 01/15/2024
# subscription-manager status
+-------------------------------------------+
System Status Details
+-------------------------------------------+
Overall
Status: Current
System
Purpose Status: Not Specified
# subscription-manager list --consumed
+-------------------------------------------+
Consumed Subscriptions
+-------------------------------------------+
Subscription
Name: Red Hat Enterprise Linux for
Virtual Datacenters, Premium
Provides: Red Hat CodeReady Linux Builder for
x86_64
Red Hat Enterprise Linux
Atomic Host
Red Hat Enterprise Linux
Atomic Host Beta
Red Hat Developer Tools
(for RHEL Server)
Red Hat Developer Tools
Beta (for RHEL Server)
Red Hat Developer Toolset
(for RHEL Server)
Red Hat Enterprise Linux
High Performance Networking (for RHEL Server) - Extended Update Support
Red Hat Enterprise Linux
for x86_64
Red Hat Enterprise Linux
Resilient Storage (for RHEL Server) - Extended Update Support
dotNET on RHEL (for RHEL
Server)
Red Hat Enterprise Linux
Server - Extended Update Support
Red Hat Enterprise Linux
Scalable File System (for RHEL Server) - Extended Update Support
Red Hat Beta
Red Hat EUCJP Support (for
RHEL Server) - Extended Update Support
Oracle Java (for RHEL
Server)
Oracle Java (for RHEL
Workstation)
Red Hat Software
Collections (for RHEL Server)
Oracle Java (for RHEL
Server) - Extended Update Support
Red Hat S-JIS Support (for
RHEL Server) - Extended Update Support
Red Hat Software Collections Beta (for RHEL
Server)
Red Hat Enterprise Linux
High Availability (for RHEL Server) - Extended Update Support
Red Hat Ansible Engine
Red Hat Enterprise Linux
Load Balancer (for RHEL Server) - Extended Update Support
Red Hat Enterprise Linux
Server
SKU: xxxxxxxxx
Contract: xxxxxxxxxx
Account: xxxxxxxxx
Serial: xxxxxxxxxxxxxxxxxxxxxxxxxx
Pool
ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Provides
Management: No
Active: True
Quantity
Used: 1
Service
Level: Premium
Service
Type: L1-L3
Status
Details: Subscription is current
Subscription
Type: Standard
Starts: 10/15/2019
Ends: 01/15/2024
System Type:
Virtual
Step 4:- (Verifying for getting updates)
# yum list all
Loaded
plugins: product-id, search-disabled-repos, subscription-manager
Installed
Packages
GConf2.x86_64 3.2.6-8.el7 @Server
GeoIP.x86_64 1.5.0-14.el7 @rhel-7-server-rpms
ModemManager-glib.x86_64 1.6.10-3.el7_6 @rhel-7-server-rpms
NetworkManager.x86_64 1:1.18.0-5.el7 @rhel-7-server-rpms
Also find other topics Unsubscribe RHEL and Enable virt-who service for RHEL subscription
Also find other topics Unsubscribe RHEL and Enable virt-who service for RHEL subscription
Comments
Post a Comment