%title缩略图

升级debian-11有感

因debian11终于趋于稳定,今天打算把本站系统镜像升级至最新。

平常喜欢更新内核,而本人要提示的是,追新虽然可以解决安全和错误修复等问题,但后期维护要始终保持自己更新内核,一般不建议手动更新内核,随着大版本更新而被动更新内核反而更安全。

说回正题,心血来潮从debian10 buster升级到11Bullseye正式版,升级完后又一并解决了随之带来的问题,并记录下整个安装过程和中间遇到的坑,给需要的朋友提供点思路和帮助。

当前系统版本:Debian10.10.0 kernel:4.19 网站架构:lnmp1.8 PHP7.4.19 nginx:1.20.0

升级后:Linux Debian GNU/Linux 11 (bullseye) 内核版本:5.10.0-8-amd64

Debian“bullseye”发行信息

Debian 11.0 已于 2021年08月14日 发布。此次发行包含了许多重要的变更,在我们的新闻稿发行说明有详细的介绍。

要取得与安装 Debian,请见安装信息页面与安装指南。要从较旧的 Debian 发行版升级,请见发行说明的操作指引。

升级前的准备工作

  • 升级过程非常快,但在这之前,采取一些预防措施是一个好的做法。特别是如果你正在升级一台生产服务器。
  • 对你的系统进行备份,包括所有重要的数据和文件。
  • 停止任何你可能已经启用的运行中的服务。升级完成后,你可以通过 systemctl 启动它们。这包括 Web 服务器、SSH 服务器、FTP 服务器或任何其他服务器。(这里不停止其实也可以,因为在重启前升级过程中并不会自动重启,只是相对于Linux最小化不可可视化操作而言,如果是桌面版本,可能在升级过程中需要重启多次)
  • 确保你的网络稳定。
  • 并为你的系统留出足够的停机时间。因为根据你的系统配置,Debian 版本升级需要时间大约在 1.5 小时到 2 小时之间,如果是从debian10旧版本升级上来,整个过程5分钟都不要。

将 Debian 10 Buster 升级到 11 Bullseye

确保你的系统是最新的,而且你的软件包列表是最新的。

sudo apt update && sudo apt upgrade 或 && sudo apt update apt-get upgrade -y && apt-get dist-upgrade -y

使用下面的命令安装 gcc-8-base 包。这是必须的,因为在历史上曾出现过升级失败的情况,这是因为下面的软件包中包含了某些依赖。(特别注意这里,别忘了提前安装好依赖,作者就因为少了这步走了不少冤枉路

sudo apt install gcc-8-base

接下来vim或nano

/etc/apt/sources.list,通过注释掉 Debian 10 buster 包,而使用 bullseye 仓库进行更新。

注释所有的 buster 仓库,在行的开头加上 #。或直接删除也可,后面不需要了。

在文末添加

deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main
deb http://ftp.debian.org/debian bullseye-backports main contrib non-free

更新一次系统仓库列表,以验证仓库的添加情况。

sudo apt update

如果上面的命令没有出现任何错误,那么你已经成功地添加了 bullseye 仓库。

现在,通过运行下面的命令开始升级过程。这可能会根据你的系统配置而有所不同。

sudo apt full-upgrade

接下来阅读安装说明,这里根据你的需求,会问你是否需要保留原配置,会有好几次会话窗口对话和配置选择,如无其他特殊情况,系统提示默认选择N即选N即可。配置完成开始升级,并自动设置,等待完成即可。如无意外,

重启系统。

systemctl reboot

重启后,清理旧的软件包。

sudo apt --purge autoremove

如果一切顺利,你应该看到了 Debian 11 bullseye。你可以用下面的命令来验证版本:

cat /etc/os-release

 

PRETTY_NAME=”Debian GNU/Linux 11 (bullseye)”
NAME=”Debian GNU/Linux”
VERSION_ID=”11″
VERSION=”11 (bullseye)”
VERSION_CODENAME=bullseye
ID=debian
HOME_URL=”https://www.debian.org/”
SUPPORT_URL=”https://www.debian.org/support”
BUG_REPORT_URL=”https://bugs.debian.org/”

或者lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

遇到的坑

Starting php-fpm /usr/local/php/sbin/php-fpm: error while loading shared libraries: libicuio.so.63: cannot open shared object file: No such file or directory
failed

注意看这里的错误提示,php-fpm影响到了。当升级完成,重启清理了旧的包后,我的服务,正常打开网站应该和原来一样,但php错误,打开网站提示502,查询PHP命令也会提示此错误,一开始我的想法是解决php-fpm进程占用,Kill它,结果还是一样的错误,并且进程是正常的存在,后又想到这治标不治本啊,路就走错了,得解决lib模块组件的问题,应该是缺失了文件。明确问题所在后,想办法解决此问题。理清思路是因为此动态链接库缺失libicuio.so.63,导致载入目录为空,php-fpm启动失败。

问题了解清楚后,我们来入手了解libicu,这是Linux里面的动态链接库,如果放到Windows里面,懂系统底层、搞软件开发的朋友应该了解,这就相当于运行库。这时,脑子里想到,软链接是否链接错误?ld.so.conf是它的配置文件,里面告知了ld.so的目录所在,

include /etc/ld.so.conf.d/*.conf

/lib
/usr/lib
/usr/lib64
/usr/local/lib

错误提示说目录不是不存在嘛,咱们来看看当前目录是否存在,目录在哪?请看上面载入的目录

/etc/ld.so.conf.d/

 

进去查看发现还有配置文件x86_64-linux-gnu.conf

# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

此文件指出x86_64-linux-gnu目录,而这个目录在哪,查找目录:find /(查找范围) -name ‘查找关键字’ -type d,查询到了确实有,而我们需要的libicuio.so.63并没有在里面,要去获取安装包手动下载安装下来,并且还得通过ldconfig配置好配置文件,而上面ld.so.conf已经把大目录列出,这里不必过于纠结,都在此目录下,咱们就不用增加绝对路径了,保持不变即可。

放上ldconfig详细使用教程

方法1:

# vim /etc/ld.so.conf      //在新的一行中加入库文件所在目录
  /usr/lib  

# ldconfig                 //更新/etc/ld.so.cache文件

方法2:

1.将用户用到的库统一放到一个目录,如 /usr/loca/lib
# cp libXXX.so.X /usr/loca/lib/           

2.向库配置文件中,写入库文件所在目录
# vim /etc/ld.so.conf.d/usr-libs.conf    
  /usr/local/lib  

3.更新/etc/ld.so.cache文件
# ldconfig  

这里采用第二种办法,它更为方便,对于原系统的改动也最小。而/etc/ld.so.conf的文件内容是include /etc/ld.so.conf.d/*.conf,所以在/etc/ld.so.conf.d目录下,加入任何以.conf为后缀的文件,都能被ld识别。

ld.so.cache的更新是递增式的,就像PATH系统环境变量一样,不是从头重新建立,而是向上累加。只有重新开机,系统才从零开始建立ld.so.cache文件。


现在去下载缺失的lib包

wget Index of /debian/pool/main/i/icu

apt-get install libicu63_63.2-3_amd64.deb

即可,当前我已经升到了11,所以列表里就选择了63对应的通用版本,现在最新的已经到了69版本,也不知道能不能直接装,系统提示需要63咱们就装63即可,后续可以通过apt更新。

现在,再重启一次php-fpm发现正常了,问题解决。

德比安 11靶眼释放

2021年8月14日

经过2年,1个月和9天的开发,德比安项目自豪地提出了其新的稳定版本11(代号牛眼),这将支持在未来5年感谢德比安安全团队德比安长期支持团队的组合工作。

Debian 11靶眼船具有多个桌面应用程序和环境。其中包括桌面环境:

  • 侏儒 3.38,
  • KDE 等离子体 5.20,
  • LXDE 11,
  • LXQt 0.16,
  • MATE 1.24,
  • Xfce 4.16.

本版本包含超过 11,294 个新封装,总数量为 59,551 个封装,同时显著减少了超过 9,519 个标记为过时和已删除的包。更新了42 821个包裹,5 434个包裹保持不变。

牛眼成为我们的第一个版本, 以提供 Linux 内核与支持 exfat 文件系统和默认使用它安装 exfat 文件系统。因此,不再需要使用通过外引信包提供的文件系统在用户空间实现。用于创建和检查 exFAT 文件系统的工具在外引件包中提供。

大多数现代打印机能够使用无人驾驶打印和扫描,而无需供应商特定(通常非免费)驱动程序。bulleye提出了一个新的包, ipp – usb, 它使用供应商中立的 Ipp 超过 Usb 协议, 由许多现代打印机支持。这允许 USB 设备被视为网络设备。官方的 SANE 无人驾驶后端由利巴内 1 中的理智 – escl 提供, 它使用 escl 协议。

牛眼中系统激活其持续的日志功能,默认情况下,与隐式回退到挥发性存储。这允许不依赖于特殊功能的用户卸载传统记录 daemons 并切换到仅使用系统日志。

Debian Med 团队一直通过包装软件参与对抗 COVID-19 的斗争,该软件用于在序列级别上研究病毒,并使用流行病学中使用的工具对抗大流行:这项工作将继续侧重于这两个领域的机器学习工具。团队与质量保证和持续集成的合作对于科学中所需的一致可重复的结果至关重要。Debian Med Blend 拥有一系列性能关键应用程序,现在可从 SIMD 中受益匪浅。要安装由 Debian Med 团队维护的封装,则安装名为 med-*的元封装,该元封装的版本为 3.6.x。

中文、日文、韩文等多种语言现在有了新的Fcitx 5输入法,这是流行Fcitx4的接班人:这个新版本有更好的韦兰 (默认显示管理器) 增补支持。

Debian 11靶眼包括许多更新的软件包(超过上一个版本中所有软件包的 72%),例如:

  • 阿帕奇 2.4.48
  • 绑定 DNS 服务器 9.16
  • 卡利格拉 3.2
  • 加密设置 2.3
  • 埃马克斯 27.1
  • GIMP 2.10.22
  • GNU 编译器集合 10.2
  • 格努普格 2.2.20
  • 墨水景观 1.0.2
  • 自由办公室 7.0
  • 利诺内核 5.10 系列
  • 玛丽亚德布 10.5
  • 打开 8.4p1
  • 佩尔 5.32
  • PHP 7.4
  • 后格雷斯QL 13
  • Python 3, 3.9.1
  • 锈蚀 1.48
  • 桑巴 4.13
  • Vim 8.2
  • 超过 59,000 个其他即用软件包,由 30,000 多个源包构建而成。

凭借这种广泛的软件包选择和传统的广泛架构支持,Debian 再次忠实于其成为通用操作系统的目标。它适用于许多不同的使用案例:从桌面系统到上网本:从开发服务器到集群系统;以及数据库、网络和存储服务器。同时,Debian 档案中所有封装的自动安装和升级测试等额外的质量保证工作确保了牛眼满足用户对稳定 Debian 版本的高期望。

共支持九种架构:64 位 PC / 英特尔 EM64T / x86-64 (),32 位 PC / 英特尔 IA-32 (),64 位小端摩托罗拉/IBM PowerPC (),64 位 IBM S/390 (),ARM, 和较旧和较新的 32 位硬件,加上 64 位AArch64架构,以及 MIPS(小端)架构,用于 32 位硬件和 64 位小内联硬件的架构。amd64i386ppc64els390xarmelarmhfarm64mipselmips64el


Debian 11 bullseye released

August 14th, 2021

After 2 years, 1 month, and 9 days of development, the Debian project is proud to present its new stable version 11 (code name bullseye), which will be supported for the next 5 years thanks to the combined work of the Debian Security team and the Debian Long Term Support team.

Debian 11 bullseye ships with several desktop applications and environments. Amongst others it now includes the desktop environments:

  • Gnome 3.38,
  • KDE Plasma 5.20,
  • LXDE 11,
  • LXQt 0.16,
  • MATE 1.24,
  • Xfce 4.16.

This release contains over 11,294 new packages for a total count of 59,551 packages, along with a significant reduction of over 9,519 packages which were marked as obsolete and removed. 42,821 packages were updated and 5,434 packages remained unchanged.

bullseye becomes our first release to provide a Linux kernel with support for the exFAT filesystem and defaults to using it for mount exFAT filesystems. Consequently it is no longer required to use the filesystem-in-userspace implementation provided via the exfat-fuse package. Tools for creating and checking an exFAT filesystem are provided in the exfatprogs package.

Most modern printers are able to use driverless printing and scanning without the need for vendor specific (often non-free) drivers. bullseye brings forward a new package, ipp-usb, which uses the vendor neutral IPP-over-USB protocol supported by many modern printers. This allows a USB device to be treated as a network device. The official SANE driverless backend is provided by sane-escl in libsane1, which uses the eSCL protocol.

Systemd in bullseye activates its persistent journal functionality, by default, with an implicit fallback to volatile storage. This allows users that are not relying on special features to uninstall traditional logging daemons and switch over to using only the systemd journal.

The Debian Med team has been taking part in the fight against COVID-19 by packaging software for researching the virus on the sequence level and for fighting the pandemic with the tools used in epidemiology; this work will continue with focus on machine learning tools for both fields. The team’s work with Quality Assurance and Continuous integration is critical to the consistent reproducible results required in the sciences. Debian Med Blend has a range of performance critical applications which now benefit from SIMD Everywhere. To install packages maintained by the Debian Med team, install the metapackages named med-*, which are at version 3.6.x.

Chinese, Japanese, Korean, and many other languages now have a new Fcitx 5 input method, which is the successor of the popular Fcitx4 in buster; this new version has much better Wayland (default display manager) addon support.

Debian 11 bullseye includes numerous updated software packages (over 72% of all packages in the previous release), such as:

  • Apache 2.4.48
  • BIND DNS Server 9.16
  • Calligra 3.2
  • Cryptsetup 2.3
  • Emacs 27.1
  • GIMP 2.10.22
  • GNU Compiler Collection 10.2
  • GnuPG 2.2.20
  • Inkscape 1.0.2
  • LibreOffice 7.0
  • Linux kernel 5.10 series
  • MariaDB 10.5
  • OpenSSH 8.4p1
  • Perl 5.32
  • PHP 7.4
  • PostgreSQL 13
  • Python 3, 3.9.1
  • Rustc 1.48
  • Samba 4.13
  • Vim 8.2
  • more than 59,000 other ready-to-use software packages, built from more than 30,000 source packages.

With this broad selection of packages and its traditional wide architecture support, Debian once again stays true to its goal of being The Universal Operating System. It is suitable for many different use cases: from desktop systems to netbooks; from development servers to cluster systems; and for database, web, and storage servers. At the same time, additional quality assurance efforts like automatic installation and upgrade tests for all packages in Debian’s archive ensure that bullseye fulfills the high expectations that users have of a stable Debian release.

A total of nine architectures are supported: 64-bit PC / Intel EM64T / x86-64 (), 32-bit PC / Intel IA-32 (), 64-bit little-endian Motorola/IBM PowerPC (), 64-bit IBM S/390 (), for ARM, and for older and more recent 32-bit hardware, plus for the 64-bit AArch64 architecture, and for MIPS, (little-endian) architectures for 32-bit hardware and architecture for 64-bit little-endian hardware. amd64i386ppc64els390xarmelarmhfarm64mipselmips64el

保持您 Debian 系统的安全性

想收到最新的 Debian 安全情报的话,请订阅 debian-security-announce 邮件列表。

更方便的方法:您可以使用 apt 来下载最新的安全更新。把以下的一行

deb http://security.debian.org/debian-security bullseye-security main contrib non-free

加进 /etc/apt/sources.list 文件内,然后执行 apt-get update && apt-get upgrade 来下载与启用安全更新。

想得到 Debian 更多安全的信息,请参阅 Security Team FAQ 以及 Securing Debian 手册。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

4 + 2 =

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据