RabbitMQ 非官方镜像搭建
端口描述
- 集群必须开放 4369和25672端口 否则无法连接
端口 | 描述 |
---|---|
4369 | erlang集群监听端口 |
5671 | ssl客户端通信端口 |
5672 | 默认客户端通信端口 |
15571 | 管理web端口 |
25672 | 集群通信端口 |
搭建RabbitMQ集群
- 由3台服务器搭建Docker集群
主机描述
IP地址 主机名 描述 172.16.8.70 rabbitmq-ram 写入内存 172.16.8.72 rabbitmq-disc 写入硬盘 172.16.8.88 rabbitmq-stats
配置 rabbitmq-stats 服务器
version: '2'
networks:
default:
external:
name: bole-network
services:
rabbitmq:
image: bitnami/rabbitmq
restart: always
mem_limit: 1024m
hostname: rabbitmq-stats
container_name: rabbitmq
extra_hosts:
- "rabbitmq-ram:172.16.8.70"
- "rabbitmq-disc:172.16.8.72"
- "rabbitmq-stats:172.16.8.88"
environment:
- RABBITMQ_USERNAME=bole
- RABBITMQ_PASSWORD=password
- RABBITMQ_NODE_TYPE=stats
- RABBITMQ_NODE_NAME=rabbit@rabbitmq-stats
- RABBITMQ_ERL_COOKIE=s3cr3tc00ki3
volumes:
- /etc/localtime:/etc/localtime
ports:
- "25672:25672"
- "15672:15672"
- "5672:5672"
- "5671:5671"
- "4369:4369"
配置 rabbitmq-disc 服务器
version: '2'
networks:
default:
external:
name: bole-network
services:
rabbitmq:
image: bitnami/rabbitmq
restart: always
mem_limit: 1024m
hostname: rabbitmq-disc
container_name: rabbitmq
extra_hosts:
- "rabbitmq-ram:172.16.8.70"
- "rabbitmq-disc:172.16.8.72"
- "rabbitmq-stats:172.16.8.88"
environment:
- RABBITMQ_NODE_TYPE=queue-disc
- RABBITMQ_NODE_NAME=rabbit@rabbitmq-disc
- RABBITMQ_CLUSTER_NODE_NAME=rabbit@rabbitmq-stats
- RABBITMQ_ERL_COOKIE=s3cr3tc00ki3
volumes:
- /etc/localtime:/etc/localtime
ports:
- "25672:25672"
- "15672:15672"
- "5672:5672"
- "5671:5671"
- "4369:4369"
配置 rabbitmq-ram 服务器
version: '2'
networks:
default:
external:
name: bole-network
services:
rabbitmq:
image: bitnami/rabbitmq
restart: always
mem_limit: 1024m
hostname: rabbitmq-ram
container_name: rabbitmq
extra_hosts:
- "rabbitmq-ram:172.16.8.70"
- "rabbitmq-disc:172.16.8.72"
- "rabbitmq-stats:172.16.8.88"
environment:
- RABBITMQ_NODE_TYPE=queue-ram
- RABBITMQ_NODE_NAME=rabbit@rabbitmq-ram
- RABBITMQ_CLUSTER_NODE_NAME=rabbit@rabbitmq-stats
- RABBITMQ_ERL_COOKIE=s3cr3tc00ki3
volumes:
- /etc/localtime:/etc/localtime
ports:
- "25672:25672"
- "15672:15672"
- "5672:5672"
- "5671:5671"
- "4369:4369"
版权声明:
作者:Akiraka
链接:https://www.akiraka.net/linux/219.html
来源:Akiraka
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
海报
RabbitMQ 非官方镜像搭建
端口描述
集群必须开放 4369和25672端口 否则无法连接
端口
描述
4369
erlang集群监听端口
5671
ssl客户端通信端口
5672
默认客户端通信端口
1……
文章目录
关闭