涉及的基本配置文件:apt核心配置文件集中在 /etc/apt其中,管理软件来源的配置文件如下 sources.list // 主要软件源 sources.list.d/*.list // 个别软件的源 preferences // 控制文件,具体用法参见 man apt_preferences.list文件的基本语法deb uri distribution [component1] [component2] [...]uri apt源的网络地址distribution 对于Debian就是stable/testing/unstable/experimental,Ubuntu是
feisty/dapper/等
component main/contrib/non-free 配置优化的依据使用synaptic/aptitude升级或者下载软件时,包管理系统为每个apt源地址建立一个下载的线程component是.list文件基本配置语法中涉及的最小单位,uri>distribution>component;当且仅当uri,distribution,component都相同时,两个component是相同的。
apt源是全球分布的,即uri的选择是最为丰富的具体技巧为每个component选择一个uri不同的component使用不同的uri最大的component使用最快的uri现实中优化的sources.list$cat sources.list# the main Debian packages.deb http://www.zentek-international.com/mirrors/debian/ experimental maindeb http://ftp.tw.debian.org/debian/ testing maindeb ftp://opensource.nchc.org.tw/debian/ testing contrib non-free优化后的效果