说明
本文仅适用rabbitmq为RPM安装方式。
升级准备
查看环境当前版本:
# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
# rabbitmqctl status
Status of node rabbit@mq01 ...
Runtime
OS PID: 19333
OS: Linux
Uptime (seconds): 58
Is under maintenance?: false
RabbitMQ version: 3.8.5
备份相关数据:
#配置文件备份
# cp -r /etc/rabbitmq backup/rabbitmq20240506
#数据备份
# cp -r /var/lib/rabbitmq backup/rabbitmq
升级操作
链接: 升级包下载
#如多个节点每个节点都需要操作
# rpm -Uvh erlang-23.3.4.10-1.el7.x86_64.rpm
# socat版本一样不需升级
# rpm -Uvh rabbitmq-server-3.8.35-1.el8.noarch.rpm
# systemctl restart rabbitmq-server
验证
# rabbitmqctl cluster_status
# rabbitmqctl status
Status of node rabbit@mq01 ...
Runtime
OS PID: 19333
OS: Linux
Uptime (seconds): 58
Is under maintenance?: false
RabbitMQ version: 3.8.35
Node name: rabbit@mq01
经过验证,rabbitmq升级正常。