版本历史
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)
相关链接
debian/support
Debian GNU/Linux Installation Guide (amd64)
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
在升级过程中,总会遇到各种问题,需要根据实际情况处理。如果不能承担风险,或者处理突发问题存在困难,则不建议升级。