debian10国内镜像

国内使用debian 10的软件仓库地址

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Debian 10 buster

# 中科大源

deb http://mirrors.ustc.edu.cn/debian buster main contrib non-free
deb http://mirrors.ustc.edu.cn/debian buster-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian buster-backports main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free

# deb-src http://mirrors.ustc.edu.cn/debian buster main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian buster-updates main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian buster-backports main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free

# 官方源

# deb http://deb.debian.org/debian buster main contrib non-free
# deb http://deb.debian.org/debian buster-updates main contrib non-free
# deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free

# deb-src http://deb.debian.org/debian buster main contrib non-free
# deb-src http://deb.debian.org/debian buster-updates main contrib non-free
# deb-src http://deb.debian.org/debian-security/ buster/updates main contrib non-free

# 网易源

# deb http://mirrors.163.com/debian/ buster main non-free contrib
# deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
# deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
# deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib

# deb-src http://mirrors.163.com/debian/ buster main non-free contrib
# deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
# deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
# deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib

# 阿里云

# deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
# deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
# deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
# deb http://mirrors.aliyun.com/debian-security buster/updates main

# deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
# deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
# deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
# deb-src http://mirrors.aliyun.com/debian-security buster/updates main

debian包管理器使用手册

debian包的构成

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# 列出deb包中的内容
$ ar t dpkg_1.19.7_amd64.deb
debian-binary
control.tar.gz
data.tar.xz
# 解压缩deb安装包
$ ar x dpkg_1.19.7_amd64.deb
$ ls
control.tar.gz data.tar.xz debian-binary dpkg_1.19.7_amd64.deb
# 查看data.tar.xz包中的文件列表,并选择只展示前面的16行
$ tar tJf data.tar.xz | head -n 16
./
./
./etc/
./etc/alternatives/
./etc/alternatives/README
./etc/cron.daily/
./etc/cron.daily/dpkg
./etc/dpkg/
./etc/dpkg/dpkg.cfg
./etc/dpkg/dpkg.cfg.d/
./etc/logrotate.d/
./etc/logrotate.d/alternatives
./etc/logrotate.d/dpkg
./sbin/
./sbin/start-stop-daemon
./usr/
./usr/bin/
# 查看control.tar.xz包中的内容
tar xJf control.tar.xz
./
./conffiles
./control
./md5sums
./postinst
./postrm
# 查看文件内容
cat debian-binary
2.0

由此可见,Debian的deb存档格式主要由三个文件组成:

  • debian-binary
    用来标识deb文件包的格式版本的文本文件,在Buster发行版中仍然是2.0。
  • control.tar.xz
    这个档案里面包含了所有的元信息,比如说包名和版本,以及一些安装之前或者中途或者之后的执行脚本。其中的一些元信息甚至允许包管理器工具根据包中列举出的文件是否已经安装或者有些文件是否已经被本地修改来决定能否安装或者卸载该软件。
  • data.tar.xz,data.tar.bz2,data.tar.gz
    这个档案中包含了所有将会从包中提取出来的文件,比如可执行文件,类库,文档等等。该档案可以使用不同的压缩格式,相应的,档案的名字也会根据压缩类型选择合适的后缀,比如xzbzip2gzip

    软件包元信息

APT工具

  • 查看系统所有已经安装好包和对应的版本
    1
    $ apt-show-versions

https://www.debian.org/doc/manuals/debian-handbook/apt.zh-cn.html
未完待续…