Debian 的 apt-spy

每个人都对速度有一定的要求吧,apt-spy就是用来加速升级和安装软件包的。

Debian安装源服务器有很多,apt-spy工具可以帮助我们找到最快的服务器。不同服务器的下载速度相差很远的,有的只有几k,而有的可以达到200-300k。象debian这样依赖网络的操作系统,找到一个快速稳定的安装源服务器是很重要的。

使用apt-get install apt-spy命令即可安装该工具。安装完成后,使用以下命令测试Debian安装源的下载速度。

debian:/etc# apt-spy -d unstable -a asia -t 5

SERVER: ftp.linuxforum.net
Benchmarking FTP...
                Error: a timeout was reached

SERVER: mirrors.geekbone.org
Benchmarking FTP...
                Downloaded 584136 bytes in 9.41 seconds
                Download speed: 60.64 kB/sec
Benchmarking HTTP...
                Downloaded 574808 bytes in 5.88 seconds
                Download speed: 95.52 kB/sec

SERVER: debian.cn99.com
Benchmarking FTP...
                Error: couldn't connect to host
Benchmarking HTTP...
                Downloaded 2434408 bytes in 5.14 seconds
                Download speed: 462.79 kB/sec
...

命令行中的-d选项指定发行版本,如stable、testing、unstable。-a选项指定debian安装源服务器的区域,如asia、Europe、North-America等。这些区域信息保存在/etc/apt-spy.conf文档中,如果要测试所有服务器,还可用ALL关健字代替具体的区域。-t选项指定连接超时阀值,阀值以秒为单位,设置较小的阀值能有效提高测试速度,忽略慢速服务器。

测试完成后,apt-spy会自动更新你的sources.list文件。apt-spy在更新你的sources.list前会备份一次sources.list文件,把原来的sources.list复制为sources.list.bak。但每运行一次apt-spy命令它都会生成一个新的sources.list.bak文件,把旧的sources.list.bak覆盖掉。所以在使用apt-spy命令前最好先备份好原来的sources.list文件。

2008年9月10日 | 归档于 Debian
标签:
本文目前尚无任何评论.

发表评论

XHTML: 您可以使用这些标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>