0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

RHEL のサブスクリプションにシステムを登録するワンライナー

Last updated at Posted at 2021-11-17

以下のコマンドでシステムを登録することができる。

subscription-manager register --username <user_name> --password '<password>' --auto-attach

複数インスタンスを登録する場合は、ssh を使って

ssh server1 -C 'subscription-manager register --username <user_name> --password <password> --auto-attach'
ssh server2 -C 'subscription-manager register --username <user_name> --password <password> --auto-attach'
ssh server3 -C 'subscription-manager register --username <user_name> --password <password> --auto-attach'

という感じで一括で登録できる。

2021-12-01 追記

今までだと Subscription が一つだけなので問題なかったが、 「Red Hat Beta Access」 を利用し始めたところ --auto-attach が失敗するようになった。

pool ID を直接指定することで、問題が解決した。

subscription-manager register --username <user_name> --password '<password>' &&\
subscription-manager subscribe --pool=<pool_id>

pool ID は以下のコマンドで確認できる。

subscription-manager list --available

Environment

  • RHEL(6|7|8)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?