: O. Yuanying

yumでタイムアウト

会社でLinuxをアップデートしようとyum -y updateしたが、回線が異常に細いのでパッケージをダウンロード中にタイムアウトしてしまう。

---> Package vte.i386 0:0.11.14-3.fc4 set to be updated
---> Downloading header for openoffice.org-core to pack into transaction set.
openoffice.org-core-2.0.1 100% |=========================| 7.8 MB    02:50
http://mirror.newnanutilities.org/fedora/linux/core/updates/4/i386/openoffice.org-core-2.0.1-143.2.1.i386.rpm: [Errno 4] Socket Error: timed out

こりは困ったなあ、と思ってたが、どうやらyum.confの設定で"timeout" という隠しオプションがあるらしい。

[root@vtc060229 ~]# vi /etc/yum.conf
[root@vtc060229 ~]# more /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1

#単位は秒。
timeout=7200

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

というわけでなんとかアップデートができました。