This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
linux:lnx_subscription [2023/03/01 12:08] manu |
linux:lnx_subscription [2023/11/15 18:15] (current) manu [Add subscription] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Linux subscriptions ====== | ====== Linux subscriptions ====== | ||
| - | |||
| - | test | ||
| ===== Redhat ===== | ===== Redhat ===== | ||
| Line 27: | Line 25: | ||
| benefit of Red Hat Subscription Management. If not desired, use | benefit of Red Hat Subscription Management. If not desired, use | ||
| "subscription-manager config --rhsm.auto_enable_yum_plugins=0" to block this behavior. | "subscription-manager config --rhsm.auto_enable_yum_plugins=0" to block this behavior. | ||
| + | </cli> | ||
| + | |||
| + | ==== subscription status ==== | ||
| + | |||
| + | <cli prompt='#'> | ||
| + | [root@lnx01 ~]# subscription-manager status | ||
| + | +-------------------------------------------+ | ||
| + | System Status Details | ||
| + | +-------------------------------------------+ | ||
| + | Overall Status: Unknown | ||
| + | |||
| + | System Purpose Status: Unknown | ||
| </cli> | </cli> | ||
| Line 40: | Line 50: | ||
| * register to the satellite | * register to the satellite | ||
| + | ==== Remove subscription ==== | ||
| + | |||
| + | <cli prompt='#'> | ||
| + | # subscription-manager unsubscribe --all | ||
| + | # subscription-manager remove --all | ||
| + | # subscription-manager unregister | ||
| + | # subscription-manager clean | ||
| + | # dnf clean all | ||
| + | </cli> | ||
| + | |||
| + | ==== Add subscription ==== | ||
| + | |||
| + | <cli prompt='#'> | ||
| + | # subscription-manager register | ||
| + | # subscription-manager refresh | ||
| + | # subscription-manager list --available --all | ||
| + | # subscription-manager attach --pool=<POOL_ID> | ||
| + | </cli> | ||
| + | |||
| + | Or Register and automatically subscribe in one step | ||
| + | |||
| + | Use the following command to register the system, then automatically associate any available subscription matching that system: | ||
| + | <cli prompt='#'> | ||
| + | # subscription-manager register --username <username> --password <password> --auto-attach | ||
| + | </cli> | ||
| + | |||
| + | Or | ||
| + | |||
| + | <cli prompt='#'> | ||
| + | # subscription-manager register --serverurl https://subscription.rhsm.redhat.com:443/subscription --proxy http://<proxy>:8080 --proxyuser user01 --proxypassword XXXXXXXXXX --username xxxxxxx --password XXXXX | ||
| + | </cli> | ||
| + | |||
| + | ==== lock version ==== | ||
| + | |||
| + | Lock your updates to a specific version | ||
| + | <cli prompt='#'> | ||
| + | # subscription-manager release --set 7.6 | ||
| + | </cli> | ||
| + | |||
| + | ==== Activate repositories ==== | ||
| + | |||
| + | If you want to activate additionnal repositories | ||
| + | <cli prompt='#'> | ||
| + | # yum repolist all | ||
| + | |||
| + | repo id repo name status | ||
| + | C5.0-base CentOS-5.0 - Base disabled | ||
| + | C5.0-centosplus CentOS-5.0 - Plus disabled | ||
| + | C5.0-extras CentOS-5.0 - Extras disabled | ||
| + | base CentOS-5 - Base enabled: 2,725 | ||
| + | epel Extra Packages for Enterprise Linux 5 - i386 enabled: 5,783 | ||
| + | extras CentOS-5 - Extras enabled: 282 | ||
| + | </cli> | ||
| + | |||
| + | <cli prompt='#'> | ||
| + | # subscription-manager repos --enable=C5.0-base | ||
| + | </cli> | ||
| ===== Suse ===== | ===== Suse ===== | ||