0%

RabbitMQ 安装

RabbitMQ 安装

RabbitMQ官网

安装 RabbitMQ

docker需要先装好

使用 docker-compose

1
2
3
4
5
[[email protected] ~]# mkdir rabbitmq
[[email protected] ~]# cd rabbitmq/
[[email protected] rabbitmq]# mkdir data
[[email protected] rabbitmq]# mkdir log
[[email protected] rabbitmq]# vi docker-compose.yml

docker-compose.yml 内容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
version: '2'
services:
rabbitmq:
hostname: rabbitmq
environment:
RABBITMQ_DEFAULT_VHOST: "xxx"
RABBITMQ_DEFAULT_USER: "admin"
RABBITMQ_DEFAULT_PASS: "admin"
image: "rabbitmq:3-management"
restart: always
volumes:
- "./data:/var/lib/rabbitmq"
- "./log:/var/log/rabbitmq/log"
ports:
- "4369:4369"
- "5672:5672"
- "15672:15672"
- "25672:25672"

启动 docker 容器

1
docker-compose up -d

  • 5672:默认的客户端连接的端口
  • 15672:默认的web管理界面的端口

访问15672端口出现下面界面代表RabbitMQ安装成功

账号密码为

1
2
RABBITMQ_DEFAULT_USER: "admin"
RABBITMQ_DEFAULT_PASS: "admin"

RabbitMQ 基础知识

欢迎关注我的其它发布渠道