Debian、Ubuntu 源列表说明

转载:http://forum.ubuntu.org.cn/viewtopic.php?t=366506php

概貌:
源列表主文件为 /etc/apt/sources.list,另兼取 /etc/apt/sources.list.d/*,最终结果以并集论。
源列表文件以行为单位,每行分多个字段,字段间以空白符分隔。井号(#)开头行为注释行。
ubuntu


字段说明:
第一字段,指示包类型。
取值只有「deb」「deb-src」两个,分别对应二进制包和源码包。一般只有二进制包对咱们有用。
第二字段,指示镜像站点,即「源」!
URL 一般须要定位到某个目录,通常是打开该目录就能看到有「dists」「pool」两个子目录。看看
http://ftp.cn.debian.org/debianhttp://ftp.sjtu.edu.cn/ubuntu/
第三字段,指示包的「版本」,姑且称为「仓库」。
打开一个源,再进入「dists」子目录可见该「源」中有哪些「版本」可用,就是那些子目录。一般都是大小版本用减号(-)连在一块儿命名。
很明显大版本号即系统的版本名称,好比「squeeze」「wheezy」。没有减号链接小版本的就是主版本。
Debian 的小版本名称自 squeeze 起与 Ubuntu 基本相同。除主版本外,小版本有
「security」,Ubuntu 用于指安全性更新。即影响系统安全的 bug 修补。对此,Debian 特殊一些,见下文。
「updates」,非安全性更新。即不影响到系统安全的 bug 修补。
「proposed-updates」,预更新。小 beta 版。事后会进入「updates」或「security」。Ubuntu 仅用「proposed」,无后缀「updates」。
「backports」,后备。某系统版本自正式发行后,其全部软件便会冻结版本号(按原始软件发布时间论),全部软件只修 bug,不增长任何功能。但有些人可能须要更新的版本所提供的新功能,甚至某些较新的软件根本就没有。该仓库正所以而设,但欠官方维护,且可能在系统正式发布以后过一段时间才有效。此仓库版本处于第二优先顺序,除非特别指明或原来没有的软件,不然不会被安装。其他版本都处于第一优先顺序。
后续字段,指示包许可类型。
后续字段排名不分前后,最终结果取其并集。
按包自己的许可及所直接依赖的包的许可划分。打开一个源,进入「dists」子目录,而后再进入某个版本目录,又可见几个子目录。
Debian 最多有三种
「main」,自己是自由软件,且全部直接依赖的包也都是自由软件。
「contrib」,自己是自由软件,但直接依赖的包中有某个是非自由软件。
「non-free」,自己并不是自由软件,不管依赖如何。固然,该软件自己是能够无偿使用的。
Ubuntu 最多有四种
「main」,官方维护的自由软件。
「universe」,社区维护的自由软件。
「restricted」,设备专有驱动。
「multiverse」,同 Debian 的「non-free」。
某些另类的第三方源,不排除存在上述几种以外的可能。总之,打开仓库目录本身看。
特别之处:
Debian 安全性更新
不像 Ubuntu 放在「security」仓库,而是放在单独一个源中。各大镜像站一般都把通常的包放在根下来一级的「debian」目录中,而安全性更新则会放在「debian-security」目录中,若是有的话。
Debian 官方建议,全部安全性更新,只从官方(
http://security.debian.org/debian-security)更新,不要用其它的镜像站,除非你对它很是放心。
安全性更新的第三字段形式固定为「版本名/updates」,好比「squeeze/updates」「wheezy/updates」。
Debian 多媒体源
一些多媒体软件因牵涉到版权问题,Debian 官方并未收录,有一网站专门填补该空缺,见
http://www.deb-multimedia.org
最后忠告:
不要启用太多的源,同一「版本」的源启用一个便可,不然容易引发混乱。
实例:
Debian 7 wheezy
安全

#deb http://ftp.tw.debian.org/debian wheezy main contrib non-free
#deb http://security.debian.org/debian-security wheezy/updates main contrib non-free
#deb http://ftp.tw.debian.org/debian wheezy-updates main contrib non-free
## deb http://ftp.tw.debian.org/debian wheezy-proposed-updates main contrib non-free
#deb http://ftp.tw.debian.org/debian-multimedia wheezy main non-free
#deb http://ftp.tw.debian.org/debian wheezy-backports main contrib non-free
deb http://ftp.cn.debian.org/debian wheezy main contrib non-free
deb http://ftp.cn.debian.org/debian-security wheezy/updates main contrib non-free
deb http://ftp.cn.debian.org/debian wheezy-updates main contrib non-free
# deb http://ftp.cn.debian.org/debian wheezy-proposed-updates main contrib non-free
deb http://ftp.cn.debian.org/debian-multimedia wheezy main non-free
deb http://ftp.cn.debian.org/debian wheezy-backports main contrib non-free
#deb http://ftp.sjtu.edu.cn/debian wheezy main contrib non-free
#deb http://security.debian.org/debian-security wheezy/updates main contrib non-free
#deb http://ftp.sjtu.edu.cn/debian wheezy-updates main contrib non-free
## deb http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main contrib non-free
#deb http://ftp.cn.debian.org/debian-multimedia wheezy main non-free
#deb http://ftp.sjtu.edu.cn/debian wheezy-backports main contrib non-free
#deb http://ftp.debian.org/debian wheezy main contrib non-free
#deb http://security.debian.org/debian-security wheezy/updates main contrib non-free
#deb http://ftp.debian.org/debian wheezy-updates main contrib non-free
## deb http://ftp.debian.org/debian wheezy-proposed-updates main contrib non-free
#deb http://www.deb-multimedia.org wheezy main non-free
#deb http://ftp.debian.org/debian wheezy-backports main contrib non-free

Ubuntu 13.04 raring网站

deb http://debian.ustc.edu.cn/ubuntu/ raring main universe restricted multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-security main universe restricted multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-updates main universe restricted multiverse
# deb http://debian.ustc.edu.cn/ubuntu/ raring-proposed main universe restricted multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-backports main universe restricted multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ raring main universe restricted multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ raring-security main universe restricted multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ raring-updates main universe restricted multiverse
## deb http://ftp.sjtu.edu.cn/ubuntu/ raring-proposed main universe restricted multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ raring-backports main universe restricted multiverse
#deb http://mirrors.163.com/ubuntu/ raring main universe restricted multiverse
#deb http://mirrors.163.com/ubuntu/ raring-security main universe restricted multiverse
#deb http://mirrors.163.com/ubuntu/ raring-updates main universe restricted multiverse
## deb http://mirrors.163.com/ubuntu/ raring-proposed main universe restricted multiverse
#deb http://mirrors.163.com/ubuntu/ raring-backports main universe restricted multiverse
相关文章
相关标签/搜索