LoginSignup
4
10

More than 5 years have passed since last update.

yum を実行する際のマイナーリリースを指定する方法

Posted at

yum を実行する場合、基本的には以下のように最新のバージョンが適用される。

$ yum list systemd
読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
インストール済みパッケージ
systemd.x86_64                                                               219-30.el7                                                                   @anaconda/7.3
利用可能なパッケージ
systemd.x86_64                                                               219-57.el7_5.3                                                               rhel-7-server-rpms

この場合、--releasever=x.x を付与することで、マイナーリリース (RHEL7.3 とか RHEL7.4 とかのこと) を指定することが可能。

$ yum list systemd --releasever=7.4
読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                                                                                                                   | 3.5 kB  00:00:00
(1/3): rhel-7-server-rpms/7.4/x86_64/group                                                                                                           | 710 kB  00:00:02
(2/3): rhel-7-server-rpms/7.4/x86_64/updateinfo                                                                                                      | 2.4 MB  00:00:04
(3/3): rhel-7-server-rpms/7.4/x86_64/primary_db                                                                                                      |  48 MB  00:01:13
インストール済みパッケージ
systemd.x86_64                                                              219-30.el7                                                                    @anaconda/7.3
利用可能なパッケージ
systemd.x86_64                                                              219-42.el7_4.10                                                               rhel-7-server-rpms

以下のように /etc/yum/vars/releasever ファイルを使用することも可能。

$ echo 7.4 > /etc/yum/vars/releasever
$ yum list systemd
読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
インストール済みパッケージ
systemd.x86_64                                                              219-30.el7                                                                    @anaconda/7.3
利用可能なパッケージ
systemd.x86_64                                                              219-42.el7_4.10                                                               rhel-7-server-rpms
4
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
10