侧边栏壁纸
博主头像
WinJay博主等级

博观而约取 厚积而薄发

  • 累计撰写 333 篇文章
  • 累计创建 168 个标签
  • 累计收到 2 条评论

目 录CONTENT

文章目录

Docker RabbitMQ镜像集群部署

WinJay
2022-11-18 / 0 评论 / 0 点赞 / 6 阅读 / 3,335 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2022-11-18,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

Docker RabbitMQ镜像集群部署

image-20221118162413491

1.RabbitMQ的端口号是什么?

  • 4369:erlang发现口号;

  • 5672 :这是RabbitMQ的端口号,client端通信口号;

  • 15672 :RabbitMQWeb管理界面ui的端口号;

  • 25672 :server间内部通信口号;

2.RabbitMQ的架构是什么样的?

publisher发消息(生产者)——> 消息队列[exchange交换机——>Routes路由——>Queue队列] ——>consumer收消息(消费者)

  • Publisher: 生产者,发布消息到MQ中的。
  • Consumer:消费者,从MQ中接收消息的。
  • Exchange:交换机,建立生产者和队列之间联系。
  • Queue:队列,存储消息的。
  • Routes:路由,交换机以什么样的策略将消息发送给队列。

RabbitMQ完整的结构图:

  • Virutal Host 是一个虚拟主机(逻辑上的一个隔断);
  • 虚拟主机里面有交换机;还有队列;
  • 生产者发消息给消费者,中间要找一个桥梁就是rabbitMQ;
  • 生产者发消息给队列首先要建立Connetion对象链接;有了链接之后就可以构建一个通道(Channel)了;一个通道对应一个交换机;
  • 交换机发送给队列需要通过路由routes;routes(路由)它决定了消息到底发送给哪一个队列;
  • 消费者想从队列里面取数据首先也是要建立一个链接Connection对象;有了链接就可以开辟一个通道了;

在这里插入图片描述

RabbitMQ的通信过程:

  • 1、生产者建立与MQ的连接。
  • 2、建立与具体交换机的通道。
  • 3、交换机根据不同的路由规则,将消息发送给对应的队列。
  • 4、消费者根据通道消费对应队列中的数据,消费一个数据队列中就少一个数据,一个队列中数据只能被消费一次

注意:

  • 消费掉一个数据,队列中就少一个数据;
  • 我们不希望各个生产者之间互相影响;所以我们要把他们进行隔离;隔离的方式就是创建虚拟机;

docker-compose部署RabbitMQ镜像集群

1、docker-ce安装

[root@localhost ~]# vim /etc/yum.repos.d/docker-ce.repo
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stable
enabled=1
gpgcheck=0

[root@SPHQOPENAPIMQ01 ~]# yum install docker-ce -y
1.2.3.4.5.6.7.8.

2、docker-compose安装

[root@localhost ~]# yum install -y python-pip
[root@localhost ~]# pip install -U docker-compose
[root@localhost ~]# docker-compose version
docker-compose version 1.21.0, build 5920eb0
docker-py version: 3.2.1
CPython version: 2.7.5
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
1.2.3.4.5.6.7.

3、下载rabbitmq镜像

[root@localhost ~]# docker pull rabbitmq:3.8-management

4、编写docker-compose.yml

[root@Test rcloud]# cd /mnt/
[root@Test mnt]# mkdir RabbitMQ-Cluster
[root@Test mnt]# cd RabbitMQ-Cluster/
[root@Test RabbitMQ-Cluster]# ls
[root@Test RabbitMQ-Cluster]# vim docker-compose.yml
version: '3'
services:
    RabbitMQ1:
        image: rabbitmq:3.8-management
        container_name: RabbitMQ1
        ports:
          - "15673:15672"
          - "5673:5672"
        hostname: RabbitMQ1
        environment:
          - RABBITMQ_ERLANG_COOKIE=rabbitcookie
        volumes:
          - ./RabbitMQ1:/var/lib/rabbitmq
          - /etc/localtime:/etc/localtime

    RabbitMQ2:
        image: rabbitmq:3.8-management
        container_name: RabbitMQ2
        ports:
          - "15674:15672"
          - "5674:5672"
        hostname: RabbitMQ2
        environment:
          - RABBITMQ_ERLANG_COOKIE=rabbitcookie
        volumes:
          - ./RabbitMQ2:/var/lib/rabbitmq
          - /etc/localtime:/etc/localtime

    RabbitMQ3:
        image: rabbitmq:3.8-management
        container_name: RabbitMQ3
        ports:
          - "15675:15672"
          - "5675:5672"
        hostname: RabbitMQ3
        environment:
          - RABBITMQ_ERLANG_COOKIE=rabbitcookie
        volumes:
          - ./RabbitMQ3:/var/lib/rabbitmq
          - /etc/localtime:/etc/localtime

5、创建docker-compose中定义的目录

[root@Test RabbitMQ-Cluster]# mkdir RabbitMQ{1,2,3}
[root@Test RabbitMQ-Cluster]# mkdir nginx
[root@Test RabbitMQ-Cluster]# ls
docker-compose.yml  nginx  RabbitMQ1  RabbitMQ2  RabbitMQ3

6、启动rabbitmq镜像集群

[root@GitLab 010.RabbitMQ-Cluster]# docker-compose up -d
[+] Running 4/4
 ⠿ Network 010rabbitmq-cluster_default  Created       0.0s
 ⠿ Container RabbitMQ3                  Started       0.7s
 ⠿ Container RabbitMQ2                  Started       0.6s
 ⠿ Container RabbitMQ1                  Started       0.7s 
 
[root@GitLab 010.RabbitMQ-Cluster]# docker ps -a | grep MQ
dad76d2efa9b   rabbitmq:3.8-management              "docker-entrypoint.s…"   13 seconds ago   Up 13 seconds                   4369/tcp, 5671/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:5673->5672/tcp, :::5673->5672/tcp, 0.0.0.0:15673->15672/tcp, :::15673->15672/tcp   RabbitMQ1
3172710d91e4   rabbitmq:3.8-management              "docker-entrypoint.s…"   13 seconds ago   Up 13 seconds                   4369/tcp, 5671/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:5675->5672/tcp, :::5675->5672/tcp, 0.0.0.0:15675->15672/tcp, :::15675->15672/tcp   RabbitMQ3
0245c160cac2   rabbitmq:3.8-management              "docker-entrypoint.s…"   13 seconds ago   Up 13 seconds                   4369/tcp, 5671/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:5674->5672/tcp, :::5674->5672/tcp, 0.0.0.0:15674->15672/tcp, :::15674->15672/tcp   RabbitMQ2

  • 创建初始化集群脚本文件

[root@Test RabbitMQ-Cluster]#  vim init_rabbitmq.sh
#!/bin/bash

#reset first node
echo "Reset first rabbitmq node."
docker exec RabbitMQ1 /bin/bash -c 'rabbitmqctl stop_app'
docker exec RabbitMQ1 /bin/bash -c 'rabbitmqctl reset'
docker exec RabbitMQ1 /bin/bash -c 'rabbitmqctl start_app'

#build cluster
echo "Starting to build rabbitmq cluster with two ram nodes."
docker exec RabbitMQ2 /bin/bash -c 'rabbitmqctl stop_app'
docker exec RabbitMQ2 /bin/bash -c 'rabbitmqctl reset'
docker exec RabbitMQ2 /bin/bash -c 'rabbitmqctl join_cluster --ram rabbit@RabbitMQ1'
docker exec RabbitMQ2 /bin/bash -c 'rabbitmqctl start_app'

docker exec RabbitMQ3 /bin/bash -c 'rabbitmqctl stop_app'
docker exec RabbitMQ3 /bin/bash -c 'rabbitmqctl reset'
docker exec RabbitMQ3 /bin/bash -c 'rabbitmqctl join_cluster --ram rabbit@RabbitMQ1'
docker exec RabbitMQ3 /bin/bash -c 'rabbitmqctl start_app'

#check cluster status
echo "Check cluster status:"
docker exec RabbitMQ1 /bin/bash -c 'rabbitmqctl cluster_status'
docker exec RabbitMQ2 /bin/bash -c 'rabbitmqctl cluster_status'
docker exec RabbitMQ3 /bin/bash -c 'rabbitmqctl cluster_status'
  • 执行初始化集群脚本

[root@GitLab 010.RabbitMQ-Cluster]# chmod +x init_rabbitmq.sh
[root@GitLab 010.RabbitMQ-Cluster]# sh init_rabbitmq.sh #初始化镜像集群
[root@GitLab 010.RabbitMQ-Cluster]# ./init_rabbitmq.sh 
Reset first rabbitmq node.
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Stopping rabbit application on node rabbit@RabbitMQ1 ...
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Resetting node rabbit@RabbitMQ1 ...
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Starting node rabbit@RabbitMQ1 ...
Starting to build rabbitmq cluster with two ram nodes.
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Stopping rabbit application on node rabbit@RabbitMQ2 ...
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Resetting node rabbit@RabbitMQ2 ...
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Clustering node rabbit@RabbitMQ2 with rabbit@RabbitMQ1
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Starting node rabbit@RabbitMQ2 ...
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Stopping rabbit application on node rabbit@RabbitMQ3 ...
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Resetting node rabbit@RabbitMQ3 ...
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Clustering node rabbit@RabbitMQ3 with rabbit@RabbitMQ1
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Starting node rabbit@RabbitMQ3 ...
Check cluster status:
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Cluster status of node rabbit@RabbitMQ1 ...
Basics

Cluster name: rabbit@RabbitMQ1

Disk Nodes

rabbit@RabbitMQ1

RAM Nodes

rabbit@RabbitMQ2
rabbit@RabbitMQ3

Running Nodes

rabbit@RabbitMQ1
rabbit@RabbitMQ2
rabbit@RabbitMQ3

Versions

rabbit@RabbitMQ1: RabbitMQ 3.8.26 on Erlang 24.2
rabbit@RabbitMQ2: RabbitMQ 3.8.26 on Erlang 24.2
rabbit@RabbitMQ3: RabbitMQ 3.8.26 on Erlang 24.2

Maintenance status

Node: rabbit@RabbitMQ1, status: not under maintenance
Node: rabbit@RabbitMQ2, status: not under maintenance
Node: rabbit@RabbitMQ3, status: not under maintenance

Alarms

(none)

Network Partitions

(none)

Listeners

Node: rabbit@RabbitMQ1, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@RabbitMQ1, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Node: rabbit@RabbitMQ1, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@RabbitMQ1, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Node: rabbit@RabbitMQ2, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@RabbitMQ2, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Node: rabbit@RabbitMQ2, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@RabbitMQ2, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Node: rabbit@RabbitMQ3, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@RabbitMQ3, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Node: rabbit@RabbitMQ3, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@RabbitMQ3, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0

Feature flags

Flag: drop_unroutable_metric, state: enabled
Flag: empty_basic_get_metric, state: enabled
Flag: implicit_default_bindings, state: enabled
Flag: maintenance_mode_status, state: enabled
Flag: quorum_queue, state: enabled
Flag: user_limits, state: enabled
Flag: virtual_host_metadata, state: enabled
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Cluster status of node rabbit@RabbitMQ2 ...
Basics

Cluster name: rabbit@RabbitMQ2

Disk Nodes

rabbit@RabbitMQ1

RAM Nodes

rabbit@RabbitMQ2
rabbit@RabbitMQ3

Running Nodes

rabbit@RabbitMQ1
rabbit@RabbitMQ2
rabbit@RabbitMQ3

Versions

rabbit@RabbitMQ1: RabbitMQ 3.8.26 on Erlang 24.2
rabbit@RabbitMQ2: RabbitMQ 3.8.26 on Erlang 24.2
rabbit@RabbitMQ3: RabbitMQ 3.8.26 on Erlang 24.2

Maintenance status

Node: rabbit@RabbitMQ1, status: not under maintenance
Node: rabbit@RabbitMQ2, status: not under maintenance
Node: rabbit@RabbitMQ3, status: not under maintenance

Alarms

(none)

Network Partitions

(none)

Listeners

Node: rabbit@RabbitMQ1, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@RabbitMQ1, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Node: rabbit@RabbitMQ1, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@RabbitMQ1, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Node: rabbit@RabbitMQ2, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@RabbitMQ2, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Node: rabbit@RabbitMQ2, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@RabbitMQ2, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Node: rabbit@RabbitMQ3, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@RabbitMQ3, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Node: rabbit@RabbitMQ3, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@RabbitMQ3, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0

Feature flags

Flag: drop_unroutable_metric, state: enabled
Flag: empty_basic_get_metric, state: enabled
Flag: implicit_default_bindings, state: enabled
Flag: maintenance_mode_status, state: enabled
Flag: quorum_queue, state: enabled
Flag: user_limits, state: enabled
Flag: virtual_host_metadata, state: enabled
RABBITMQ_ERLANG_COOKIE env variable support is deprecated and will be REMOVED in a future version. Use the $HOME/.erlang.cookie file or the --erlang-cookie switch instead.
Cluster status of node rabbit@RabbitMQ3 ...
Basics

Cluster name: rabbit@RabbitMQ3

Disk Nodes

rabbit@RabbitMQ1

RAM Nodes

rabbit@RabbitMQ2
rabbit@RabbitMQ3

Running Nodes

rabbit@RabbitMQ1
rabbit@RabbitMQ2
rabbit@RabbitMQ3

Versions

rabbit@RabbitMQ1: RabbitMQ 3.8.26 on Erlang 24.2
rabbit@RabbitMQ2: RabbitMQ 3.8.26 on Erlang 24.2
rabbit@RabbitMQ3: RabbitMQ 3.8.26 on Erlang 24.2

Maintenance status

Node: rabbit@RabbitMQ1, status: not under maintenance
Node: rabbit@RabbitMQ2, status: not under maintenance
Node: rabbit@RabbitMQ3, status: not under maintenance

Alarms

(none)

Network Partitions

(none)

Listeners

Node: rabbit@RabbitMQ1, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@RabbitMQ1, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Node: rabbit@RabbitMQ1, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@RabbitMQ1, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Node: rabbit@RabbitMQ2, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@RabbitMQ2, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Node: rabbit@RabbitMQ2, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@RabbitMQ2, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Node: rabbit@RabbitMQ3, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@RabbitMQ3, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Node: rabbit@RabbitMQ3, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@RabbitMQ3, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0

Feature flags

Flag: drop_unroutable_metric, state: enabled
Flag: empty_basic_get_metric, state: enabled
Flag: implicit_default_bindings, state: enabled
Flag: maintenance_mode_status, state: enabled
Flag: quorum_queue, state: enabled
Flag: user_limits, state: enabled
Flag: virtual_host_metadata, state: enabled

6、配置nginx反向代理到镜像集群通信

[root@Test RabbitMQ-Cluster]# cd nginx/
[root@Test nginx]# vim nginx.conf
  • 创建nginx配置文件

user  nginx;
worker_processes  2;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;
	
	proxy_redirect          off;
	proxy_set_header        Host $host;
	proxy_set_header        X-Real-IP $remote_addr;
	proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
	client_max_body_size    10m;
	client_body_buffer_size   128k;
	proxy_connect_timeout   5s;
	proxy_send_timeout      5s;
	proxy_read_timeout      5s;
	proxy_buffer_size        4k;
	proxy_buffers           4 32k;
	proxy_busy_buffers_size  64k;
	proxy_temp_file_write_size 64k;
    
    
	#rabbitmq管理界面--Http
	upstream rabbitManage {
		server 10.17.0.16:15673;
		server 10.17.0.16:15674;
		server 10.17.0.16:15675;
	}
    
	server {
        listen       15672;
        server_name  10.17.0.16; 
        location / {  
            proxy_pass   http://rabbitManage;
            index  index.html index.htm;  
        }  

    }
}

# ========================================
# rabbitmq通信--Tcp
stream{
	upstream rabbitTcp{
        server 10.17.0.16:5673;
        server 10.17.0.16:5674;
        server 10.17.0.16:5675;
    }

    server {
        listen 5672;
        proxy_pass rabbitTcp;
    }
}
# 单独配置文件方式

# cat conf.d/010.dev-MQ.conf 
upstream rabbitManage {
    server 10.17.0.16:15673;
    server 10.17.0.16:15674;
    server 10.17.0.16:15675;
}


server {
    listen 80;
    server_name dev-mq.litsoft.com.cn;
    rewrite ^(.*)$ https://${server_name}$1 permanent;

}

server {
    listen 443 ssl;
    server_name  dev-mq.litsoft.com.cn;

    ssl_certificate conf.d/ssl/litsoft.pem;
    ssl_certificate_key conf.d/ssl/litsoft.key;
    include conf.d/000.basic.ssl; 



   location / {  
        proxy_pass   http://rabbitManage;
        index  index.html index.htm;
        proxy_redirect          off;
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        client_max_body_size    10m;
        client_body_buffer_size   128k;
        proxy_connect_timeout   5s;
        proxy_send_timeout      5s;
        proxy_read_timeout      5s;
        proxy_buffer_size        4k;
        proxy_buffers           4 32k;
        proxy_busy_buffers_size  64k;
        proxy_temp_file_write_size 64k;
    }  
    include conf.d/000.basic.common;

}
  • 启动Nginx反向代理容器

docker run -it -d --name nginxRabbitmq -v `pwd`/nginx/nginx.conf:/etc/nginx/nginx.conf  --privileged -p 8001:80 -p 15672:15672 -p 5672:5672 nginx:1.20.2

7、部署portainer容器界面化管理

docker run -itd -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --name portainer docker.io/portainer/portainer-ce:2.14.0

访问: http://10.17.0.16:9000 首次访问提示创建密码
docker-compose部署RabbitMQ镜像集群_bash

8、访问rabbitmq的管理页面

访问:http://10.17.0.16:15672 默认账号密码: guest/guest

image-20220623172223277

image-20220623172207567

9.添加用户

image-20220623172340444

image-20220623172405758

image-20220623172435421

image-20220623172446142

10.如何验证是镜像模式?

11.Docker Compose network配置

https://blog.csdn.net/lclfans1983/article/details/113179582

0

评论区