debian10 glibc是2.28,debian11 glibc是2.31
debian 11 (Bullseye) is the new stable version of the Debian Linux operating system, which offers a wide range of updated software packages. Best of all, it comes with five years of support. This article explains how to upgrade an existing Debian 10 server to Debian 11.
Step 1: Update Existing Server Packages
SSH to the server as a regular user with sudo privileges.
It's good practice to update your existing server packages, security patches, and necessary upgrades before making the switch from Debian 10 to ensure your applications are compatible with Debian 11.
Update the available packages.
$ sudo apt update
Upgrade all the existing packages.
$ sudo
apt upgrade
Remove any unnecessary dependency files.
$ sudo
apt autoremove
Step 2: Back Up the Server
Before upgrading to Debian 11, make a backup of your current server status in case things go wrong. You can do this by creating a snapshot of your server.
Log in to your Vultr account.
Select Snapshots from the Products menu.
Click Add Snapshot, then choose your target server.
Assign a custom label.
Click Take Snapshot to begin the backup process.
The snapshot process will start, and depending on your server size, it may take between five and ten minutes to complete. When finished, the status changes from pending to available.
snapshot
Step 3: Change the Debian Sources
Aptitude (Apt) downloads packages from one or more repositories for installation on your server. It finds the correct repositories, available packages, and versions to download in /etc/apt/sources.list. So, you need to replace all Debian 10 codenames with Debian 11 codenames in /etc/apt/sources.list.
Confirm the Debian 10 codename by running the following command. Debian 10 is codenamed buster.
$ lsb_release -a
Your output should be:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Change all buster entries in the sources list to bullseye, which is the codename for Debian 11.
Back up the original configuration files to your home directory.
$ sudo
cp /etc/apt/sources.list ~/sources.bak
$ sudo
cp -r /etc/apt/sources.list.d/ ~/sources.list.d.bak
Open /etc/apt/sources.list in your favorite editor.
$ sudo
vi /etc/apt/sources.list
The current entries should look like this:
deb
http://deb.debian.org/debian/ buster main
deb-src
http://deb.debian.org/debian/ buster main
deb
http://security.debian.org/debian-security buster/updates main
deb-src
http://security.debian.org/debian-security buster/updates main
# buster-updates, previously known as 'volatile'
deb
http://deb.debian.org/debian/ buster-updates main
deb-src
http://deb.debian.org/debian/ buster-updates main
Replace those lines with:
deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main
deb http://security.debian.org/ bullseye-security main
deb-src http://security.debian.org/ bullseye-security main
deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main
Save and close the file.
Update the package list a second time. If you made the changes correctly, there won't be any errors displayed during the update process.
$ sudo
apt update
Perform a system upgrade. Use the --without-new-pkgs flag to avoid removing the packages you intend to keep on your server.
$ (sudo
apt upgrade --without-new-pkgs)
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' --ignore-missing --without-new-pkgs -fy upgrade
You will be prompted to restart specific services or to keep and erase specific config options. Answer yes.
After the apt-listchanges package is installed it will display information about the upgraded packages. Type Q to exit the pager.
Select a console encoding set, and continue with other upgrades.
Step 3: Upgrade Debian
Now you can safely run a full upgrade to Debian 11 with the following command:
$ sudo
apt full-upgrade
This will run a full upgrade of the server from Debian 10 to Debian 11, resolve possible dependencies changes, install the newest versions of all packages, and remove any obsolete packages. During the system upgrade process, additional prompts may be displayed to restart services and update existing configuration options. Be sure to select appropriate choices to avoid unwanted changes to existing applications.
When a pager indicator : is displayed, type Q to continue.
Type Y when prompted to modify /etc/sysctl.conf.
Configuration file '/etc/sysctl.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
Step 4: Reboot the Server
After the system upgrade is complete, restart your server for changes to take effect.
$ sudo
reboot now
Your current SSH connection will be dropped.
Wait for a minute for the server to reboot.
Log in through SSH.
Check the current operating system version and verify it shows Debian 11, bullseye.
$
lsb_release -a
Output:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
原文:
https://docs.vultr.com/how-to-upgrade-from-debian-10-to-debian-11
参考:
https://wiki.debian.org/DebianUpgrade
centos7安装glibc-2.29
http://trustcomputing.com.cn/bbs/viewthread.php?tid=2035
[
本帖最后由 linda 于 2024-7-9 17:09 编辑 ]