2008/06/26

CentOS 5.2リリース記念!BittorrentでDVD ISO imageをdownload

つい先日、CentOS-Announce MLでCentOS5.2のリリースが発表されました。
From: Karanbir Singh <email address for Karanbir>
To: email address for centos-announce
Date: Tue, 24 Jun 2008 13:22:03 +0100


We are pleased to announce the immediate availability of CentOS-5.2 for the i386 and x86_64 Architectures.
CentOS 5を使用している場合は、
Updating from CentOS-5.0 and 5.1

If you are already running CentOS-5 ( either 5.0 or 5.1 ), all you need to do is run : "yum upgrade" on your machine, and that will bring in the new packages from 5.2 and update your machine.
とこのメールにある通り、yum upgradeコマンド一発でアップグレード可能だ(手元の環境では未検証)

早速CentOS 5.2のローカルミラーリポジトリを作成するべく作業中(作成方法については、『ローカルミラーレポジトリ・その1・概要』参照)

CentOS 5.2のISOイメージは、FTP・HTTPでもダウンロード可能だが、
Download Instructions:

First a request from us : When possible, consider using torrents to run the downloads.
とある通り、bittorrentの使用が推奨されている。

しかし、CentOS 5にはbittorrentクライアントが準備されていない。自前でコンパイルしてDVD ISOイメージを入手する。

まず、作業ディレクトリを準備して、Enhanced CTorrentのtar ballをダウンロードする。
$ cd /some/where
$ wget 'http://downloads.sourceforge.net/dtorrent/ctorrent-dnh3.3.2.tar.gz?modtime=1213477987&big_mirror=0&filesize=219053'
--09:51:40-- http://downloads.sourceforge.net/dtorrent/ctorrent-dnh3.3.2.tar.gz?modtime=1213477987&big_mirror=0&filesize=219053
Resolving downloads.sourceforge.net... 216.34.181.60
Connecting to downloads.sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://nchc.dl.sourceforge.net/sourceforge/dtorrent/ctorrent-dnh3.3.2.tar.gz [following]
--09:51:42-- http://nchc.dl.sourceforge.net/sourceforge/dtorrent/ctorrent-dnh3.3.2.tar.gz
Resolving nchc.dl.sourceforge.net... 211.79.60.17, 2001:e10:ffff:1f02::17
Connecting to nchc.dl.sourceforge.net|211.79.60.17|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 219053 (214K) [application/x-gzip]
Saving to: `ctorrent-dnh3.3.2.tar.gz'

100%[=======================================>] 219,053 97.2K/s in 2.2s

09:51:45 (97.2 KB/s) - `ctorrent-dnh3.3.2.tar.gz' saved [219053/219053]

$
これを展開、し、configure & make
$ tar xvzf ctorrent-dnh3.3.2.tar.gz
ctorrent-dnh3.3.2/
ctorrent-dnh3.3.2/rate.h
ctorrent-dnh3.3.2/tracker.h
<<略>>
ctorrent-dnh3.3.2/install-sh
ctorrent-dnh3.3.2/btfiles.h
ctorrent-dnh3.3.2/sigint.cpp
$ cd ctorrent-dnh3.3.2
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
<<略>>
config.status: WARNING: Makefile.in seems to ignore the --datarootdir setting
config.status: creating config.h
config.status: executing depfiles commands
$ make > make.log 2>&1&
[1] 16130
$
しばらく時間がかかる。
この作業が終わったら、rootになってmake installを実行する(あるいは、インストールせずに、作成された実行ファイル./ctorrentを直接実行してもよい)
# cd /some/where
# make install
make[1]: Entering directory `/some/where/ctorrent-dnh3.3.2'
test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin"
/usr/bin/install -c 'ctorrent' '/usr/local/bin/ctorrent'
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/some/where/ctorrent-dnh3.3.2'
#


Bittorrentを使う場合、トラッカー情報の入った.torrentファイルが必要になるので、これをダウンロードする。
$ wget 'http://ftp.yz.yamagata-u.ac.jp/pub/linux/centos/5.2/isos/i386/CentOS-5.2-i386-bin-DVD.torrent'
--09:57:53-- http://ftp.yz.yamagata-u.ac.jp/pub/linux/centos/5.2/isos/i386/CentOS-5.2-i386-bin-DVD.torrent
Resolving ftp.yz.yamagata-u.ac.jp... 210.146.64.99, 133.24.255.161
Connecting to ftp.yz.yamagata-u.ac.jp|210.146.64.99|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 307060 (300K) [application/x-bittorrent]
Saving to: `CentOS-5.2-i386-bin-DVD.torrent'

100%[=======================================>] 307,060 96.3K/s in 3.1s

09:57:57 (96.3 KB/s) - `CentOS-5.2-i386-bin-DVD.torrent' saved [307060/307060]

$
これをctorrentの引数として渡すと、ファイル交換が始まる。Bittorrentは、P2Pなので、ダウンロードと同時にアップロードも行われる。
$ /usr/local/bin/ctorrent CentOS-5.2-i386-bin-DVD.torrent
META INFO
Announce: http://torrent.centos.org:6969/announce
Created On: Sat Jun 21 01:58:31 2008
Piece length: 262144
FILES INFO
Directory: CentOS-5.2-i386-bin-DVD
<1> CentOS-5.2-i386-bin-DVD.iso [4020600832]
<2> md5sum.txt [62]
<3> sha1sum.txt [70]
Total: 3834 MB
Found bit field file; verifying previous state.
Listening on 0.0.0.0:2706
Press 'h' or '?' for help (display/control client options).
Checking completed.
/ 54/46/101 [8767/15338/15338] 2195MB,1048MB | 78,15K/s | 85,5K E:0,19
warn, piece 13265 hash check failed.
- 44/19/101 [8913/15338/15338] 2232MB,1055MB | 87,17K/s | 80,16K E:0,19
warn, piece 7467 hash check failed.
- 43/17/101 [9003/15338/15338] 2255MB,1058MB | 91,13K/s | 16,0K E:0,19
warn, piece 4436 hash check failed.
| 56/27/101 [15337/15338/15338] 3839MB,2056MB | 95,5K/s | 16,0K E:0,31
Download complete.
Total time used: 909 minutes.
Seed for others 72 hours
| 0/10/101 [15338/15338/15338] 3839MB,2274MB | 0,32K/s | 0,32K E:0,36 Connected
warn, received nothing from tracker!
- 0/12/101 [15338/15338/15338] 3839MB,2373MB | 0,18K/s | 0,16K E:0,38 Connectin
warn, received nothing from tracker!
\ 0/18/101 [15338/15338/15338] 3839MB,2385MB | 0,19K/s | 0,40K E:0,39Q
Quit: Are you sure? y
- 0/17/101 [15338/15338/15338] 3839MB,2386MB | 0,25K/s | 0,16K E:0,39 Quitting

$
念のため、チェックサムを確認する。
$ cd CentOS-5.2-i386-bin-DVD
$ cat sha1sum.txt
c89db7f5294465d593e7b02c232e0e9070111487 CentOS-5.2-i386-bin-DVD.iso
$ sha1sum CentOS-5.2-i386-bin-DVD.iso
c89db7f5294465d593e7b02c232e0e9070111487 CentOS-5.2-i386-bin-DVD.iso
$ cat md5sum.txt
1539bad48e984ae1441052dc074c0995 CentOS-5.2-i386-bin-DVD.iso
$ md5sum CentOS-5.2-i386-bin-DVD.iso
1539bad48e984ae1441052dc074c0995 CentOS-5.2-i386-bin-DVD.iso
$

0 件のコメント: