RHEL7でyum repolist allでリポジトリ一覧が表示されない場合の対応

RHEL7(RedHat Enterprise Linux7)でインストール時に、「サブスクリプション管理の登録」(Subscription Manage Registration)で「登録後にサブスクリプションを手動で設定する」(Manually attach subscription after registration)にチェックを入れてインストールをすると、サブスクリプションを手動設定した後であってもyum repolist allコマンドでリポジトリ一覧が表示されない場合があります。

そのような場合は、以下の順にコマンドを実行することでリポジトリ一覧が表示されるようになります。

```
# subscription-manager repo-override
# yum repolist all
```

##実行結果
```
読み込んだプラグイン:langpacks, product-id, subscription-manager
リポジトリー ID                                                      リポジトリー名                                                                            状態
rhel-7-server-beta-debug-rpms/x86_64                                 Red Hat Enterprise Linux 7 Server Beta (Debug RPMs)                                       無効
rhel-7-server-beta-rpms/x86_64                                       Red Hat Enterprise Linux 7 Server Beta (RPMs)                                             無効
rhel-7-server-beta-source-rpms/x86_64                                Red Hat Enterprise Linux 7 Server Beta (Source RPMs)                                      無効
rhel-7-server-debug-rpms/7Server/x86_64                              Red Hat Enterprise Linux 7 Server (Debug RPMs)                                            無効
rhel-7-server-extras-debug-rpms/x86_64                               Red Hat Enterprise Linux 7 Server - Extras (Debug RPMs)                                   無効
rhel-7-server-extras-rpms/x86_64                                     Red Hat Enterprise Linux 7 Server - Extras (RPMs)                                         無効
rhel-7-server-extras-source-rpms/x86_64                              Red Hat Enterprise Linux 7 Server - Extras (Source RPMs)                                  無効
rhel-7-server-fastrack-debug-rpms/x86_64                             Red Hat Enterprise Linux 7 Server - Fastrack (Debug RPMs)                                 無効
rhel-7-server-fastrack-rpms/x86_64                                   Red Hat Enterprise Linux 7 Server - Fastrack (RPMs)                                       無効
rhel-7-server-fastrack-source-rpms/x86_64                            Red Hat Enterprise Linux 7 Server - Fastrack (Source RPMs)                                無効
rhel-7-server-optional-beta-debug-rpms/x86_64                        Red Hat Enterprise Linux 7 Server - Optional Beta (Debug RPMs)                            無効
rhel-7-server-optional-beta-rpms/x86_64                              Red Hat Enterprise Linux 7 Server - Optional Beta (RPMs)                                  無効
rhel-7-server-optional-beta-source-rpms/x86_64                       Red Hat Enterprise Linux 7 Server - Optional Beta (Source RPMs)                           無効
rhel-7-server-optional-debug-rpms/7Server/x86_64                     Red Hat Enterprise Linux 7 Server - Optional (Debug RPMs)                                 無効
rhel-7-server-optional-fastrack-debug-rpms/x86_64                    Red Hat Enterprise Linux 7 Server - Optional Fastrack (Debug RPMs)                        無効
rhel-7-server-optional-fastrack-rpms/x86_64                          Red Hat Enterprise Linux 7 Server - Optional Fastrack (RPMs)                              無効
rhel-7-server-optional-fastrack-source-rpms/x86_64                   Red Hat Enterprise Linux 7 Server - Optional Fastrack (Source RPMs)                       無効
rhel-7-server-optional-rpms/7Server/x86_64                           Red Hat Enterprise Linux 7 Server - Optional (RPMs)                                       無効
rhel-7-server-optional-source-rpms/7Server/x86_64                    Red Hat Enterprise Linux 7 Server - Optional (Source RPMs)                                無効
rhel-7-server-rh-common-beta-debug-rpms/x86_64                       Red Hat Enterprise Linux 7 Server - RH Common Beta (Debug RPMs)                           無効
rhel-7-server-rh-common-beta-rpms/x86_64                             Red Hat Enterprise Linux 7 Server - RH Common Beta (RPMs)                                 無効
rhel-7-server-rh-common-beta-source-rpms/x86_64                      Red Hat Enterprise Linux 7 Server - RH Common Beta (Source RPMs)                          無効
rhel-7-server-rh-common-debug-rpms/7Server/x86_64                    Red Hat Enterprise Linux 7 Server - RH Common (Debug RPMs)                                無効
rhel-7-server-rh-common-rpms/7Server/x86_64                          Red Hat Enterprise Linux 7 Server - RH Common (RPMs)                                      無効
rhel-7-server-rh-common-source-rpms/7Server/x86_64                   Red Hat Enterprise Linux 7 Server - RH Common (Source RPMs)                               無効
rhel-7-server-rhn-tools-beta-debug-rpms/x86_64                       RHN Tools for Red Hat Enterprise Linux 7 Server Beta (Debug RPMs)                         無効
rhel-7-server-rhn-tools-beta-rpms/x86_64                             RHN Tools for Red Hat Enterprise Linux 7 Server Beta (RPMs)                               無効
rhel-7-server-rhn-tools-beta-source-rpms/x86_64                      RHN Tools for Red Hat Enterprise Linux 7 Server Beta (Source RPMs)                        無効
rhel-7-server-rhn-tools-debug-rpms/7Server/x86_64                    RHN Tools for Red Hat Enterprise Linux 7 Server (Debug RPMs)                              無効
rhel-7-server-rhn-tools-rpms/7Server/x86_64                          RHN Tools for Red Hat Enterprise Linux 7 Server (RPMs)                                    無効
rhel-7-server-rhn-tools-source-rpms/7Server/x86_64                   RHN Tools for Red Hat Enterprise Linux 7 Server (Source RPMs)                             無効
rhel-7-server-rpms/7Server/x86_64                                    Red Hat Enterprise Linux 7 Server (RPMs)                                                  無効
rhel-7-server-source-rpms/7Server/x86_64                             Red Hat Enterprise Linux 7 Server (Source RPMs)                                           無効
rhel-7-server-supplementary-beta-debug-rpms/x86_64                   Red Hat Enterprise Linux 7 Server - Supplementary Beta (Debug RPMs)                       無効
rhel-7-server-supplementary-beta-rpms/x86_64                         Red Hat Enterprise Linux 7 Server - Supplementary Beta (RPMs)                             無効
rhel-7-server-supplementary-beta-source-rpms/x86_64                  Red Hat Enterprise Linux 7 Server - Supplementary Beta (Source RPMs)                      無効
rhel-7-server-supplementary-debug-rpms/7Server/x86_64                Red Hat Enterprise Linux 7 Server - Supplementary (Debug RPMs)                            無効
rhel-7-server-supplementary-rpms/7Server/x86_64                      Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)                                  無効
rhel-7-server-supplementary-source-rpms/7Server/x86_64               Red Hat Enterprise Linux 7 Server - Supplementary (Source RPMs)                           無効
rhel-7-server-thirdparty-oracle-java-beta-rpms/x86_64                Red Hat Enterprise Linux 7 Server - Oracle Java Beta (RPMs)                               無効
rhel-7-server-thirdparty-oracle-java-beta-source-rpms/x86_64         Red Hat Enterprise Linux 7 Server - Oracle Java Beta (Source RPMs)                        無効
rhel-7-server-thirdparty-oracle-java-rpms/7Server/x86_64             Red Hat Enterprise Linux 7 Server - Oracle Java (RPMs)                                    無効
rhel-7-server-thirdparty-oracle-java-source-rpms/7Server/x86_64      Red Hat Enterprise Linux 7 Server - Oracle Java (Source RPMs)                             無効
rhel-7-server-v2vwin-1-debug-rpms/7Server/x86_64                     Red Hat Virt V2V Tool for RHEL 7 (Debug RPMs)                                             無効
rhel-7-server-v2vwin-1-rpms/7Server/x86_64                           Red Hat Virt V2V Tool for RHEL 7 (RPMs)                                                   無効
rhel-7-server-v2vwin-1-source-rpms/7Server/x86_64                    Red Hat Virt V2V Tool for RHEL 7 (Source RPMs)                                            無効
rhel-server-rhscl-7-beta-debug-rpms/x86_64                           Red Hat Software Collections Beta Debug RPMs for Red Hat Enterprise Linux 7 Server        無効
rhel-server-rhscl-7-beta-rpms/x86_64                                 Red Hat Software Collections Beta RPMs for Red Hat Enterprise Linux 7 Server              無効
rhel-server-rhscl-7-beta-source-rpms/x86_64                          Red Hat Software Collections Beta Source RPMs for Red Hat Enterprise Linux 7 Server       無効
repolist: 12,549
```

この後に、以下のコマンドを実行することで、指定されたリポジトリが有効（使用可能）となります。
## Server RPMs
```
#yum-config-manager --enable rhel-7-server-rpms
```

## Server Optional RPMs
```
#yum-config-manager --enable rhel-7-server-optional-rpms 
```