docker-compose安装RabbitMQ
作者:互联网
- RabbitMQ Compose 配置文件
点击查看代码
version: '3.9'
services:
rabbitmq:
image: rabbitmq:3.9-management
restart: always
container_name: rabbitmq3.9
hostname: rabbitmq3.9
privileged: true
ports:
- 5672:5672
- 15672:15672
volumes:
- /var/rabbitmq/data:/var/lib/rabbitmq3/
- /var/rabbitmq/log:/var/log/rabbitmq3/
- /var/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
networks:
- backend
networks:
backend:
2:创建 rabbitmq.conf 文件 ,创建指定数据、日志目录:
点击查看代码
default_vhost = /
default_user = admin
default_pass = 123456
# 运行 root 账号进行远程访问
loopback_users.admin = none
# 设置 root 账户的标签
default_user_tags.administrator = true
# 设置 root 账号的权限
default_permissions.configure = .*
default_permissions.read = .*
default_permissions.write = .*
# 设置默认端口
listeners.tcp.default = 5672
3:切换到指定目录,执行docker-compose up -d 命令
4:浏览器输入指定ip+port,访问rabbitmq管理界面:
5:至此,rabbimq已经安装完毕,希望我的点滴记录,能对你有所帮助。
标签:compose,default,rabbitmq,5672,RabbitMQ,var,docker,root,permissions 来源: https://www.cnblogs.com/RaymonGoGo/p/16367203.html