Register Red Hat 7 using Subscription Manager via Proxy

Once our Red Hat 7 system is installed, it should be registered at RHN using Subscription Manager in order to be able to get newest updates. If the server is placed in network behind firewall and outgoing traffic is blocked by firewall, the only reliable way of keeping our Red Hat 7 up-to-date is through proxy (if any exists).
Below we will show you in 2 simple steps, how to configure HTTP Proxy for Red Hat Subscription Manager and register Red Hat 7 with RHN in command line using HTTP Proxy:

1. Set HTTP Proxy for Red Hat Subscription Manager

Use the following syntax:

[root@tuxfixer ~]# subscription-manager config --server.proxy_hostname=(proxy_server_ip) --server.proxy_port=(proxy_server_port)


[root@tuxfixer ~]# subscription-manager config --server.proxy_hostname= --server.proxy_port=8080

2. Register Red Hat 7 using your Red Hat credentials and automatically attach Red Hat repository

Use the following syntax:

[root@tuxfixer ~]# subscription-manager register --username (your_username) --password (your_password) --auto-attach


[root@tuxfixer ~]# subscription-manager register --username --password tuxfixer_sec_pass --auto-attach

The system has been registered with ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

3. (Optional) Enable additional Red Hat Channels to obtain additional packages

Red Hat Optional Channel:

[root@tuxfixer ~]# subscription-manager repos --enable rhel-7-server-optional-rpms

Red Hat Extras Channel:

[root@tuxfixer ~]# subscription-manager repos --enable rhel-7-server-extras-rpms
Liked it? Take a second to support on Patreon!

Share on: Share on FacebookShare on Google+Tweet about this on TwitterShare on StumbleUponShare on LinkedInPin on PinterestBuffer this pageShare on TumblrDigg thisFlattr the authorShare on RedditShare on VKShare on Yummly

Leave a Reply

Name *
Email *