【轉】關於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