赞
踩
[root@rabbitmq63 dockercompose]# cat deploy_rabbimq.sh
#/bin/bash
case "$1" in
"restart")
docker ps -a | grep rabbitmq | awk '{print $1}'|xargs docker stop
docker-compose -f rabbimq_deploy.yaml up -d
;;
*)
docker ps -a | grep rabbitmq | awk '{print $1}'|xargs docker stop
docker ps -a | grep rabbitmq | awk '{print $1}'|xargs docker rm
docker-compose -f rabbimq_deploy.yaml up -d
;;
[root@rabbitmq63 dockercompose]# cat rabbimq_deploy.yaml version: '3.7' services: rabbitmq: image: rabbitmq:3.10-management container_name: rabbitmq restart: always privileged: true networks: mq-net: ipv4_address: 172.27.10.10 environment: - 'RABBITMQ_DEFAULT_USER=guest' - 'RABBITMQ_DEFAULT_PASS=guest' volumes: - /usr/local/rabbitmq/data:/var/lib/rabbitmq/ ports: - 5672:5672 - 15672:15672 networks: mq-net: driver: bridge ipam: config: - subnet: 172.27.10.0/24
./deploy_rabbimq.sh
delayed_message插件地址:https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/3.10.2/rabbitmq_delayed_message_exchange-3.10.2.ez
● 容器内部查看已有插件列表
rabbitmq-plugins list
● 容器内部查看插件目录
rabbitmq-plugins directories -s
●查看插件目录
root@rabbitmq-6bff494979-4jhtw:~# rabbitmq-plugins directories -s
Plugin archives directory: /opt/rabbitmq/plugins
Plugin expansion directory: /var/lib/rabbitmq/mnesia/rabbit@rabbitmq-6bff494979-4jhtw-plugins-expand
Enabled plugins file: /etc/rabbitmq/enabled_plugin
● 上传插件
docker cp /root/rabbitmq_delayed_message_exchange-3.10.2.ez 3d135065aa9b:/opt/rabbitmq/plugins
● 容器内部启动插件
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。