centos7的rabbitmq升级到3.7.10集群

centos7的rabbitmq升级到3.7.10集群
#卸载
[[email protected] ~]# systemctl stop rabbitmq-server

[[email protected] ~]# yum remove rabbitmq-server -y

[[email protected] yum.repos.d]# yum remove erlang* -y
[[email protected] ~]# rm -rf /var/lib/rabbitmq/

1 安装erlang

curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
yum install erlang -y

查看版本:
erl

3.安装rabbitmq(当前目录为rabbitmq-server-3.7.10-1.el7.noarch.rpm包的目录下)
[[email protected] ~]#wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.10/rabbitmq-server-3.7.10-1.el7.noarch.rpm
[[email protected] ~]#yum install -y rabbitmq-server-3.7.10-1.el7.noarch.rpm

[[email protected] ~]# systemctl start rabbitmq-server
[[email protected] ~]# systemctl enable rabbitmq-server

############

[[email protected] yum.repos.d]# rabbitmqctl add_user admin admin
Creating user "admin" ...
[[email protected] yum.repos.d]# rabbitmqctl set_permissions admin ".*" ".*" ".*"
Setting permissions for user "admin" in vhost "/" ...
密码设置成admin

[[email protected] ~]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management

Applying plugin configuration to [email protected] started 6 plugins.
[[email protected] ~]# systemctl restart rabbitmq-server
[[email protected] ~]# netstat -lntup|grep 5672
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 15851/beam
tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 15851/beam
tcp6 0 0 :::5672 :::* LISTEN 15851/beam

无法登录页面,参考:
https://blog.csdn.net/shenhonglei1234/article/details/82745601
vim /usr/lib/rabbitmq/lib/rabbitmq_server-3.7.10/ebin/rabbit.app
将:{loopback_users, [<<”guest”>>]},
改为:{loopback_users, []},
原因:rabbitmq从3.3.0开始禁止使用guest/guest权限通过除localhost外的访问
====登录页面修改密码,重置角色,略

将node1上的.erlang.cookie传输到node2、node3,并保证权限一直
[[email protected] ~]# scp /var/lib/rabbitmq/.erlang.cookie 192.168.56.12:/var/lib/rabbitmq/
#[[email protected] ~]# scp /var/lib/rabbitmq/.erlang.cookie 192.168.56.13:/var/lib/rabbitmq/

先停止运行节点,然后以后台方式启动 RabbitMQ Server(node1和node2分别执行):

[[email protected] ~]# systemctl stop rabbitmq-server
[[email protected] ~]# rabbitmq-server -detached
Warning: PID file not written; -detached was passed.

[[email protected] ~]# systemctl stop rabbitmq-server
[[email protected] ~]# rabbitmq-server -detached
Warning: PID file not written; -detached was passed.

然后我们以node1作为集群中心,在node2上执行加入集群中心命令(节点类型为磁盘节点):

[[email protected] ~]# rabbitmqctl stop_app
[[email protected] ~]# rabbitmqctl reset
[[email protected] ~]# rabbitmqctl join_cluster [email protected]
//默认是磁盘节点,如果是内存节点的话,需要加--ram参数
[[email protected] ~]# rabbitmqctl start_app

查看集群的状态(包含node1和node2节点):
[[email protected] ~]# rabbitmqctl cluster_status
Cluster status of node ‘[email protected]‘ ...
[{nodes,[{disc,[‘[email protected]‘,‘[email protected]‘]}]},
{running_nodes,[‘[email protected]‘,‘[email protected]‘]},
{cluster_name,<<"[email protected]">>},
{partitions,[]}]

#镜像模式
[[email protected] ~]# rabbitmqctl set_policy ha-all "^" ‘{"ha-mode":"all","ha-sync-mode":"automatic"}‘
Setting policy "ha-all" for pattern "^" to "{\"ha-mode\":\"all\",\"ha-sync-mode\":\"automatic\"}" with priority "0" ...
...done.

原文地址:https://www.cnblogs.com/wangkaiok/p/11942855.html

时间: 2024-11-09 05:47:11

centos7的rabbitmq升级到3.7.10集群的相关文章

CentOS7.5搭建Solr7.4.0单机版与集群版

一.Solr安装环境 1.官方参考文档 Solr教程参考指南:http://lucene.apache.org/solr/guide/7_4/solr-tutorial.html 2.Solr运行环境 系统要求:Java 8+      这里我们把solr服务部署到Tomacat服务器中,Tomcat安装过程参考:https://www.cnblogs.com/frankdeng/p/9597699.html 在solr5以前solr的启动都有tomcat作为容器,但是从solr5以后solr内

Centos7下ELK+Redis日志分析平台的集群环境部署记录

之前的文档介绍了ELK的架构基础知识,下面简单记录下ELK结合Redis搭建日志分析平台的集群环境部署过程,大致的架构如下: + Elasticsearch是一个分布式搜索分析引擎,稳定.可水平扩展.易于管理是它的主要设计初衷 + Logstash是一个灵活的数据收集.加工和传输的管道软件 + Kibana是一个数据可视化平台,可以通过将数据转化为酷炫而强大的图像而实现与数据的交互将三者的收集加工,存储分析和可视转化整合在一起就形成了ELK. 基本流程:1)Logstash-Shipper获取日

Redis4.0.10集群搭建

192.168.254.128192.168.254.129192.168.254.127注意事项安裝 GCC 编译工具 不然会有编译不过的问题yum install -y gcc g++ gcc-c++ make升级所有的包,防止出现版本过久不兼容问题yum -y update 环境准备安装ruby: 关闭防火墙 节点之前需要开放指定端口,为了方便,生产不要禁用centos 6.xservice iptables stop # 关闭命令:centos 7.xsystemctl stop fir

rabbitmq安装及基本操作(含集群配置)

一.rabbitmq的安装 因为rabbitmq是基于 erlang语言开发,所有要先安装erlang 1.安装erlang 这里我下载的是19.2的版本,地址为https://www.erlang.org/downloads/19.2 下载编译安装包: cd /mnt wget http://erlang.org/download/otp_src_19.2.tar.gz 解缩 tar -zxvf otp_src_19.2.tar.gz 安装编译依赖 yum -y install gcc gcc

CentOS7.5搭建Hadoop2.7.6完全分布式集群

一 完全分布式集群(单点) Hadoop官方地址:http://hadoop.apache.org/ 1  准备3台客户机 1.1防火墙,静态IP,主机名 关闭防火墙,设置静态IP,主机名此处略,参考  Linux之CentOS7.5安装及克隆 1.2 修改host文件 我们希望三个主机之间都能够使用主机名称的方式相互访问而不是IP,我们需要在hosts中配置其他主机的host.因此我们在主机的/etc/hosts下均进行如下配置: [root@node21 ~]# vi /etc/hosts

Rabbitmq +Haproxy +keepalived 实现高可用集群

搭建rabbitmq的高可用集群,分三步走: 1)搭建rabbitmq集群: 多机集群搭建 1.安装单机版的 教程:<Linux下安装rabbitmq> (安装rpm包或者源码包,这里简单介绍下安装rpm包) wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.1/rabbitmq-server-3.5.1-1.noarch.rpm rpm -i --nodeps rabbitmq-server-3.5.1-1.noarch.r

Zookeeper3.4.10集群部署

在安装Zookeeper之前,首先需要确保的就是主机名称(可选).hosts都已经更改,并且JDK成功安装. #vim /etc/hosts 添加zookeeper服务器IP.主机名,例如: 113.106.77.50 zookeeper-1 1.安装Zookeeper 使用命令"tar -zxvf"命令将gz压缩文件解压.,解压后的目录为/app/zookeeper-3.4.10,最好确保Master.Slave1.Slave2机器上的Zookeeper安装路径一致. 2.配置Zoo

kubeadm安装Kubernetes V1.10集群详细文档

1:服务器信息以及节点介绍 系统信息:centos1708 minimal    只修改IP地址 主机名称 IP 备注 node01 192.168.150.181 master and etcd rode02 192.168.150.182 master and etcd node03 192.168.150.183 master and etcd node04 192.168.150.184 node VIP 192.168.150.186 软件版本: docker17.03.2-ce so

安装Redis 4.0.10集群

一.安装Ruby和Remgem 1.安装rvm [Ruby Version Manager] 到网站 https://rvm.io/ 看看安装命令提示 a.[安装密钥服务器]执行 #gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB b.[安装rvm]执行 #\curl -sSL http