当前位置:首页 > 原创教程 > Debian 11 (Bullseye)升级Debian 12(bookworm)

Debian 11 (Bullseye)升级Debian 12(bookworm)

原创教程 / 星之宇 / 2024-4-27 15:06 / 浏览:406 / 评论:0

Debian的稳定版已经到了12版本(bookworm)于2023年06月10日发布最初版本,当前在2024年02月10日更新到12.5,已经发布了2个对月了,可以开始更新到12.5版本了。


1、备份文件

升级系统对于备份文件是非常重要的,防止升级失败损坏文件,一般情况下虚拟化环境只要制作一个快照即可。


2、升级软件

2.1 更新包缓存和升级包到最新版本。

sudo apt update -y && sudo apt upgrade -y


2.2 查看当前系统信息

cat /etc/os-release

475-1.png


2.3 清理软件包(非必要请不要清理,容易出问题)

apt autoremove 


2.4 apt源配置,设置为Debian12的源

sudo sed -i 's|bullseye|bookworm|g' /etc/apt/sources.list

最终源文件如下(本文使用了阿里云的源):

deb http://mirrors.aliyun.com/debian/ bookworm main
deb-src http://mirrors.aliyun.com/debian/ bookworm main
deb http://mirrors.aliyun.com/debian-security/ bookworm-security main contrib
deb-src http://mirrors.aliyun.com/debian-security/ bookworm-security main contrib
deb http://mirrors.aliyun.com/debian/ bookworm-updates main
deb-src http://mirrors.aliyun.com/debian/ bookworm-updates main
deb http://mirrors.aliyun.com/debian/ bookworm-backports main
deb-src http://mirrors.aliyun.com/debian/ bookworm-backports main


3、执行升级

3.1 更新包缓存和升级包到Debian 12,这步会花费大量的时间。

sudo apt update -y && sudo apt upgrade -y


3.2 更新信息,多次按空格到最后,按q退出,等待一会儿即可安装。

475-2.png


3.3 弹出以下框的时候,选择yes回车,等待即可。

475-3.png


4、升级完成

4.1 查看系统版本

cat /etc/os-release

475-4.png


4.2 重启服务器(虽然不重启也没事,但是最好重启下)

reboot

目前有 0 条评论

    • 昵称
    • 邮箱
    • 网址