先日取得した開発者向け無償サブスクリプションを利用してアクティベートしてみました。
環境はVMware Workstation 11の仮想マシンとして同時にダウンロードしたrhel-server-7.2-x86_64-dvd.isoを使用してインストールしました。
- Red Hat Enterprise Linux Server release 7.2 (Maipo)
- Linux rhel7.rootlinks.net 3.10.0-327.el7.x86_64
- 最小構成インストール
いつも最小構成からの構築なのでサブスクリプションはコマンドラインで行います。
Red Hat Subscription Management
https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/index.html
- サーバ登録情報の確認
- サーバの登録
- 利用できるサブスクリプションの確認
- サブスクリプションの登録
- サーバ登録情報の確認
- サーバの登録情報の詳細確認
- 利用できるサブスクリプションの確認
- サブスクリプションの解除
- サブスクリプション登録情報の確認
- サーバの登録解除
- サーバの登録情報の確認
インストール直後の登録情報を確認すると当然未登録です。
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@rhel7 ~]# subscription-manager list +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux Server Product ID: 69 Version: 7.2 Arch: x86_64 Status: Unknown Status Details: Starts: Ends: |
インストールしたサーバをRed Hatに登録します。登録はRHNのアカウント、パスワードが必要です。
1 2 3 4 5 |
[root@rhel7 ~]# subscription-manager register Registering to: subscription.rhn.redhat.com:443/subscription Username: RHNaccount Password: The system has been registered with ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
利用できるサブスクリプションを確認してみます。
開発用サブスクリプションだからと思うのですが、仮想・物理で2つ、さらにいろいろ利用できます(^^
型番がRH2262474なのでRed Hat Enterprise Linux Developer Suiteで$99/Yearの商品のようです。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
[root@rhel7 ~]# subscription-manager list --available +-------------------------------------------+ Available Subscriptions +-------------------------------------------+ Subscription Name: Red Hat Enterprise Linux Developer Suite Provides: Red Hat Software Collections (for RHEL Server) Red Hat Container Development Kit MRG Realtime Red Hat EUCJP Support (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Server - Extended Update Support Red Hat Beta Oracle Java (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node) Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Resilient Storage (for RHEL Server) Oracle Java (for RHEL Server) Red Hat Container Images Red Hat Enterprise Linux for Real Time Red Hat Enterprise Linux Atomic Host Red Hat S-JIS Support (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Scalable File System (for RHEL Server) Red Hat Enterprise Linux Resilient Storage (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Atomic Host Beta Red Hat Enterprise Linux High Availability (for RHEL Server) - Extended Update Support Red Hat Container Images Beta Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux High Availability (for RHEL Server) Red Hat Enterprise Linux Server Red Hat Software Collections Beta (for RHEL Server) Red Hat Enterprise Linux Load Balancer (for RHEL Server) Red Hat Enterprise Linux High Performance Networking (for RHEL Server) Red Hat Developer Toolset (for RHEL Server) SKU: RH2262474 Contract: 11111111 Pool ID: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Provides Management: Yes Available: 100 Suggested: 1 Service Level: Self-Support Service Type: L1-L3 Subscription Type: Standard Ends: 04/01/17 System Type: Virtual Subscription Name: Red Hat Enterprise Linux Developer Suite Provides: Red Hat Software Collections (for RHEL Server) Red Hat Container Development Kit MRG Realtime Red Hat EUCJP Support (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Server - Extended Update Support Red Hat Beta Oracle Java (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node) Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Resilient Storage (for RHEL Server) Oracle Java (for RHEL Server) Red Hat Container Images Red Hat Enterprise Linux for Real Time Red Hat Enterprise Linux Atomic Host Red Hat S-JIS Support (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Scalable File System (for RHEL Server) Red Hat Enterprise Linux Resilient Storage (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Atomic Host Beta Red Hat Enterprise Linux High Availability (for RHEL Server) - Extended Update Support Red Hat Container Images Beta Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux High Availability (for RHEL Server) Red Hat Enterprise Linux Server Red Hat Software Collections Beta (for RHEL Server) Red Hat Enterprise Linux Load Balancer (for RHEL Server) Red Hat Enterprise Linux High Performance Networking (for RHEL Server) Red Hat Developer Toolset (for RHEL Server) SKU: RH2262474 Contract: 22222222 Pool ID: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb Provides Management: Yes Available: 1 Suggested: 1 Service Level: Self-Support Service Type: L1-L3 Subscription Type: Standard Ends: 04/01/17 System Type: Physical |
利用できるサブスクリプションを自動選択して登録します。
1 2 3 4 |
[root@rhel7 ~]# subscription-manager attach --auto Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed |
サブスクリプションを手動で登録する場合はプールIDを指定します。
1 |
[root@rhel7 ~]# subscription-manager attach --pool=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
サーバの登録情報を確認してみます。登録されています。
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@rhel7 ~]# subscription-manager list +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux Server Product ID: 69 Version: 7.2 Arch: x86_64 Status: Subscribed Status Details: Starts: 04/01/16 Ends: 04/01/17 |
サーバの登録情報の詳細を確認するためには--consumed
オプションを追加します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
[root@rhel7 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: Red Hat Enterprise Linux Developer Suite Provides: Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support Oracle Java (for RHEL Server) Red Hat EUCJP Support (for RHEL Server) - Extended Update Support Red Hat Beta Red Hat Enterprise Linux Resilient Storage (for RHEL Server) MRG Realtime Red Hat Enterprise Linux Atomic Host Beta Red Hat Developer Toolset (for RHEL Server) Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux for Real Time Red Hat Enterprise Linux Load Balancer (for RHEL Server) Red Hat Container Images Beta Red Hat Enterprise Linux High Availability (for RHEL Server) Red Hat Container Development Kit Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node) Red Hat Enterprise Linux Server - Extended Update Support Red Hat Enterprise Linux Server Red Hat Enterprise Linux Atomic Host Red Hat Enterprise Linux Resilient Storage (for RHEL Server) - Extended Update Support Oracle Java (for RHEL Server) - Extended Update Support Red Hat Software Collections (for RHEL Server) Red Hat Enterprise Linux High Availability (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Scalable File System (for RHEL Server) Red Hat Software Collections Beta (for RHEL Server) Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support Red Hat Container Images Red Hat S-JIS Support (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux High Performance Networking (for RHEL Server) SKU: RH2262474 Contract: 11111111 Account: 8888888 Serial: 9999999999999999999 Pool ID: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Provides Management: Yes Active: True Quantity Used: 1 Service Level: Self-Support Service Type: L1-L3 Status Details: Subscription is current Subscription Type: Standard Starts: 04/01/16 Ends: 04/01/17 System Type: Virtual |
仮想サブスクリプションを使用したので残りは物理サブスクリプションになりました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
[root@rhel7 ~]# subscription-manager list --available +-------------------------------------------+ Available Subscriptions +-------------------------------------------+ Subscription Name: Red Hat Enterprise Linux Developer Suite Provides: Red Hat Software Collections (for RHEL Server) Red Hat Container Development Kit MRG Realtime Red Hat EUCJP Support (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Server - Extended Update Support Red Hat Beta Oracle Java (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node) Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Resilient Storage (for RHEL Server) Oracle Java (for RHEL Server) Red Hat Container Images Red Hat Enterprise Linux for Real Time Red Hat Enterprise Linux Atomic Host Red Hat S-JIS Support (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Scalable File System (for RHEL Server) Red Hat Enterprise Linux Resilient Storage (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Atomic Host Beta Red Hat Enterprise Linux High Availability (for RHEL Server) - Extended Update Support Red Hat Container Images Beta Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support Red Hat Enterprise Linux High Availability (for RHEL Server) Red Hat Enterprise Linux Server Red Hat Software Collections Beta (for RHEL Server) Red Hat Enterprise Linux Load Balancer (for RHEL Server) Red Hat Enterprise Linux High Performance Networking (for RHEL Server) Red Hat Developer Toolset (for RHEL Server) SKU: RH2262474 Contract: 22222222 Pool ID: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb Provides Management: Yes Available: 1 Suggested: 1 Service Level: Self-Support Service Type: L1-L3 Subscription Type: Standard Ends: 04/01/17 System Type: Physical |
登録したサブスクリプションを解除してみます。
すべてのサブスクリプションを解除するには--all
を追加します。
1 |
subscription-manager remove --all |
特定のサブスクリプションの解除には--serial
を追加します。
このシリアル番号は詳細確認(list --consumed
)で表示されるSerial:になります。
1 2 3 4 |
[root@rhel7 ~]# subscription-manager remove --serial=9999999999999999999 Serial numbers successfully removed at the server: 9999999999999999999 1 local certificate has been deleted. |
サブスクリプションが解除されています。
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@rhel7 ~]# subscription-manager list +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux Server Product ID: 69 Version: 7.2 Arch: x86_64 Status: Not Subscribed Status Details: Not supported by a valid subscription. Starts: Ends: |
ここで利用できるサブスクリプションを確認すると仮想・物理の2つが表示されると思います。
Red Hatからサーバの登録を解除します。
1 2 |
[root@rhel7 ~]# subscription-manager unregister System has been unregistered. |
インストール直後の状態に戻りました。
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@rhel7 ~]# subscription-manager list +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux Server Product ID: 69 Version: 7.2 Arch: x86_64 Status: Unknown Status Details: Starts: Ends: |
subscription-manager --help
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
[root@rhel7 ~]# subscription-manager --help Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help] Primary Modules: attach Attach a specified subscription to the registered system list List subscription and product information for this system refresh Pull the latest subscription data from the server register Register this system to the Customer Portal or another subscription management service release Configure which operating system release to use remove Remove all or specific subscriptions from this system status Show status information for this system's subscriptions and products unregister Unregister this system from the Customer Portal or another subscription management service Other Modules: auto-attach Set if subscriptions are attached on a schedule (default of daily) clean Remove all local system and subscription data without affecting the server config List, set, or remove the configuration parameters in use by this system environments Display the environments available for a user facts View or update the detected system information identity Display the identity certificate for this system or request a new one import Import certificates which were provided outside of the tool orgs Display the organizations against which a user can register a system plugins View and configure subscription-manager plugins redeem Attempt to redeem a subscription for a preconfigured system repo-override Manage custom content repository settings repos List the repositories which this system is entitled to use service-level Manage service levels for this system subscribe Deprecated, see attach unsubscribe Deprecated, see remove version Print version information |