Red Hat Enterprise Linux 7に開発サブスクリプションを登録して検証していますが、yum-plugin-fastestmirrorが最小構成ではインストールされませんでした。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@rhel7 ~]# ll /etc/yum/pluginconf.d/ total 20 -rw-r--r--. 1 root root 372 Apr 2 13:18 langpacks.conf -rw-r--r--. 1 root root 17 Oct 14 00:00 product-id.conf -rw-r--r--. 1 root root 178 Sep 18 2014 rhnplugin.conf -rw-r--r--. 1 root root 848 Oct 14 00:00 search-disabled-repos.conf -rw-r--r--. 1 root root 17 Oct 14 00:00 subscription-manager.conf [root@rhel7 ~]# rpm -qa | grep yum yum-metadata-parser-1.1.4-10.el7.x86_64 yum-3.4.3-132.el7.noarch yum-rhn-plugin-2.0.1-5.el7.noarch [root@rhel7 ~]# rpm -qa | grep fastestmirror [root@rhel7 ~]# yum info yum Loaded plugins: product-id, search-disabled-repos, subscription-manager (snip) |
最小構成なのでインストールされなかったのかは不明ですが、取り敢えずインストールすることにしました。
提供していそうなリポジトリを有効にしてsearchしてみます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
[root@rhel7 ~]# yum search fastestmirror Loaded plugins: product-id, search-disabled-repos, subscription-manager Warning: No matches found for: fastestmirror No matches found [root@rhel7 ~]# yum --enablerepo=rhel-7-server-optional-rpms search fastestmirror Loaded plugins: product-id, search-disabled-repos, subscription-manager ==================================== N/S matched: fastestmirror ==================================== yum-plugin-fastestmirror.noarch : Yum plugin which chooses fastest repository from a mirrorlist Name and summary matches only, use "search all" for everything. [root@rhel7 ~]# yum --enablerepo=rhel-7-server-optional-rpms info yum-plugin-fastestmirror Loaded plugins: product-id, search-disabled-repos, subscription-manager Available Packages Name : yum-plugin-fastestmirror Arch : noarch Version : 1.1.31 Release : 34.el7 Size : 30 k Repo : rhel-7-server-optional-rpms/7Server/x86_64 Summary : Yum plugin which chooses fastest repository from a mirrorlist URL : http://yum.baseurl.org/download/yum-utils/ License : GPLv2+ Description : This plugin sorts each repository's mirrorlist by connection speed : prior to downloading packages. |
rhel-7-server-optional-rpmsに含まれていました。インストールします。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
[root@rhel7 ~]# yum --enablerepo=rhel-7-server-optional-rpms -y install yum-plugin-fastestmirror Loaded plugins: product-id, search-disabled-repos, subscription-manager Resolving Dependencies --> Running transaction check ---> Package yum-plugin-fastestmirror.noarch 0:1.1.31-34.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================== Package Arch Version Repository Size ==================================================================================================== Installing: yum-plugin-fastestmirror noarch 1.1.31-34.el7 rhel-7-server-optional-rpms 30 k Transaction Summary ==================================================================================================== Install 1 Package Total size: 30 k Installed size: 53 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : yum-plugin-fastestmirror-1.1.31-34.el7.noarch 1/1 rhel-7-server-eus-rpms/7Server/x86_64/productid | 1.7 kB 00:00:00 rhel-7-server-rpms/7Server/x86_64/productid | 1.7 kB 00:00:00 rhel-7-server-rt-rpms/7Server/x86_64/productid | 2.1 kB 00:00:00 rhel-ha-for-rhel-7-server-eus-rpms/7Server/x86_64/productid | 1.8 kB 00:00:00 rhel-ha-for-rhel-7-server-rpms/7Server/x86_64/productid | 1.7 kB 00:00:00 rhel-rs-for-rhel-7-server-eus-rpms/7Server/x86_64/productid | 1.8 kB 00:00:00 rhel-rs-for-rhel-7-server-rpms/7Server/x86_64/productid | 1.7 kB 00:00:00 Verifying : yum-plugin-fastestmirror-1.1.31-34.el7.noarch 1/1 Installed: yum-plugin-fastestmirror.noarch 0:1.1.31-34.el7 Complete! |
確認
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
[root@rhel7 ~]# ll /etc/yum/pluginconf.d/ total 24 -rw-r--r--. 1 root root 279 Oct 13 00:36 fastestmirror.conf -rw-r--r--. 1 root root 372 Apr 2 13:18 langpacks.conf -rw-r--r--. 1 root root 17 Oct 14 00:00 product-id.conf -rw-r--r--. 1 root root 178 Sep 18 2014 rhnplugin.conf -rw-r--r--. 1 root root 848 Oct 14 00:00 search-disabled-repos.conf -rw-r--r--. 1 root root 17 Oct 14 00:00 subscription-manager.conf [root@rhel7 ~]# cat /etc/yum/pluginconf.d/fastestmirror.conf [main] enabled=1 verbose=0 always_print_best_host = true socket_timeout=3 # Relative paths are relative to the cachedir (and so works for users as well # as root). hostfilepath=timedhosts.txt maxhostfileage=10 maxthreads=15 #exclude=.gov, facebook #include_only=.nl,.de,.uk,.ie [root@rhel7 ~]# rpm -qs | grep yum rpm: no arguments given for query [root@rhel7 ~]# rpm -qa | grep yum yum-metadata-parser-1.1.4-10.el7.x86_64 yum-plugin-fastestmirror-1.1.31-34.el7.noarch yum-3.4.3-132.el7.noarch yum-rhn-plugin-2.0.1-5.el7.noarch [root@rhel7 ~]# yum update Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager Determining fastest mirrors Resolving Dependencies |
インストールできました。試しに日本のミラーサイトだけ参照するように設定してみます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[root@rhel7 ~]# vi /etc/yum/pluginconf.d/fastestmirror.conf [root@rhel7 ~]# cat /etc/yum/pluginconf.d/fastestmirror.conf [main] enabled=1 verbose=0 always_print_best_host = true socket_timeout=3 # Relative paths are relative to the cachedir (and so works for users as well # as root). hostfilepath=timedhosts.txt maxhostfileage=10 maxthreads=15 #exclude=.gov, facebook #include_only=.nl,.de,.uk,.ie include_only=.jp [root@rhel7 ~]# yum check-update Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager Loading mirror speeds from cached hostfile Resolving Dependencies (snip) |
よくよく考えたらyum-plugin-fastestmirrorをインストールしても無意味かも(^^;
Red Hatのミラーサイトが公開されているわけでもなく、近くのサイトってどうなの?
まあ、これも勉強ってことで。