1
暂无图片
暂无图片
暂无图片

【rocky9】rocky linux 9.2 升级 9.3,及新特性实践 -m6米乐安卓版下载

原创 2023-11-21
617

发版计划

前面介绍了如何安装和升级 rocky linux 9.2 操作系统,按照 rhel 的发版计划,rhel 9.3 已于 11 月 7 日发版,而 rocky linux 作为 rhel 的下游,也于 11 月 20 日发布更新。

先来回顾一下 red hat enterprise linux version 9 的生命周期。

依据m6米乐安卓版下载官网说明,rhel 9 每六个月发版一次,9.3 于 23 年 11 月发版,9.4 将在 24 年 2 月发布。

已发布的版本信息如下:

发布版本 ga 日期 内核版本
rhel 9.3 2023-11-07 5.14.0-362.8.1.el9_3
rhel 9.2 2023-05-10 5.14.0-284.11.1.el9_2
rhel 9.1 2022-11-15 5.14.0-162.6.1.el9_1
rhel 9.0 2022-05-17 5.14.0-70.13.1.el9_0

升级到 rocky 9.3

这里使用 dnf 在线升级,如果是内网用户,建议先查验 yum 源是否已更新。如果没有中央 yum 源,可以下载最新的 rocky linux 9.3 镜像,手动挂载,并配置本地 yum 源,然后再进行升级。

  1. 检查当前的 release 版本和 kernel 版本。
cat /etc/redhat-release uname -a

输出:

[shawnyan@rocky9 ~]$ cat /etc/redhat-release rocky linux release 9.2 (blue onyx) [shawnyan@rocky9 ~]$ uname -a linux rocky9.shawnyan.cn 5.14.0-284.30.1.el9_2.x86_64 #1 smp preempt_dynamic sat sep 16 09:55:41 utc 2023 x86_64 x86_64 x86_64 gnu/linux [shawnyan@rocky9 ~]$
  1. 在线升级。
dnf -y upgrade

输出日志:

[shawnyan@rocky9 ~]$ sudo dnf -y upgrade --allowerasing
last metadata expiration check: 0:00:19 ago on tue 21 nov 2023 01:33:19 pm utc.
dependencies resolved.                                              
==============================================================================================================================================
 package                                       architecture          version                     repository                              size
==============================================================================================================================================
installing:                                                                                                   
 kernel                                        x86_64                5.14.0-362.8.1.el9_3        baseos                                 5.1 m
upgrading:                                                                                                    
 networkmanager                                x86_64                1:1.44.0-3.el9              baseos                                 2.2 m
 networkmanager-adsl                           x86_64                1:1.44.0-3.el9              baseos                                  36 k
...                                                                                                           
 gcc                                           x86_64                11.4.1-2.1.el9              appstream                               32 m
 gcc-c                                         x86_64                11.4.1-2.1.el9              appstream                               13 m
 gcc-plugin-annobin                            x86_64                11.4.1-2.1.el9              appstream                               48 k
 gcc-toolset-12-binutils                       x86_64                2.38-19.el9                 appstream                              5.4 m
 gcc-toolset-12-binutils-gold                  x86_64                2.38-19.el9                 appstream                              771 k
 gdb                                           x86_64                10.2-11.el9                 appstream                              121 k
 gdb-headless                                  x86_64                10.2-11.el9                 appstream                              3.9 m
...                                                                                                           
 iproute                                       x86_64                6.2.0-5.el9                 baseos                                 786 k
 iproute-tc                                    x86_64                6.2.0-5.el9                 baseos                                 448 k
...                                                                                                           
 kernel-headers                                x86_64                5.14.0-362.8.1.el9_3        appstream                              6.5 m
 kernel-srpm-macros                            noarch                1.0-13.el9                  appstream                               15 k
 kernel-tools                                  x86_64                5.14.0-362.8.1.el9_3        baseos                                 5.3 m
 kernel-tools-libs                             x86_64                5.14.0-362.8.1.el9_3        baseos                                 5.1 m
...                                                                                                           
 rocky-backgrounds                             noarch                90.14-2.el9                 appstream                               61 m
 rocky-gpg-keys                                noarch                9.3-1.1.el9                 baseos                                  13 k
 rocky-logos                                   x86_64                90.14-2.el9                 appstream                              715 k
 rocky-release                                 noarch                9.3-1.1.el9                 baseos                                  23 k
 rocky-repos                                   noarch                9.3-1.1.el9                 baseos                                  13 k
...                                                                                                           
installing dependencies:                                                                                      
 debugedit                                     x86_64                5.0-4.el9                   appstream                               76 k
 kbd-legacy                                    noarch                2.4.0-9.el9                 baseos                                 502 k
 kernel-core                                   x86_64                5.14.0-362.8.1.el9_3        baseos                                  20 m
 kernel-modules                                x86_64                5.14.0-362.8.1.el9_3        baseos                                  37 m
 kernel-modules-core                           x86_64                5.14.0-362.8.1.el9_3        baseos                                  32 m
 libtraceevent                                 x86_64                1.5.3-3.el9                 baseos                                 213 k
 liburing                                      x86_64                2.3-2.el9                   appstream                               26 k
 libxcvt                                       x86_64                0.1.2-2.el9                 appstream                               13 k
installing weak dependencies:                                                                                 
 kernel-devel                                  x86_64                5.14.0-362.8.1.el9_3        appstream                               20 m
removing dependent packages:                                                                                  
 libstdc  -static                              x86_64                11.3.1-4.3.el9              @devel                                 6.5 m
 libtirpc-devel                                x86_64                1.3.3-1.el9                 @devel                                 251 k
                                                                                                              
transaction summary                                                                                           
==============================================================================================================================================
install   10 packages                                                                                         
upgrade  459 packages                                                                                         
remove     2 packages                                                                                         
                                                                                                              
total download size: 1.1 g                                                                                    
...                                                                                                           
----------------------------------------------------------------------------------------------------------------------------------------------
total                                                                                                         2.5 mb/s | 1.1 gb     07:11
running transaction check                                           
transaction check succeeded.                                           
running transaction test                                               
transaction test succeeded.                                            
running transaction                                                    
  running scriptlet: selinux-policy-targeted-38.1.23-1.el9.noarch                                                                         1/1
  running scriptlet: kmod-kvdo-8.2.1.6-98.el9.x86_64                                                                                      1/1
  preparing        :                                                                                                                      1/1
  upgrading        : libgcc-11.4.1-2.1.el9.x86_64                                                                                       1/930
  running scriptlet: libgcc-11.4.1-2.1.el9.x86_64                                                                                       1/930
...                                                                    

受系统资源和网速的影响,整个升级过程约半小时。

  1. 升级后查验。

升级完成后,再次查看版本信息。

cat /etc/redhat-release uname -a

输出:

[shawnyan@rocky9 ~]$ cat /etc/redhat-release rocky linux release 9.3 (blue onyx) [shawnyan@rocky9 ~]$ uname -a linux rocky9.shawnyan.cn 5.14.0-362.8.1.el9_3.x86_64 #1 smp preempt_dynamic wed nov 8 17:36:32 utc 2023 x86_64 x86_64 x86_64 gnu/linux [shawnyan@rocky9 ~]$

主要更新

kernel 内核版本

上文的表格中已经标记了 rhel 的内核版本,rocky linux 与 rhel 保持一致,在 rocky 9.2 中是 5.14.0-284.11.1.el9_2

我本地环境升级过,所以小版本号略高一点:

[shawnyan@rocky9 ~]$ uname -r 5.14.0-284.30.1.el9_2.x86_64

而在 rocky 9.3 中,默认的内核版本升级为 5.14.0-362.8.1.el9_3

[shawnyan@rocky9 ~]$ uname -r 5.14.0-362.8.1.el9_3.x86_64

编译工具 gcc

gcc (gnu compiler collection) 提供了使用c、c 和 fortran 编程语言开发应用程序的工具。

在 rocky 9.2 中,gcc 工具的版本默认为 11.3.1。同时,可以通过安装 gcc-toolset 将其版本升级到 12。

[shawnyan@rocky9 ~]$ gcc --version gcc (gcc) 11.3.1 20221121 (red hat 11.3.1-4) 米乐app官网下载 copyright (c) 2021 free software foundation, inc. this is free software; see the source for copying conditions. there is no warranty; not even for merchantability or fitness for a particular purpose. [shawnyan@rocky9 ~]$ [shawnyan@rocky9 ~]$ rpm -qa | grep gcc-toolset gcc-toolset-12-runtime-12.0-6.el9.x86_64 gcc-toolset-12-annobin-docs-11.08-2.el9.noarch gcc-toolset-12-libstdc -devel-12.2.1-7.4.el9.x86_64 gcc-toolset-12-binutils-gold-2.38-17.el9_2.1.x86_64 gcc-toolset-12-binutils-2.38-17.el9_2.1.x86_64 gcc-toolset-12-gcc-12.2.1-7.4.el9.x86_64 gcc-toolset-12-gcc-c -12.2.1-7.4.el9.x86_64 gcc-toolset-12-annobin-plugin-gcc-11.08-2.el9.x86_64 gcc-toolset-12-annobin-annocheck-11.08-2.el9.x86_64 [shawnyan@rocky9 ~]$ [shawnyan@rocky9 ~]$ scl enable gcc-toolset-12 bash [shawnyan@rocky9 ~]$ gcc --version gcc (gcc) 12.2.1 20221121 (red hat 12.2.1-7) 米乐app官网下载 copyright (c) 2022 free software foundation, inc. this is free software; see the source for copying conditions. there is no warranty; not even for merchantability or fitness for a particular purpose.

在 rocky 9.3 中,gcc 版本升级到了 11.4.1。

[shawnyan@rocky9 ~]$ gcc --version gcc (gcc) 11.4.1 20230605 (red hat 11.4.1-2) 米乐app官网下载 copyright (c) 2021 free software foundation, inc. this is free software; see the source for copying conditions. there is no warranty; not even for merchantability or fitness for a particular purpose. [shawnyan@rocky9 ~]$ rpm -qa | grep gcc-toolset

同时,可以通过安装 gcc-toolset 将其版本升级到 13。

  • 安装 gcc toolset 13
[shawnyan@rocky9 ~]$ sudo dnf install gcc-toolset-13 last metadata expiration check: 0:02:04 ago on tue 21 nov 2023 02:06:55 pm utc. dependencies resolved. ========================================================================================================================= package architecture version repository size ========================================================================================================================= installing: gcc-toolset-13 x86_64 13.0-2.el9 appstream 9.9 k installing dependencies: gcc-toolset-13-annobin-docs noarch 12.20-1.el9 appstream 95 k gcc-toolset-13-annobin-plugin-gcc x86_64 12.20-1.el9 appstream 960 k gcc-toolset-13-binutils x86_64 2.40-13.el9 appstream 5.6 m gcc-toolset-13-binutils-gold x86_64 2.40-13.el9 appstream 803 k gcc-toolset-13-dwz x86_64 0.14-0.el9 appstream 126 k gcc-toolset-13-gcc x86_64 13.1.1-4.2.el9 appstream 43 m gcc-toolset-13-gcc-c x86_64 13.1.1-4.2.el9 appstream 13 m gcc-toolset-13-gcc-gfortran x86_64 13.1.1-4.2.el9 appstream 14 m gcc-toolset-13-gdb x86_64 12.1-3.el9 appstream 4.3 m gcc-toolset-13-libquadmath-devel x86_64 13.1.1-4.2.el9 appstream 185 k gcc-toolset-13-libstdc -devel x86_64 13.1.1-4.2.el9 appstream 3.3 m gcc-toolset-13-runtime x86_64 13.0-2.el9 appstream 27 k libgfortran x86_64 11.4.1-2.1.el9 baseos 807 k libquadmath x86_64 11.4.1-2.1.el9 baseos 197 k transaction summary ========================================================================================================================= install 15 packages total download size: 87 m installed size: 255 m ... installed: gcc-toolset-13-13.0-2.el9.x86_64 gcc-toolset-13-annobin-docs-12.20-1.el9.noarch gcc-toolset-13-annobin-plugin-gcc-12.20-1.el9.x86_64 gcc-toolset-13-binutils-2.40-13.el9.x86_64 gcc-toolset-13-binutils-gold-2.40-13.el9.x86_64 gcc-toolset-13-dwz-0.14-0.el9.x86_64 gcc-toolset-13-gcc-13.1.1-4.2.el9.x86_64 gcc-toolset-13-gcc-c -13.1.1-4.2.el9.x86_64 gcc-toolset-13-gcc-gfortran-13.1.1-4.2.el9.x86_64 gcc-toolset-13-gdb-12.1-3.el9.x86_64 gcc-toolset-13-libquadmath-devel-13.1.1-4.2.el9.x86_64 gcc-toolset-13-libstdc -devel-13.1.1-4.2.el9.x86_64 gcc-toolset-13-runtime-13.0-2.el9.x86_64 libgfortran-11.4.1-2.1.el9.x86_64 libquadmath-11.4.1-2.1.el9.x86_64 complete! installed: gcc-toolset-13-13.0-2.el9.x86_64 gcc-toolset-13-annobin-docs-12.20-1.el9.noarch gcc-toolset-13-annobin-plugin-gcc-12.20-1.el9.x86_64 gcc-toolset-13-binutils-2.40-13.el9.x86_64 gcc-toolset-13-binutils-gold-2.40-13.el9.x86_64 gcc-toolset-13-dwz-0.14-0.el9.x86_64 gcc-toolset-13-gcc-13.1.1-4.2.el9.x86_64 gcc-toolset-13-gcc-c -13.1.1-4.2.el9.x86_64 gcc-toolset-13-gcc-gfortran-13.1.1-4.2.el9.x86_64 gcc-toolset-13-gdb-12.1-3.el9.x86_64 gcc-toolset-13-libquadmath-devel-13.1.1-4.2.el9.x86_64 gcc-toolset-13-libstdc -devel-13.1.1-4.2.el9.x86_64 gcc-toolset-13-runtime-13.0-2.el9.x86_64 libgfortran-11.4.1-2.1.el9.x86_64 libquadmath-11.4.1-2.1.el9.x86_64 complete!
  • 查看 gcc toolset 13 安装包
[shawnyan@rocky9 ~]$ rpm -qa | grep gcc-toolset-13 gcc-toolset-13-runtime-13.0-2.el9.x86_64 gcc-toolset-13-libstdc -devel-13.1.1-4.2.el9.x86_64 gcc-toolset-13-annobin-docs-12.20-1.el9.noarch gcc-toolset-13-binutils-gold-2.40-13.el9.x86_64 gcc-toolset-13-binutils-2.40-13.el9.x86_64 gcc-toolset-13-gcc-13.1.1-4.2.el9.x86_64 gcc-toolset-13-libquadmath-devel-13.1.1-4.2.el9.x86_64 gcc-toolset-13-gcc-gfortran-13.1.1-4.2.el9.x86_64 gcc-toolset-13-gcc-c -13.1.1-4.2.el9.x86_64 gcc-toolset-13-annobin-plugin-gcc-12.20-1.el9.x86_64 gcc-toolset-13-gdb-12.1-3.el9.x86_64 gcc-toolset-13-dwz-0.14-0.el9.x86_64 gcc-toolset-13-13.0-2.el9.x86_64 [shawnyan@rocky9 ~]$
  • 运行会话,查看 gcc 版本
[shawnyan@rocky9 ~]$ scl enable gcc-toolset-13 bash [shawnyan@rocky9 ~]$ gcc --version gcc (gcc) 13.1.1 20230614 (red hat 13.1.1-4) 米乐app官网下载 copyright (c) 2023 free software foundation, inc. this is free software; see the source for copying conditions. there is no warranty; not even for merchantability or fitness for a particular purpose. [shawnyan@rocky9 ~]$

java 运行环境

在 rocky 9.2 中,appstream 仓库中包含 openjdk 1.9.0/11/17 三个版本。

[shawnyan@rocky9 ~]$ cat /etc/redhat-release rocky linux release 9.2 (blue onyx) [shawnyan@rocky9 ~]$ yum list java-*-openjdk last metadata expiration check: 4 days, 18:16:06 ago on sat 11 nov 2023 08:35:35 pm utc. available packages java-1.8.0-openjdk.x86_64 1:1.8.0.392.b08-3.el9 appstream java-11-openjdk.x86_64 1:11.0.21.0.9-2.el9 appstream java-17-openjdk.x86_64 1:17.0.9.0.9-2.el9 appstream

而在 rocky 9.3 中,appstream 仓库新增包含了 openjdk 21。

[shawnyan@rocky9 ~]$ cat /etc/redhat-release rocky linux release 9.3 (blue onyx) [shawnyan@rocky9 ~]$ yum list java-*-openjdk rocky linux 9 - appstream 5.4 mb/s | 7.4 mb 00:01 rocky linux 9 - baseos 2.5 mb/s | 2.2 mb 00:00 rocky linux 9 - extras 30 kb/s | 13 kb 00:00 available packages java-1.8.0-openjdk.x86_64 1:1.8.0.392.b08-3.el9 appstream java-11-openjdk.x86_64 1:11.0.21.0.9-2.el9 appstream java-17-openjdk.x86_64 1:17.0.9.0.9-2.el9 appstream java-21-openjdk.x86_64 1:21.0.1.0.12-3.el9 appstream [shawnyan@rocky9 ~]$

dbms 数据库

在 rocky 9.2 中,默认提供四种数据库: mariadb 10.5, mysql 8.0, postgresql 13/15, redis 6。

[shawnyan@rocky9 ~]$ cat /etc/redhat-release rocky linux release 9.2 (blue onyx) [shawnyan@rocky9 ~]$ yum list mariadb-server* last metadata expiration check: 5 days, 12:24:51 ago on sat 11 nov 2023 08:35:35 pm utc. available packages mariadb-server.x86_64 3:10.5.22-1.el9_2 appstream mariadb-server-galera.x86_64 3:10.5.22-1.el9_2 appstream mariadb-server-utils.x86_64 3:10.5.22-1.el9_2 appstream [shawnyan@rocky9 ~]$ yum list mysql-server* last metadata expiration check: 5 days, 12:24:53 ago on sat 11 nov 2023 08:35:35 pm utc. available packages mysql-server.x86_64 8.0.32-1.el9_2 appstream [shawnyan@rocky9 ~]$ yum list postgresql-server* last metadata expiration check: 5 days, 12:24:58 ago on sat 11 nov 2023 08:35:35 pm utc. available packages postgresql-server.x86_64 13.11-1.el9_2 appstream [shawnyan@rocky9 ~]$ dnf list redis last metadata expiration check: 5 days, 13:58:28 ago on sat 11 nov 2023 08:35:35 pm utc. available packages redis.x86_64 6.2.7-1.el9 appstream [shawnyan@rocky9 ~]$

升级到 rocky 9.3 之后,由于时间关系,这四种准预装的数据库版本尚未更新。这里暂且留个 todo,我们之后再看。

此外,从 rhel 9.2 开始,引入了 postgresql:15 模块流,可以通过以下方式进行安装 pg15.

[shawnyan@rocky9 ~]$ sudo dnf module install postgresql:15/server last metadata expiration check: 2:39:51 ago on fri 17 nov 2023 07:07:33 am utc. dependencies resolved. ========================================================================================================================= package architecture version repository size ========================================================================================================================= installing group/module packages: postgresql-server x86_64 15.3-1.module el9.2.0 14925 a515b28a appstream 6.1 m installing dependencies: postgresql x86_64 15.3-1.module el9.2.0 14925 a515b28a appstream 1.6 m postgresql-private-libs x86_64 15.3-1.module el9.2.0 14925 a515b28a appstream 137 k installing module profiles: postgresql/server enabling module streams: postgresql 15 transaction summary ========================================================================================================================= install 3 packages total download size: 7.8 m installed size: 32 m

iproute

iproute 是高级ip路由和网络设备配置工具,包括常用的网络,如 ip, ss, tc 等。

在 rocky 9.2 中,iproute 的版本为 6.1.0。

[shawnyan@rocky9 ~]$ cat /etc/redhat-release
rocky linux release 9.2 (blue onyx)
[shawnyan@rocky9 ~]$ rpm -qa | grep iproute
iproute-6.1.0-1.el9.x86_64
iproute-tc-6.1.0-1.el9.x86_64
[shawnyan@rocky9 ~]$

升级到 rocky 9.3 后,iproute 的版本为 6.2.0。

[shawnyan@rocky9 ~]$ cat /etc/redhat-release rocky linux release 9.3 (blue onyx) [shawnyan@rocky9 ~]$ rpm -qa | grep iproute iproute-6.2.0-5.el9.x86_64 iproute-tc-6.2.0-5.el9.x86_64 [shawnyan@rocky9 ~]$

这里介绍一个新命令,ip stats,可以管理、显示接口状态信息,默认显示所有网络设备,包括 bridges 和 bonds,也可以通过 devgroup 过滤信息。

例如:

[shawnyan@rocky9 ~]$ ip stats show dev ens33
2: ens33: group offload subgroup hw_stats_info
    l3_stats off used off
2: ens33: group xstats_slave subgroup bond suite 802.3ad
2: ens33: group xstats_slave subgroup bridge suite mcast
2: ens33: group xstats_slave subgroup bridge suite stp
2: ens33: group xstats subgroup bond suite 802.3ad
2: ens33: group xstats subgroup bridge suite mcast
2: ens33: group xstats subgroup bridge suite stp
2: ens33: group afstats subgroup mpls
2: ens33: group offload subgroup l3_stats off used off
2: ens33: group offload subgroup cpu_hit
2: ens33: group link
    rx:  bytes packets errors dropped  missed   mcast
     137826417   94630      0       0       0       0
    tx:  bytes packets errors dropped carrier collsns
       2292768   36535      0       0       0       0
[shawnyan@rocky9 ~]$

总结

本文演示了如何将 rocky linux 9.2 升级到 9.3,并着重介绍了几点值得一看的新特性。

rocky linux 9.3 是 23 年发行的第二个大版本,相信已经有企业将 rocky 9 用于生产环境。

关于 rocky 9 的更多分享,还将继续。


  1. https://rockylinux.org/news/rocky-linux-9-3-ga-release/

最后修改时间:2023-11-21 15:30:11
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【米乐app官网下载的版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

网站地图