REDHATのアクティベーションメモ
redhatを使おうとして・・・いや、普通にインストールして使う分には使えるんですけど。
yumコマンドでupdateとかエラーになるのでなんでなんでーって調べたときのメモです。
周辺に聞いた所、インストールしたマシンでサブスクリプションの登録をしないと駄目って言われたんで。
そのへんのやり方を書いておきます。
昔はこんなの無かったよねー。
今から8年前までは無かったよー。
今はネットつないでないとなんにも出来ないんかいなー
■登録していない状態ではyumコマンドがこんな感じになります。
[xxxx@localhost ~]$ su -
Password:
[root@localhost ~]# yum update
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable <repo>
To enable custom repositories:
yum-config-manager --enable <repo>
[root@localhost ~]#
※エラーメッセージ翻訳
このシステムは資格サーバーに登録されていません。 サブスクリプションマネージャーを使用して登録できます。
有効なリポジトリはありません。
「yumrepolistall」を実行して、所有しているリポジトリを確認します。
Red Hatサブスクリプション管理リポジトリを有効にするには:
サブスクリプションマネージャーリポジトリ--enable <repo>
カスタムリポジトリを有効にするには:
yum-config-manager --enable <repo>
・・・・
もうちょっと説明有ってもいいよね。
■redhatのページにアクセスしてユーザ登録する
https://access.redhat.com/
右上の人間マークからREGISTERとしてアカウント作成してログイン
ダウンロードはDOWNLOADSから
古いバージョンはVersions 7 and belowから
ダウンロードしてインストール。
インストールは今回はWMWare Workstation playerで実施。
インストール時に自動のままだと、GUIが起動してこないみたいなので
途中SOFTWARE SELECTIONからGUIを選択しする。
あとついでにキーボードをOADG109、DATE&TIMEで日本をクリック
以下teratermから操作
■現在の登録状態を表示
[xxxx@localhost ~]$ su -
Password:
[root@localhost ~]# subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux Server
Product ID: 69
Version: 7.6
Arch: x86_64
Status: Unknown
Status Details:
Starts:
Ends:
[root@localhost ~]#
■マシンに登録
[root@localhost ~]# subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: xxxx.xxxx@xxx.xx.jp ←@から後ろはいらないみたいでエラー
Password:
HTTP error (401 - Unauthorized): Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html
[root@localhost ~]# subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: xxxx.xxxx
Password:
The system has been registered with ID: 6dd3e769-4521-4144-a028-4a138d6b58f6
The registered system name is: localhost.localdomain
[root@localhost ~]#
■現在の状態を表示
[root@localhost ~]# subscription-manager list --available
+-------------------------------------------+
Available Subscriptions
+-------------------------------------------+
Subscription Name: 30 Day Red Hat Enterprise Linux Server Self-Supported Evaluation
Provides: Red Hat Beta
Oracle Java (for RHEL Server)
Red Hat Enterprise Linux Server
Red Hat CodeReady Linux Builder for x86_64
Red Hat Enterprise Linux for x86_64
Red Hat Ansible Engine
Red Hat Container Images Beta
Red Hat Enterprise Linux Atomic Host Beta
Red Hat Enterprise Linux Atomic Host
Red Hat Container Images
SKU: RH00065
Contract: 12591596
Pool ID: cmfkdm3armkrcg2s9kfk4hze8db5u7k7
Provides Management: No
Available: 2
Suggested: 1
Service Level: Self-Support
Service Type: L1-L3
Subscription Type: Instance Based
Starts: 02/05/2021
Ends: 03/07/2021
System Type: Physical
[root@localhost ~]#
■サブスクリプションを割り当てる
[root@localhost ~]# subscription-manager subscribe --pool=cmfkdm3armkrcg2s9kfk4hze8db5u7k7
↑さっき上で確認したPoolIDを入れる
Successfully attached a subscription for: 30 Day Red Hat Enterprise Linux Server Self-Supported Evaluation
[root@localhost ~]#
■サブスクリプションの状態を再度表示
[root@localhost ~]# subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux Server
Product ID: 69
Version: 7.6
Arch: x86_64
Status: Subscribed ←SubscribedならOK
Status Details:
Starts: 02/05/2021
Ends: 03/07/2021
[root@localhost ~]#
■yumコマンドが使えるようになる
[root@localhost ~]# yum check-update
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms | 3.5 kB 00:00:00
(1/3): rhel-7-server-rpms/7Server/x86_64/group | 631 kB 00:00:00
(2/3): rhel-7-server-rpms/7Server/x86_64/updateinfo | 4.0 MB 00:00:00
(3/3): rhel-7-server-rpms/7Server/x86_64/primary_db | 78 MB 00:00:01








