赞
踩
mkdir -p /home/ecs-user/docker/rabbitmq/data/
在这里插入代码片
touch /home/ecs-user/docker/compose/rabbitamq.yml
vim /home/ecs-user/docker/compose/rabbitamq.yml
启动文件内容如下(仅供参考):
version: '3.8' networks: my_net: driver: bridge ipam: config: - subnet: 172.30.0.1/24 services: rabbitmq: image: rabbitmq container_name: rabbitmq restart: always deploy: resources: limits: memory: 1024m ports: - 5672:5672 environment: # 时区设置 - TZ=Asia/Shanghai volumes: - /home/ecs-user/docker/rabbitmq/data/:/var/lib/rabbitmq/ networks: my_net: ipv4_address: 172.30.0.11
docker-compose -f /home/ecs-user/docker/compose/rabbitamq.yml up -d
docker logs -f rabbitamq
docker ps
docker exec -it rabbitmq /bin/bash
cd /opt/rabbitmq/sbin
./rabbitmq-plugins enable rabbitmq_management
默认用户名:guest
默认密码:guest
以上是本人的随手笔记,不好之处多多见谅,不喜勿喷
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。