【转】关于apt源配置的问题


涉及的基本配置文件:

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 main

deb http://ftp.tw.debian.org/debian/ testing main

deb ftp://opensource.nchc.org.tw/debian/ testing contrib non-free


优化后的效果


 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM