「Debian」- 操作系统

认识

官网:https://www.debian.org/
文档:https://www.debian.org/doc/
仓库:https://github.com/debian

Debian is a complete Free Operating System! Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. Debian uses the kernel Linux (the kernel is the core of an OS), but most of the basic OS tools come from the GNU project. Thus we refer to Debian as a Debian GNU/Linux operating system, giving credit to all its main originators. Debian GNU/Linux provides much more than just the OS—a wide range of application software is included too. It comes with a total of over 118000 packages, precompiled software bundled up in a nice format for easy installation on your machine. 简而言之,Delian 是个 Linux 发行版。

组成

网络管理

Debian 就是 Debian,一如既往,将选择权交由用户,让用户选择自己的工具:

  • 我们能够通过修改配置文件的方式(/etc/network/interfaces)
  • 亦能自行安装网络管理工具(比如 NetworkManager、systemd-networkd 等等)

关于 Debian 的网络配置,参考官方文档:

# 03/28/2021 目前,针对 Debian 发行版,我们选择 NetworkManager 进行网络管理。但是,按照目前的态势,将来采用 systemd-networkd 的概率比较大。

软件仓库

APT,Debain 中默认的软件管理器。DEB 是 Debian 系统中的软件包文件格式,它包含了要安装的软件的二进制文件、配置文件和其他相关信息;

配置源,以提高应用的安装速度(可选):

cp /etc/apt/source.list /etc/apt/source.list.backup

cat > /etc/apt/source.list <<EOF
deb https://mirrors.aliyun.com/debian  stable main contrib non-free
deb https://mirrors.aliyun.com/debian  stable-updates main contrib non-free
EOF

apt-get update

Backports

性质

提供安全更新 | Getting Debian Security Updates

构建

版本历史

Debian version history – Wikipedia

Debian 6.0 (Squeeze)
Debian 7  (Wheezy)
Debian 8  (Jessie)
Debian 9  (Stretch)
Debian 10 (Buster)
Debian 11 (Bullseye)
Debian 12 (Bookworm)

安装系统

WIP

Debian 8.3 ⇒ Debian 10

How to Upgrade Debian 8 Jessie to Debian Linux 9 Stretch {safely}
How to upgrade Debian 9 to Debian 10 Buster using the CLI

问题描述

我们需要升级操作系统,对于跨版本升级,需要逐步进行。升级 Debian 8.3 到 Debian 9.13 版本,后来我们又升级到 Debian 10 版本。

该文档将记录:我们升级 Debian 8.3 到 Debian 9.13 到 Debian 10 版本的过程,并展示出通用的升级方法。

注意事项

1)在升级前,请先进行数据备份,防止系统升级失败或其他原因,而带来损失;
2)如果没有必要,不建议升级操作系统;
3)需要注意的事项及经验教训,参考 Updating your Operating System 笔记;

第一步、Debian 8.3 => Debian 9.13

# 更新系统,以使其为当前版本最新
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot

# 设置新的软件源
cat > /etc/apt/sources.list.d/debian-9.list
deb http://mirrors.tencentyun.com/debian stretch main contrib non-free
deb http://mirrors.tencentyun.com/debian stretch-updates main contrib non-free
deb http://mirrors.tencentyun.com/debian-security stretch/updates main
EOF

# 更新系统,以更新到新版本
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot

# 验证升级成功
lsb_release -d

第二步、Debian 9.13 => Debian 10

# 更新系统,以使其为当前版本最新
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot

# 设置新的软件源
cat > /etc/apt/sources.list.d/debian-10.list
deb http://mirrors.tencentyun.com/debian buster main contrib non-free
deb http://mirrors.tencentyun.com/debian buster-updates main contrib non-free
deb http://mirrors.tencentyun.com/debian-security buster/updates main
EOF

# 更新系统,以更新到新版本
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot

# 验证升级成功
lsb_release -d

注意事项

我们使用 mirrors.tencentyun.com 站点是因为我们的主机在腾讯云中,这里需要按需调整。如下为官方仓库:

deb http://httpredir.debian.org/debian stretch main contrib non-free
deb http://httpredir.debian.org/debian stretch-updates main contrib non-free
deb http://security.debian.org stretch/updates main contrib non-free

在升级过程中,总会遇到各种问题,需要根据实际情况处理。如果不能承担风险,或者处理突发问题存在困难,则不建议升级。

参考

debian/support
Debian GNU/Linux Installation Guide (amd64)