Debian 源的设置

作者: Hily 原始链接: http://hily.me/blog/2008/11/debian-mirrors-select/
版权声明:可以转载,转载时务必以超链接形式标明文章 原始出处和 作者信息及 版权声明
用了几年 cn99 的源,现在 cn99 挂了,设置起源就比较麻烦了,不知道到底哪个源比较快了。还好有了 apt-spy,可以自动测试到哪个源的下载速度最快。
当然,刚装完系统时是没有 apt-spy 的,这时候我们可以暂时先找个可用的源代替,如(写在 /etc/apt/sources.list 中):
deb http://http.us.debian.org/debian/ stable main
执行以下命令更新软件包列表:
apt-get update
然后执行以下命令安装 apt-spy:
apt-get install apt-spy
从源上下载一份源的镜像列表( http://http.us.debian.org/debian/README.mirrors.txt):
apt-spy update
测试亚洲地区的源的速度,并自动写入 sources.list:
apt-spy -d unstable -a asia -t 5
最终,sources.list 内容为:
deb http://ftp.hk.debian.org/debian/ stable main
deb-src http://ftp.hk.debian.org/debian/ stable main
deb http://security.debian.org/ stable/updates main

注:apt-spy -d unstable -a asia -t 5中的unstable是指不稳定版的软件包列表;
可以用stable来更新稳定版的软件列表,还可以用testing来更新测试版的软件列表,这就看你自己的需要了。

你可能感兴趣的:(Debian,职场,设置,源,休闲)