centos6.9 rabbitmq 3.6.8 upgrade 3.8.2

I. Overview

Since the previously built version is too low, there are many vulnerabilities that need to be fixed. Therefore need to upgrade to the latest version 3.8.2

Previous link:

https://www.cnblogs.com/xiao987334176/p/12303664.html

2. Official upgrade

Environmental description

Operating system ip hostname configuration
centos 6.9 192.168.31.7 mq_01 1 core 2g
centos 6.9 192.168.31.216 mq_02 1 core 2g
centos 6.9 192.168.31.214 mq_03 1 core 2g

Backup data

Log in to the mq background, click Export definitions to export the data. The data file is json

Download update file

mq_01 execution

mkdir -p /data/software/rabbitmq_update
cd  /data/software/rabbitmq_update
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.2/rabbitmq-server-3.8.2-1.el6.noarch.rpm

Copy files to 2 other servers

mq_01 execution

scp -P 22-r rabbitmq_update 192.168.31.216:/data/software/
scp -P 22-r rabbitmq_update 192.168.31.214:/data/software/

Close and uninstall mq

3 Run it on both servers

/etc/init.d/rabbitmq-server stop
yum remove -y rabbitmq-server erlang*
rm -rf /var/lib/rabbitmq/*
rm -rf /data/rabbitmq/mnesia/*
rm -rf /usr/lib64/erlang
rm -rf /var/lib/rabbitmq

Install update source

3 Run it on both servers

yum install -y wget
cd /data/software/rabbitmq_update
rpm -ivh erlang-solutions-1.0-1.noarch.rpm

Change erlang's yum source and change yum source to domestic Tsinghua's yum source

vim /etc/yum.repos.d/erlang_solutions.repo

The content is as follows:

[ erlang-solutions]
name=Centos $releasever - $basearch - Erlang Solutions
# baseurl=http://packages.erlang-solutions.com/rpm/centos/$releasever/$basearch
baseurl=https://mirrors4.tuna.tsinghua.edu.cn/erlang-solutions/centos/6/
gpgcheck=1
# gpgkey=http://packages.erlang-solutions.com/debian/erlang_solutions.asc
gpgkey=http://packages.erlang-solutions.com/rpm/erlang_solutions.asc
enabled=1

Install erlang

3 Run it on both servers

yum -y install erlang
yum clean all

Install rabbitmq

3 Run it on both servers

rpm -ivh rabbitmq-server-3.8.2-1.el6.noarch.rpm
cd /etc/rabbitmq/
mv rabbitmq.conf rabbitmq.config
/etc/init.d/rabbitmq-server start

Copy cookie

The other 2 hosts copy the first cookie

Log in to mq_02, execute mq_03

scp -P 27192.168.10.184:/var/lib/rabbitmq/.erlang.cookie  /var/lib/rabbitmq/
chown -R rabbitmq.rabbitmq /var/lib/rabbitmq/.erlang.cookie
chmod 600/var/lib/rabbitmq/.erlang.cookie

Install plugin

3 Install it

rabbitmq-plugins enable rabbitmq_management

Create user and authorization

3 Run it all

rabbitmqctl add_user admin 'admin123'
rabbitmqctl set_permissions -p / admin ...
rabbitmqctl set_user_tags admin administrator

Join mq cluster

The other 2 nodes are added to the first
Log in to mq_02, mq_03 node, first close, join, and finally start

rabbitmqctl stop_app
rabbitmqctl join_cluster --ram rabbit@mq_01
rabbitmqctl start_app

View cluster status

Log in to any node to view

rabbitmqctl cluster_status

Import Data

Visit the mq background, if rabbitmq ReferenceError: disable_stats is not defined appears in the upper left corner
Wait a few minutes, refresh it

After logging in, click on Import definitions
Select the json file, click Upload broker definitions to start importing.

Finally, the developer will test whether the production and consumption are normal.

Reference link for this article:

https://www.cnblogs.com/wangkaiok/p/11942855.html

https://blog.csdn.net/bushcat2015/article/details/88627969

https://www.jianshu.com/p/83acc90c2792

Recommended Posts

centos6.9 rabbitmq 3.6.8 upgrade 3.8.2
Centos6.5 openssh upgrade
centOs install rabbitMQ
Centos7 upgrade kernel
CentOS online installation RabbitMQ3.7
CentOS7.5-1804 system kernel upgrade
Centos 6.4 python 2.6 upgrade to 2.7
Centos6.9 build rabbitmq 3.6.8 cluster
Centos 6.4 python 2.6 upgrade to 2.7
Install RabbitMQ on CentOS 7
CentOS 7 deploys RabbitMQ service
CentOS6.5 upgrade kernel to 3.10.28
Centos kernel version upgrade
install RabbitMQ on centos
Install RabbitMQ on CentOS 7
CentOS online installation RabbitMQ3.7
Install RabbitMQ on CentOS7
Centos default python2.6 upgrade to
CentOS upgrade python2 to pyth
CentOS 8 (2)
CentOS7 install rabbitmq cluster (binary)
CentOS 8 (1)
centos6.5: gcc upgrade (5.2.0) process record
centos6.9 rabbitmq set up SSL
CentOS 6 automatically installs RabbitMQ script
How to upgrade CentOS7 to CentOS8 (detailed steps)
Three methods of Centos kernel upgrade
Upgrade OpenSSL and OpenSSH under CentOS7
Centos7 upgrade git version control tool
Linux: Centos7 upgrade the original kernel
Centos6.7 comes with python upgrade to
Remember a centos 7 kernel upgrade accident
Manually upgrade node version under CentOs
Manually upgrade node version under CentOs
CentOS + Python3.6+
Centos python3 compile installation and compile gcc upgrade
2019-07-09 CentOS7 installation
centos7_1708 installation
Centos 7.5 python3.6
Centos8 use yum to install rabbitmq tutorial