複数のYUMリポジトリからパッケージをインストールする方法は?

複数のYUMリポジトリからパッケージをインストールする方法は?

私のサーバーに2つのyumリポジトリ(RHEL 7.0とRHEL 7.2)を設定しようとしています。 .repoファイルの作成が完了しました。以下の出力を参照してください。

[root@foundation ~]# yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id                                                 repo name                                                                         status
InstallMedia                                            Red Hat Enterprise Linux 7.2                                                      disabled
google-chrome                                           google-chrome                                                                     enabled:     3
rhel_7_0                                                RHEL 7.0 repository (foundation server)                                           enabled: 4,305
rhel_7_2                                                RHEL 7.2 repository (foundation server)                                           enabled: 4,620
repolist: 8,928
[root@foundation ~]# 

カーネルパッケージを一覧表示しようとすると、RHEL 7.2で利用可能なパッケージのみが表示されます。

[root@foundation ~]# yum list *kernel*
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
abrt-addon-kerneloops.x86_64                                         2.1.11-34.el7                                                      @anaconda/7.2   
kernel.x86_64                                                        3.10.0-327.el7                                                     @anaconda/7.2   
kernel-headers.x86_64                                                3.10.0-327.el7                                                     @foundation-repo
kernel-tools.x86_64                                                  3.10.0-327.el7                                                     @anaconda/7.2   
kernel-tools-libs.x86_64                                             3.10.0-327.el7                                                     @anaconda/7.2   
Available Packages
kernel-abi-whitelists.noarch                                         3.10.0-327.el7                                                     rhel_7_2        
kernel-debug.x86_64                                                  3.10.0-327.el7                                                     rhel_7_2        
kernel-debug-devel.x86_64                                            3.10.0-327.el7                                                     rhel_7_2        
kernel-devel.x86_64                                                  3.10.0-327.el7                                                     rhel_7_2        
kernel-doc.noarch                                                    3.10.0-327.el7                                                     rhel_7_2        
texlive-l3kernel.noarch                                              2:svn29409.SVN_4469-38.el7                                         rhel_7_2        
[root@foundation ~]# 

RHEL 7.0でカーネルソフトウェアパッケージをどのように見ることができますか?ぜひ設置したいです。 yumに目的のリポジトリにパッケージをインストールさせるにはどうすればよいですか?たとえば、RHEL 7.2リポジトリの代わりにRHEL 7.0リポジトリからインストールします。

ベストアンサー1

上記の人々(RahulとJulie Pelletier)が収集した入力に基づいて含めたくないリポジトリ(私の場合はrhel_7_0リポジトリ)を無効にして、特定のリポジトリにカーネルパッケージをインストールできました。

yum --disablerepo rhel_7_0 install -y kernel

その後、RHEL 7.0システムのrhel_7_2リポジトリにカーネルをインストールして正常に起動できました。

[root@desktop2 ~]# yum list kernel
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
kernel.x86_64                                              3.10.0-123.el7                                              @anaconda/7.0
kernel.x86_64                                              3.10.0-327.el7                                              @rhel_7_2    
[root@desktop2 ~]# grubby --default-kernel
/boot/vmlinuz-3.10.0-327.el7.x86_64
[root@desktop2 ~]# uname -r
3.10.0-327.el7.x86_64
[root@desktop2 ~]# 

おすすめ記事