Show Table of Contents
5.3.2. コマンドラインを使用したサブスクリプションのアタッチと削除
5.3.2.1. サブスクリプションのアタッチ
サブスクリプションをシステムにアタッチするには、
--pool オプションを使用して、個別の製品またはサブスクリプションを指定する必要があります。
[root@server1 ~]# subscription-manager subscribe --pool=XYZ01234567
subscribe コマンドのオプション一覧は、表5.3「subscribe オプション」 に記載されています。
購入した製品のサブスクリプションプール ID を指定する必要があります。このプール ID は製品サブスクリプション情報に表示され、
list コマンドを実行すると確認できます。
[root@server1 ~]# subscription-manager list --available
+-------------------------------------------+
Available Subscriptions
+-------------------------------------------+
ProductName: RHEL for Physical Servers
ProductId: MKT-rhel-server
PoolId: ff8080812bc382e3012bc3845ca000cb
Quantity: 10
Expires: 2011-09-20
別の方法では、
--auto オプション (register コマンドの --autosubscribe オプションに類似) を使用して、サブスクリプションサービスが特定した最適なサブスクリプションをシステムにアタッチすることもできます。
[root@server1 ~]# subscription-manager subscribe --auto
表5.3 subscribe オプション
| オプション | 詳細 | 必須 |
|---|---|---|
| --pool=pool-id | システムにアタッチするサブスクリプション ID を指定します。 | --auto の使用時以外は必須 |
| --auto | システムを 1 つ以上の最適なサブスクリプションに自動的にアタッチします。 | オプション |
| --quantity=number | 複数カウントのサブスクリプションをシステムにアタッチします。これは、カウント制限を定義するサブスクリプションを対象に使用されます (例: 2 ソケットサーバー用のサブスクリプションを 2 つ使用して、1 台の 4 ソケットマシンに適用)。 | オプション |
| --servicelevel=None|Standard|Premium | マシン上でサブスクリプションに使用するサービスレベルを設定します。これが使われるのは、--auto オプションと一緒の時のみです。 | オプション |
5.3.2.2. コマンドラインを使用したサブスクリプションの削除
一つのシステムを複数のサブスクリプションおよび製品にアタッチすることができます。同様に、一つまたはすべてのサブスクリプションをシステムから削除することもできます。
unsubscribe コマンドを --all オプションで実行すると、現在システムにアタッチされているすべての製品サブスクリプションおよびサブスクリプションプールが削除されます。
[root@server1 ~]# subscription-manager unsubscribe --all
一つの製品サブスクリプションを削除することもできます。各製品には、識別のための X.509 証明書がインストールされています。削除する製品サブスクリプションは、
unsubscribe コマンドの X.509 証明書の ID 番号を参照して特定します。
- 製品サブスクリプションを削除する場合は、製品証明書のシリアル番号を取得してください。シリアル番号は subscription#
.pemファイル (例:392729555585697907.pem) から、または以下のようにlistコマンドを使って取得できます。[root@server1 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: High availability (cluster suite) ContractNumber: 0 SerialNumber: 11287514358600162 Active: True Begins: 2010-09-18 Expires: 2011-11-18 - subscription-manager ツールを
--serialオプションで実行し、証明書を特定します。[root@server1 ~]# subscription-manager unsubscribe --serial=11287514358600162

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.