[RL9] Rocky Linux 9.4 搭载 PG 16.1

rocky94.png

副标题:Rocky Linux 9.4 升级实录,及 PG 16 相关内容

背景

Rocky Linux 9.4 (以下简称 RL) 于5月9日正式发布,本文记录了从 RL 9.3 升级到 9.4 的过程,以及升级前后的一些变化。

之前介绍过 RL 9 的相关内容,请戳:

升级动因

RL 9.4 为当前最新版本,升级了大量系统模块、软件包,包括最新的编程语言、编译工具和开发工具等,同时修复了若干安全漏洞、增强了系统安全性。

如果你在使用 RHEL 9,可参考其支持计划,偶数版本如9.0,9.2,9.4等,将在扩展升级支持 (Extended Update Support, EUS) 之外提供48个月的增强扩展升级支持(Enhanced EUS)。

RHEL 9GAEUSEnhanced EUSKernel Version
9.42024-04-30April 30, 2026April 30, 20285.14.0-427.13.1.el9_4
9.22023-05-10May 31, 2025May 31, 20275.14.0-284.11.1.el9_2
9.02022-05-17May 31, 2024May 31, 20265.14.0-70.13.1.el9_0

升级过程

如果是本地环境,可以先挂载 iso 镜像,设定本地 yum 源,然后进行更新即可。

如果是联网环境,可以执行命令 dnf update 在线升级。

[root@rocky9 ~]# dnf upgrade
依赖关系解决。
=======================================================================================
 软件包                      架构        版本                       仓库          大小
=======================================================================================
安装:                                                            
 kernel                      x86_64      5.14.0-427.13.1.el9_4      iso-base     5.8 M
升级:                                                            
 NetworkManager              x86_64      1:1.46.0-4.el9_4           iso-base     2.3 M
...                                                             
安装依赖关系:                                                      
 kernel-core                 x86_64      5.14.0-427.13.1.el9_4      iso-base      21 M
...                                                             
安装弱的依赖:                                                      
 evolution-data-server-ui    x86_64      3.40.4-9.el9               iso-app       82 k
                                                                
事务概要                                                          
=======================================================================================
安装    8 软件包
升级  456 软件包

总计:1.4 G
...                                                 
完毕!
rocky94.png

版本比对

操作系统和内核

  • rocky 9.4
[root@rocky9 ~]# hostnamectl
 Static hostname: rocky9.shawnyan.cn
...
Operating System: Rocky Linux 9.4 (Blue Onyx)       
     CPE OS Name: cpe:/o:rocky:rocky:9::baseos
          Kernel: Linux 5.14.0-427.18.1.el9_4.x86_64
    Architecture: x86-64
[root@rocky9 ~]# 
[root@rocky9 ~]# ls /boot/vmlinuz-*
/boot/vmlinuz-0-rescue-703d66e159424744945b5a79849585a2
/boot/vmlinuz-5.14.0-284.30.1.el9_2.x86_64
/boot/vmlinuz-5.14.0-362.8.1.el9_3.x86_64
/boot/vmlinuz-5.14.0-427.18.1.el9_4.x86_64
  • rocky 9.3
[root@rocky9 ~]# hostnamectl
 Static hostname: rocky9.shawnyan.cn
...
Operating System: Rocky Linux 9.3 (Blue Onyx)      
     CPE OS Name: cpe:/o:rocky:rocky:9::baseos
          Kernel: Linux 5.14.0-362.8.1.el9_3.x86_64
    Architecture: x86-64
[root@rocky9 ~]# 
[root@rocky9 ~]# ls /boot/vmlinuz-*
/boot/vmlinuz-0-rescue-703d66e159424744945b5a79849585a2
/boot/vmlinuz-5.14.0-284.11.1.el9_2.x86_64
/boot/vmlinuz-5.14.0-284.30.1.el9_2.x86_64
/boot/vmlinuz-5.14.0-362.8.1.el9_3.x86_64

Rsyslog

Rsyslogd 是用于日志记录的守护进程,rsyslogd 拥有高性能、灵活性、可靠性、安全性等特点,可以用于替代 syslogd 守护进程。

新版本的 Rsyslog 处理系统引入了可定制的 TLS/SSL 加密设置。

在以前的版本中,为单独的连接配置 TLS/SSL 加密设置仅限于全局设置。使用最新版本,你可以在 Rsyslog 中为每条单独的连接定义唯一的 TLS/SSL 设置。这包括指定不同的 CA 证书、私钥、公钥和 CRL 文件以增强安全性和灵活性。

  • rocky 9.4
[shawnyan@rocky9 ~]$ rsyslogd -version
rsyslogd  8.2310.0-4.el9 (aka 2023.10) compiled with:
        PLATFORM:                               x86_64-redhat-linux-gnu
        PLATFORM (lsb_release -d):
        FEATURE_REGEXP:                         Yes
        GSSAPI Kerberos 5 support:              Yes
        FEATURE_DEBUG (debug build, slow code): No
        32bit Atomic operations supported:      Yes
        64bit Atomic operations supported:      Yes
        memory allocator:                       system default
        Runtime Instrumentation (slow code):    No
        uuid support:                           Yes
        systemd support:                        Yes
        Config file:                            /etc/rsyslog.conf
        PID file:                               /var/run/rsyslogd.pid
        Number of Bits in RainerScript integers: 64

See https://www.rsyslog.com for more information.
  • rocky 9.3
[shawnyan@rocky9 ~]$ rsyslogd -version
rsyslogd  8.2102.0-117.el9 (aka 2021.02) compiled with:

golang

Go,通常被称为 golang,是由 Google 开发的开源编程语言。Go 语言设计于 2007 年,并于 2009 年正式对外发布。Go 语言的语法类似于 C 语言,但提供了内存安全、垃圾回收、结构化错误处理等现代编程语言特性。

  • rocky 9.4
[shawnyan@rocky9 ~]$ go version
go version go1.21.9 (Red Hat 1.21.9-2.el9_4) linux/amd64
  • rocky 9.3
[root@rocky9 yum.repos.d]# go version
go version go1.20.10 linux/amd64

由 Go 语言开发的数据库项目有很多,以下列举几款常见的数据库项目:

  • 关系型数据库 TiDB

是一个开源分布式 SQL 数据库,支持混合事务/分析处理 (HTAP) 工作负载。它与 MySQL 兼容,具有水平可扩展性、强一致性和高可用性。

  • 图数据库 Dgraph

是一个具有图形后端的水平可扩展分布式 GraphQL 数据库。它提供 ACID 事务、一致性复制和线性化读取。

  • 键值数据库 etcd

是一个分布式的可靠键值存储,用于存储分布式系统中最重要的数据,具有简单、安全、快速、可靠等特点。可用于配置管理和服务发现,常用于持久化 Kubernetes 集群状态。

  • 向量数据库 Milvus

是一个开源向量数据库,旨在为嵌入式相似性搜索和 AI 应用程序提供支持。Milvus 2.0 是一款云原生向量数据库,设计上存储与计算分离,所有组件均为无状态,增强了弹性和灵活性。

postgresql:16

PostgreSQL 是一个功能强大的开源对象关系数据库系统,经过 35 多年的积极开发,在可靠性、功能稳健性和性能方面赢得了良好的声誉。

PostgreSQL 16 于 2023 年 9 月发布,进一步提高了性能并增加了更多复制选项等。

RHEL 9.4 引入了 PostgreSQL 16 作为 postgresql:16 模块流。

关于PG模块流的更多内容,戳这里:

安装步骤如下:

[shawnyan@rocky9 ~]$ sudo dnf module install postgresql:16
Dependencies resolved.
=====================================================================================================
 Package                     Arch       Version                                  Repository     Size
=====================================================================================================
Installing group/module packages:
 postgresql-server           x86_64     16.1-1.module+el9.4.0+20018+a4fc542f     appstream     6.9 M
Installing dependencies:
 postgresql                  x86_64     16.1-1.module+el9.4.0+20018+a4fc542f     appstream     1.8 M
 postgresql-private-libs     x86_64     16.1-1.module+el9.4.0+20018+a4fc542f     appstream     141 k
Installing module profiles:
 postgresql/server
Enabling module streams:
 postgresql                             16

Transaction Summary
=====================================================================================================
Install  3 Packages

Total download size: 8.9 M
Installed size: 37 M
...
Installed:
  postgresql-16.1-1.module+el9.4.0+20018+a4fc542f.x86_64
  postgresql-private-libs-16.1-1.module+el9.4.0+20018+a4fc542f.x86_64
  postgresql-server-16.1-1.module+el9.4.0+20018+a4fc542f.x86_64

Complete!

由于本机之前安装过PG,所以先要进行升级。

[postgres@rocky9 ~]$ postgresql-setup --upgrade
 * Upgrading database.
 * Upgraded OK.
WARNING: The configuration files were replaced by default configuration.
WARNING: The previous configuration and data are stored in folder
WARNING: /var/lib/pgsql/data-old.
WARNING: If you've just upgraded your database from a previous major version of
Fedora or RHEL, please run reindexdb against your databases.  Core library
collation data may have changed and this will invalidate database indexes.  For
example, in Fedora 28 and RHEL 8 there have been extensive changes in glibc
collations to support ISO 14651:2016 (Unicode 9.0.0 data) and your indexes may
be affected: https://sourceware.org/ml/libc-announce/2018/msg00002.html
 * See /var/lib/pgsql/upgrade_postgresql.log for details.

启动PG服务。

[shawnyan@rocky9 ~]$ sudo systemctl start postgresql
[shawnyan@rocky9 ~]$ systemctl status postgresql
● postgresql.service - PostgreSQL database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; preset: disabled)
     Active: active (running) since Mon 2024-06-02 14:05:29 UTC; 5s ago
...
Jun 02 14:05:29 rocky9.shawnyan.cn systemd[1]: Started PostgreSQL database server.

查看PG版本。

[postgres@rocky9 ~]$ psql -c 'select version()'
                                                   version
--------------------------------------------------------------------------------------------------------------
 PostgreSQL 16.1 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3), 64-bit
(1 row)

总结

本文介绍了如何从 Rocky Linux 9.3 升级到 RL 9.4,并介绍了 RL 9.4 部分新特性,以及介绍了 RL 9.4 中 PG:16 模块的相关内容。


🌻 往期精彩 ▼

[Oracle]

[MySQL]

[TiDB]

[PG]


-- / END / --

👉 这里可以找到我

如果这篇文章为你带来了灵感或启发,就请帮忙点『赞』or『在看』or『转发』吧,感谢!(๑˃̵ᴗ˂̵)

本文由 mdnice 多平台发布

  • 22
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值