办公室一台弄过来的电脑
装了debian6.0
debian/ubuntu 是好东西,也是我平时用的最多的linux
apt给人们带来的很大的方便
总是找源的问题
还是不想麻烦了,以后就用apt-spy解决找源
到这里去下载对应的版本http://packages.debian.org/sid/i386/apt-spy/download
下好后
apt-spy -d unstable -a asia -t 5
……………………………………………………………………………………………………
Tips
* To retrieve the latest list of Debian mirrors, run (as root)
# apt-spy update
* To find the fastest mirror in North America for testing, run
# apt-spy -d testing -a north-america
* To find the fastest mirror in Germany for stable, run
# apt-spy -d stable -s de
FAQ’s
Q. What are the region (-d argument) codes?
A. africa, asia, europe, north-america, oceania, and south-america
Q. What if I want apt-spy to only text x mirrors?
A. Add the argument -e x. For example, apt-spy -d unstable -a asia -e 5 would test 5 mirrors hosting unstable, and located in Asia.
把sources.list覆盖
#cat /etc/apt/sources.list.d/apt-spy.list > /etc/apt/sources.list
接下来想把这两条命令写到一个bash里,并用cron每天执行一次
#vim /root/renewapt.sh
#for update /etc/sources.list using apt-spy
#!/bin/bash
apt-spy update
apt-spy -d unstable -a asia -t 5
cat /etc/apt/sources.list.d/apt-spy.list > /etc/apt/sources.list
#crontab -e
0 0 * * * bash /root/renewapt.sh
Leave a Reply