▼ 2007/06/08(金) yum fastestmirror
yumのfastestmirrorとは、複数のミラーサイトから、一番最速のミラーサイトを
自動で検地して、そこからパッケージの更新やらインストールを行うことができる
ようにするプラグイン。
とりあえず、以下はCentOS4.5での導入例でつ。
先ずは、/etc/yum.conf にplugins=1 の追加をする。
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
installonlypkgs=kernel kernel-smp kernel-devel kernel-smp-devel kernel-largesmp kernel-largesmp-devel kernel-hugemem kernel-hugemem-devel
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1
plugins=1 ←追加
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
installonlypkgs=kernel kernel-smp kernel-devel kernel-smp-devel kernel-largesmp kernel-largesmp-devel kernel-hugemem kernel-hugemem-devel
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1
plugins=1 ←追加
続いて、fastestmirror のインストールを行う。
# yum -y install yum-plugin-fastestmirror
試しに、update してみる。
fastestmirror の plugin が読み込まれれば成功。
# yum update
Loading "fastestmirror" plugin
Setting up Update Process
Setting up repositories
dries 100% |=========================| 951 B 00:00
update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
centosplus 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Loading mirror speeds from cached hostfile
Loading "fastestmirror" plugin
Setting up Update Process
Setting up repositories
dries 100% |=========================| 951 B 00:00
update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
centosplus 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Loading mirror speeds from cached hostfile
もし、fastestmirror を無効にしたくなったら以下のように編集する。
# vi /etc/yum/pluginconf.d/fastestmirror.conf
[main]
enabled=0 ←ここを0にしてやる
verbose=0
socket_timeout=3
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=1
[main]
enabled=0 ←ここを0にしてやる
verbose=0
socket_timeout=3
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=1
以上でおk。
▼ コメント(0件)
- TB-URL http://chibilog.name/018/tb/
