自動的に sources.lst を設定するスクリプト netselect-apt

| コメント(0) | トラックバック(0)

いつもすっかり忘れて調べなおしているのでメモメモ。

Debian Linux パッケージ導入のため、意図的にではなく単に最適なサーバーを選ぶのを自動化してくれるのが netselect パッケージに含まれる netselect-apt スクリプト。

testing とかをコマンドラインで指定すれば testing 向けの設定になるとか。今は sarge にしたてなのでしばらく stable でいいかしら。

APT HOWTO - 基本的な設定

2.3 sources.list ファイルに記述すべき最適なミラーサイトの決定: netselect, netselect-apt

(中略)
バージョン 0.3 から、netselect パッケージには netselect-apt というスクリプトが含まれるようになりました。これは上記の プロセスを自動的に行なってくれるものです。ディストリビューションの 種類 (デフォルトは stable) をパラメータとして実行するだけで、最適な main と non-US のミラーが記述された sources.list が生成され、 今いるディレクトリ内に配置されます。以下は、stable ディストリ ビューション用の sources.list を生成する例です。

bash$ ls sources.list
ls: sources.list: File or directory not found
bash$ netselect-apt stable
(...)
bash$ ls -l sources.list
sources.list
bash$

注記: sources.list ファイルは、コマンドを 実行したディレクトリ内に生成されます。その後、/etc/apt/ ディレクトリに移動しなければなりません。

以下、実行例。

almond:~# netselect-apt
Using distribution stable.
Retrieving the list of mirrors from www.debian.org...

--12:59:54-- http://www.debian.org/mirror/mirrors_full
=> `mirrors_full'
Resolving www.debian.org... 194.109.137.218
Connecting to www.debian.org[194.109.137.218]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 174,758 [text/html]

100%[====================================>] 174,758 75.97K/s

13:00:02 (75.86 KB/s) - `mirrors_full' saved [174758/174758]

Choosing a main Debian mirror using netselect.
netselect: unknown host dennou-t.ms.u-tokyo.ac.jp
netselect: unknown host debian.luxadmin.org
netselect: unknown host debian.psu.ru
netselect: unknown host ftp.lugs.org.sg
Running netselect to choose 1 out of 317 addresses.
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
......................
The fastest server seems to be:
http://203.174.65.26/archives/linux/debian/debian/

Choosing a non-US Debian mirror using netselect.
netselect: unknown host dennou-t.ms.u-tokyo.ac.jp
netselect: unknown host debian.luxadmin.org
netselect: unknown host debian.psu.ru
Running netselect to choose 1 out of 247 addresses.
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
..............................................
The fastest non-US server seems to be:
http://ftp.cl.debian.org/debian-non-US/

Writing sources.list.
Done.
almond:~#

トラックバック(0)

トラックバックURL: http://5net.com/mt/mt-tb.cgi/204

コメントする