GNU/Linux >> Linux の 問題 >  >> Linux

Redhat8Linuxでサブスクリプション管理リポジトリを有効にする

RHEL 8のインストール後、新しいパッケージをインストールする前に、Linuxパッケージリポジトリを有効にする必要があります。新しいソフトウェアをインストールしようとすると、次のエラーメッセージが表示されます。

This system has no repositories available through subscriptions.

または

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Error: There are no enabled repos.

または

This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
No repositories available

このチュートリアルでは、次のことを学びます。

  • システムをRedHatサブスクリプション管理に登録する方法。
  • RHEL8サブスクリプションをシステムにアタッチする方法。
  • RHEL8リポジトリを有効にする方法。
  • RHEL8リポジトリを無効にする方法。

Redhat8Linuxで有効なサブスクリプション管理リポジトリを一覧表示します。

使用されるソフトウェア要件と規則

システム ソフトウェア その他 規約
ソフトウェア要件とLinuxコマンドラインの規則
カテゴリ 使用する要件、規則、またはソフトウェアバージョン
Redhat 8 Linux
Redhatカスタマープロダクションまたは開発者ユーザーのクレデンシャル
rootまたはsudoを介したLinuxシステムへの特権アクセス コマンド。
–指定されたLinuxコマンドは、rootユーザーとして直接、またはsudoを使用して、root権限で実行する必要があります。 コマンド
$ –特定のLinuxコマンドを通常の非特権ユーザーとして実行する必要があります

Redhat8Linuxでサブスクリプション管理リポジトリを有効にするステップバイステップの説明

ここでは、Redhat 8 Linuxシステムをインストールしたばかりで、リポジトリを有効にして、Red HatEnterpriseLinuxサブスクリプションの準備ができていることを前提としています。

<中央>
有料の本番Redhatサブスクリプションを所有していない場合は、Red Hat Developerプログラムに登録できます。このプログラムを使用すると、RHEL 8をダウンロードしたり、システムを登録したり、リポジトリを有効にしたりできます。
  1. まず、システムを登録する必要があります。

    顧客の詳細を準備し、コマンドラインから顧客の資格情報を提供しながら次のコマンドを実行します。

    # subscription-manager register
    Registering to: subscription.rhsm.redhat.com:443/subscription
    Username:
    Password: 
    The system has been registered with ID: 5e3514db-51ef-4287-8168-e598f372ebc4
    The registered system name is: rhel8
    
    >
  2. サブスクリプションの取得Pool ID 。これを行うには、利用可能なすべてのサブスクリプションを一覧表示することから始めます。
    # subscription-manager list --available
    

    サブスクリプションに応じて、上記のコマンドはサブスクリプションのリストを生成します。サブスクリプションの詳細を確認し、Pool IDをメモします システムに添付するサブスクリプションパッケージの例:

    Subscription Name:   Red Hat Enterprise Linux Server Beta
    Provides:            Red Hat CodeReady Linux Builder for x86_64 Beta
                         Red Hat Enterprise Linux for IBM z Systems Beta
                         Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
                         Red Hat Enterprise Linux Resilient Storage Beta
                         Red Hat Enterprise Linux for x86_64 Beta
                         Red Hat Enterprise Linux for Real Time for NFV Beta
                         Red Hat Enterprise Linux for Real Time Beta
                         Red Hat CodeReady Linux Builder for ARM 64 Beta
                         Red Hat Enterprise Linux Fast Datapath Beta for x86_64
                         Red Hat CodeReady Linux Builder for Power, little endian Beta
                         Red Hat CodeReady Linux Builder for IBM z Systems Beta
                         Red Hat Enterprise Linux High Availability Beta
                         Red Hat Enterprise Linux for Power, little endian Beta
                         Red Hat Enterprise Linux for ARM 64 Beta
    SKU:                 RH00069
    Contract:            11796656
    Pool ID:             8a85f69c671cb39701671f54cfc365cb
    Provides Management: No
    Available:           Unlimited
    Suggested:           1
    Service Level:       Self-Support
    Service Type:        L1-L3
    Subscription Type:   Standard
    Starts:              16/11/18
    Ends:                15/11/19
    System Type:         Physical
    
  3. 次のステップは、サブスクリプションを添付することです。 Pool IDを使用する システムにサブスクリプションをアタッチするために前の手順から取得:
    # subscription-manager attach --pool=8a85f69c671cb39701671f54cfc365cb
    
  4. Redhatサブスクリプションを確認します:
    [root@rhel8 ~]# subscription-manager list
    +-------------------------------------------+
        Installed Product Status
    +-------------------------------------------+
    Product Name:   Red Hat Enterprise Linux for x86_64 Beta
    Product ID:     486
    Version:        8.0 Beta
    Arch:           x86_64
    Status:         Subscribed
    Status Details: 
    Starts:         16/11/18
    Ends:           15/11/19
    
  5. この段階で、いくつかのデフォルトリポジトリを有効にする必要があります。 dnfを使用して、有効なリポジトリを一覧表示します コマンド:
    # dnf repolist
    Updating Subscription Management repositories.
    Updating Subscription Management repositories.
    Last metadata expiration check: 0:01:59 ago on Sat 17 Nov 2018 00:05:40 EST.
    repo id                                                    repo name                                                                          status
    rhel-8-for-x86_64-appstream-beta-rpms                      Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)                      4,594
    rhel-8-for-x86_64-baseos-beta-rpms  
    

    すべてがうまくいけば、dnfを使用できるようになります。 Redhat8Linuxシステムに追加のソフトウェアをインストールするコマンド。

  6. より多くのリポジトリを有効にするには、subscription-managerを使用します 最初に、使用可能なすべてのリポジトリとその名前を一覧表示するコマンド:
    #  subscription-manager repos --list                                  
    +----------------------------------------------------------+
        Available Repositories in /etc/yum.repos.d/redhat.repo
    +----------------------------------------------------------+
    Repo ID:   rhel-8-for-x86_64-supplementary-beta-rpms
    Repo Name: Red Hat Enterprise Linux 8 for x86_64 - Supplementary Beta (RPMs)
    Repo URL:  https://cdn.redhat.com/content/beta/rhel8/8/x86_64/supplementary/os
    Enabled:   0
    
    Repo ID:   rhel-8-for-x86_64-baseos-beta-source-rpms
    Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (Source RPMs)
    Repo URL:  https://cdn.redhat.com/content/beta/rhel8/8/x86_64/baseos/source/SRPMS
    Enabled:   0
    
    Repo ID:   rhel-8-for-x86_64-highavailability-beta-debug-rpms
    Repo Name: Red Hat Enterprise Linux 8 for x86_64 - High Availability Beta (Debug RPMs)
    Repo URL:  https://cdn.redhat.com/content/beta/rhel8/8/x86_64/highavailability/debug
    Enabled:   0
    
    Repo ID:   rhel-8-for-x86_64-rt-beta-debug-rpms
    Repo Name: Red Hat Enterprise Linux 8 for x86_64 - Real Time Beta (Debug RPMs)
    Repo URL:  https://cdn.redhat.com/content/beta/rhel8/8/x86_64/rt/debug
    Enabled:   0
    
    .......
    
    Repo ID:   fast-datapath-beta-for-rhel-8-x86_64-rpms
    Repo Name: Fast Datapath Beta for RHEL 8 x86_64 (RPMs)
    Repo URL:  https://cdn.redhat.com/content/beta/layered/rhel8/x86_64/fast-datapath/os
    Enabled:   0
    
    Repo ID:   rhel-8-for-x86_64-baseos-beta-debug-rpms
    Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (Debug RPMs)
    Repo URL:  https://cdn.redhat.com/content/beta/rhel8/8/x86_64/baseos/debug
    Enabled:   0
    
    Repo ID:   codeready-builder-beta-for-rhel-8-x86_64-rpms
    Repo Name: Red Hat CodeReady Linux Builder Beta for RHEL 8 x86_64 (RPMs)
    Repo URL:  https://cdn.redhat.com/content/beta/rhel8/8/x86_64/codeready-builder/os
    Enabled:   0
    

    リポジトリのRepo IDをメモします 有効/無効にします。

  7. subscription-managerを使用してリポジトリを有効/無効にします 指図。この例では、rhel-8-for-x86_64-nfv-beta-rpmsを有効にします。 リポジトリ:
    # subscription-manager repos --enable=rhel-8-for-x86_64-nfv-beta-rpms
    Repository 'rhel-8-for-x86_64-nfv-beta-rpms' is enabled for this system.
    

    すべてのリポジトリを有効にするには:

    # subscription-manager repos --enable=*
    

    特定のリポジトリを無効にするには、次のコマンドを実行します。

    # subscription-manager repos --disable=rhel-8-for-x86_64-nfv-beta-rpms
    Repository 'rhel-8-for-x86_64-nfv-beta-rpms' is disabled for this system.
    

Linux
  1. aptによるLinuxパッケージ管理

  2. 現在のRedHatサブスクリプションなしでRHEL7でEPELリポジトリを有効にする方法

  3. Redhatのバージョンを確認する方法

  1. RHEL8でRedHatサブスクリプションを有効にする方法

  2. Red Hat Enterprise Linuxを登録し、Ansibleにサブスクリプションを添付します

  3. Red Hat Linux とは?

  1. dnfを使用したLinuxパッケージ管理

  2. LinuxでIP転送を有効にする方法

  3. RedHat Linux への Maven 3.0.5 のインストール