search
HomeOperation and MaintenanceNginxUpgrading from Debian 11 to Debian 12
Upgrading from Debian 11 to Debian 12Jun 14, 2023 pm 05:23 PM
debian 12debian 11

从 Debian 11 升级到 Debian 12

Debian 12 Bookworm has been released. If you are using Debian 11 "Bullseye", now is the time to consider upgrading your computer or server. However, it is recommended that you wait for the first minor release of Debian "Bookworm", version 12.1, before doing critical server upgrades.

Having said that, if you want to know about the new features of Debian 12, you can check this article. Here are the detailed upgrade steps:

Upgrading from Debian 11 to Debian 12

Whether you are running Debian Server or any desktop version, make sure to back up critical data. For example, you may need to make a backup of your desktop documents. If it's a server, log the running services. You can do this using rsync or other utilities.

Debian 12 introduces a new repository called non-free-firmware for proprietary drivers and packages. If you use any "closed source" network, display, graphics or other drivers, you may need to configure them after upgrading.

For network drivers, be sure to log the contents of the /etc/network/interfaces and /etc/resolv.conf files somewhere securely. If you lose your network connection after the upgrade is complete, you can follow this guide to easily set it up.

Run the following command from the command prompt to ensure that Debian 11 has updated security and other packages:

sudo apt updatesudo apt upgradesudo apt full-upgradesudo apt autoremove

After completing the above command, restart the Debian 11 system:

sudo systemctl reboot

Write down some information about Debian 11. This is important for servers. They include kernel versions and Debian versions. This is because after upgrading, you can verify the same command below to ensure the upgrade was successful.

For example, the system I am trying to upgrade is Debian 11.7 and the kernel version is 5.10.

uname -mr

Sample output:

5.10.0-23-amd64 x86_64
cat /etc/debian_version

Sample output:

11.7

Back up the APT source files to any directory of your choice:

sudo cp -v /etc/apt/sources.list /home/arindam/sudo cp -vr /etc/apt/sources.list.d/ /home/arindam/

Open /etc/apt/sources.list file and add the Debian 12 codename bookworm to the file, replacing bullseye.

sudo nano /etc/apt/sources.list

The following is the /etc/apt/sources.list file in my test system The content of before the change is used as a reference:

deb http://deb.debian.org/debian/ bullseye maindeb-src http://deb.debian.org/debian/ bullseye maindeb http://security.debian.org/debian-security bullseye-security maindeb-src http://security.debian.org/debian-security bullseye-security maindeb http://deb.debian.org/debian/ bullseye-updates maindeb-src http://deb.debian.org/debian/ bullseye-updates main

The following It is the /etc/apt/sources.list file after the change. The following mirror URLs are the default settings. If you use different Debian mirrors, please do not change them:

deb http://deb.debian.org/debian/ bookworm maindeb-src http://deb.debian.org/debian/ bookworm maindeb http://security.debian.org/debian-security bookworm-security maindeb-src http://security.debian.org/debian-security bookworm-security maindeb http://deb.debian.org/debian/ bookworm-updates maindeb-src http://deb.debian.org/debian/ bookworm-updates maindeb http://deb.debian.org/debian bookworm non-free non-free-firmwaredeb-src http://deb.debian.org/debian bookworm non-free non-free-firmwaredeb http://deb.debian.org/debian-security bookworm-security non-free non-free-firmwaredeb-src http://deb.debian.org/debian-security bookworm-security non-free non-free-firmwaredeb http://deb.debian.org/debian bookworm-updates non-free non-free-firmwaredeb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware

从 Debian 11 升级到 Debian 12

##Update source files

Note

: Starting with Debian 12 “Bookworm”, the Debian team created a new repository non-free-firmware to package non-free software packages. Therefore, they are also included in the last three sections in the example above. Save the file and exit.

Open a terminal and run the following command to start the upgrade process:

sudo apt updatesudo apt full-upgrade

升级过程

从 Debian 11 升级到 Debian 12

Debian 12 升级过程进行中

在升级过程中,安装程序可能会要求你重新启动几个服务。仔细阅读消息后点击 “Yes”。另外,如果你看到带有 : 的提示,请按 q 键退出该消息。

从 Debian 11 升级到 Debian 12

确认服务验证

等待软件包下载和安装完成。

升级完成后,请重新启动你的 Debian 桌面或服务器:

sudo systemctl reboot

检查升级状态

重启后,请验证你是否正在运行 Debian 12。可以使用以下文件检查 Debian 版本:

cat /etc/debian_version

示例输出:

从 Debian 11 升级到 Debian 12

Debian 12 Bookworm Desktop (Xfce)

此外,如果你刚刚升级到 Debian 12 服务器,请确保验证正在运行的服务,例如 HTTP、SSH 等。你可以使用以下 systemd 命令 了解正在运行的服务:

systemctl list-units --type=service

总结和清理

在确认所有步骤都已完成后,你可能希望运行 apt autoremove 命令来清理不需要的软件包。但是,请在执行此操作时格外小心。

sudo apt --purge autoremove

这就是升级到 Debian 12 的简要步骤。希望你的升级顺利进行。请勿立即将关键的 Debian 11 服务器升级,等待 Debian 12.1 发布后再行操作。

有关 Debian 升级的更多信息,请访问 官方文档

最后,请别忘了告诉我们你的升级情况。

The above is the detailed content of Upgrading from Debian 11 to Debian 12. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
What is the standard monitoring port of nginxWhat is the standard monitoring port of nginxMar 05, 2025 pm 03:18 PM

This article explains that Nginx lacks a standard monitoring port. Monitoring relies on methods like the stub_status module (accessed via existing HTTP ports) or external tools (Prometheus, Nagios, etc.) using various techniques including HTTP APIs

How do I configure Nginx for server-side includes (SSI)?How do I configure Nginx for server-side includes (SSI)?Mar 17, 2025 pm 05:06 PM

The article discusses configuring Nginx for server-side includes (SSI), performance implications, using SSI for dynamic content, and troubleshooting common SSI issues in Nginx.Word count: 159

nginx listens to different port configurations to access different projectsnginx listens to different port configurations to access different projectsMar 05, 2025 pm 03:22 PM

This article details configuring Nginx to serve multiple projects from different ports on a single server using multiple server blocks. It emphasizes efficiency over running multiple Nginx instances and provides best practices for managing configura

Solution to reload error report by nginx restart commandSolution to reload error report by nginx restart commandMar 05, 2025 pm 03:09 PM

Nginx reload failures stem from configuration file errors. Troubleshooting involves examining the error log for syntax issues, conflicts, permission problems, or resource exhaustion. Solutions include correcting syntax, resolving conflicts, and ens

How to monitor nginx service statusHow to monitor nginx service statusMar 05, 2025 pm 03:17 PM

This article details methods for monitoring Nginx service status and performance. It covers using systemctl, ps, the Nginx status page, and various monitoring tools (Nagios, Zabbix, Prometheus, commercial options). Troubleshooting techniques using

nginx monitoring tool freenginx monitoring tool freeMar 05, 2025 pm 03:21 PM

This article explores free Nginx monitoring tools, comparing options like Prometheus/Grafana, Nagios, Zabbix, and StatsD/Graphite. It emphasizes tool selection based on technical expertise and highlights key metrics (RPS, request time, CPU/memory u

How to specify configuration file for nginx restart commandHow to specify configuration file for nginx restart commandMar 05, 2025 pm 03:08 PM

This article explains how to restart Nginx using a specific configuration file via the -c flag, contrasting this with restarting using the default configuration. It highlights the benefits of using custom configuration files for testing, managing m

What contents of zabbix monitor nginxWhat contents of zabbix monitor nginxMar 05, 2025 pm 03:19 PM

This article details Zabbix's Nginx monitoring capabilities. It discusses key performance indicators (KPIs) like connection, request, and caching metrics, worker process status, and upstream server health. The article emphasizes effective alert co

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment