在debian下,用apt方式安装软件除了可以以网络上的资源为源之外,还可以使用本地的资源。下面我就以安装GCC的过程为例,说一下整个过程。
平台:debian 4.0 图形界面
资源:CD一张 debian-40r0-i386-CD-1.iso刻录的
增加光盘源
使用命令#apt-cdrom add
系统会提示将你要添加为源的光盘放入光驱
然后enter继续,就自动添加好了
Debian 4 Source List | |
#?-:nbsp; | |
#?-:nbsp; | |
|
Uubuntu和debian都有很多的源和镜像,也有不少的国内镜像。一些爱好者为了寻找镜像已经自己“憋”出来了一些pl脚本用于寻找最快的镜像。实际上debian的爱好者早准备了更厉害的武器等你来用,就是apt-spy(是间谍还是小偷?哈哈)
切记先备份你机器里的源列表。
误区:通常大家都在交流使用国内的哪个源速度比较快,实际上很多国外源的访问速度是国内的很多倍。
记得曾经用过国外某大学的源,速度是200k以上。日本的部分源可以达到500k以上。
最近发现台湾的主镜像在我这里下载速度居然是1084k,达到1M每秒。
不忙的时候,试试看,如果时间够多,可以考虑不限定为亚洲,这样有可能找到更快的镜像源。
转自官方的一部分说明:
`apt-spy'会根据站点回应时间和带宽自动创建`sources.list'。
#sudo apt-get install apt-spy
#sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak //backup
#man apt-spy //获取详细的使用方法
#sudo apt-spy update //更新您的镜像列表文件 /var/lib/apt-spy/mirrors.txt
#sudo apt-spy -d testing -a Asia
//在亚洲区寻找速度最快的testing版镜像,并生成 sources.list文件,也可使用 -o 参数指定写入文件
http://debian.cn99.com/
网站上有source.list文件下载
sources.list.etch | 2008-Apr-28 20:24:30 | 0.4K | application/octet-stream |
sources.list.hardy | 2008-Apr-28 20:18:30 | 0.8K | application/octet-stream |
deb http://debian.cn99.com/debian-security/ etch/updates main contrib
deb-src http://debian.cn99.com/debian-security/ etch/updates main contrib
deb http://security.debian.org/ sarge/updates main contrib non-free
deb http://debian.ustc.edu.cn/debian proposed-updates main contrib non-free
deb http://debian.ustc.edu.cn/debian-security stable/updates main
deb file:/var/cache/apt-build/repository/ apt-build main
deb http://security.debian.org/ testing/updates main contrib
deb http://mirrors.geekbone.org/debian/ sarge non-free main contrib
#安装过程的标准源
deb http://mirrors.geekbone.org/debian/ etch main
deb-src http://mirrors.geekbone.org/debian/ etch main
美国用户常使用的:
来源:http://www.geocities.com/reverendsky/sourceslist.txt
# /etc/apt/sources.list
# Sun's Java is now in the Official Debian Unstable non-free repo.
# The AMD-64 repositories from Debian are now in the normal Sid repos.
# I run Debian Sid, however this list covers Stable, Testing and Sid
# please use only the repos that apply to your release.
############
## Sid ####
###########
#####(My Debian Sid/Sidux sources.list)###########
# Unstable Sid
deb http://http.us.debian.org/debian/ unstable main contrib non-free
# Unstable Sources
deb-src http://http.us.debian.org/debian/ unstable main contrib non-free
# sidux http://sidux.com/files/misc/sources.list
deb http://sidux.com/debian/ sid main contrib non-free firmware fix.main fix.contrib fix.non-free
deb-src http://sidux.com/debian/ sid main contrib non-free firmware fix.main fix.contrib fix.non-free
# Marillat For info visit http://www.debian-multimedia.org
# Unstable
deb http://www.debian-multimedia.org sid main
#deb-src http://www.debian-multimedia.org sid main
# Experimental Staging
# deb http://www.debian-multimedia.org experimental mai#
# Marillat Mirror
# deb http://debian.three-dimensional.net/debian-multimedia/ unstable main
# deb-src http://debian.three-dimensional.net/debian-multimedia/ unstable mainn
#xadras sidux repo -siduxcc, autostart,sidux-kio,klamp,
#kding,kirocker,kio-sysinfo
# http://xadras.wordpress.com/downloads/
# Secure apt install xadras-keyring
#deb http://sidux.wuertz.org sid main
#deb-src http://sidux.wuertz.org sid main
# Cathbards sidux/Debian artwork repo
# http://www.cathbard.com/
# deb ftp://cathbard.com/ ./
# Shame's Compiz Fusion for Debian Sid/sidux
# For more info see: http://www.linuxsmokersclub.com/?p=95
# deb http://download.tuxfamily.org/shames/debian-sid/desktopfx/unstable/ ./
----------------------------------------------------------------
http://www.eifr.com/article.php?id=430