[root@localhost rabbitmq-data]# cat /root/mq.sh
#!/bin/bash
docker run -d -p 5671:5671 -p 5672:5672 -p 15672:15672 -p 15671:15671 -v /data/rabbitmq-data/:/var/rabbitmq/lib -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin --name rabbitmq rabbitmq:3.7-management
上传文件
ls /data/rabbitmq-data/rabbitmq_delayed_message_exchange-3.8.0.ez
进入docker
[root@localhost rabbitmq-data]# docker exec -it rabbitmq bash
拷贝文件
root@d18110a2fa72:~# cp /var/rabbitmq/lib/rabbitmq_delayed_message_exchange-3.8.0.ez /opt/rabbitmq/plugins/
启动插件
root@d18110a2fa72:~# rabbitmq-plugins enable rabbitmq_delayed_message_exchange
Enabling plugins on node rabbit@d18110a2fa72:
rabbitmq_delayed_message_exchange
The following plugins have been configured:
rabbitmq_delayed_message_exchange
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@d18110a2fa72...
The following plugins have been enabled:
rabbitmq_delayed_message_exchange
started 1 plugins.
root@d18110a2fa72:~# rabbitmq-plugins list
Listing plugins with pattern ".*" ...
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on rabbit@d18110a2fa72
|/
[ ] rabbitmq_amqp1_0 3.7.28
[ ] rabbitmq_auth_backend_cache 3.7.28
[ ] rabbitmq_auth_backend_http 3.7.28
[ ] rabbitmq_auth_backend_ldap 3.7.28
[ ] rabbitmq_auth_mechanism_ssl 3.7.28
[ ] rabbitmq_consistent_hash_exchange 3.7.28
[E*] rabbitmq_delayed_message_exchange 3.8.0
[ ] rabbitmq_event_exchange 3.7.28
[ ] rabbitmq_federation 3.7.28
[ ] rabbitmq_federation_management 3.7.28
[ ] rabbitmq_jms_topic_exchange 3.7.28
[E*] rabbitmq_management 3.7.28
[e*] rabbitmq_management_agent 3.7.28
[ ] rabbitmq_mqtt 3.7.28
[ ] rabbitmq_peer_discovery_aws 3.7.28
[ ] rabbitmq_peer_discovery_common 3.7.28
[ ] rabbitmq_peer_discovery_consul 3.7.28
[ ] rabbitmq_peer_discovery_etcd 3.7.28
[ ] rabbitmq_peer_discovery_k8s 3.7.28
[ ] rabbitmq_random_exchange 3.7.28
[ ] rabbitmq_recent_history_exchange 3.7.28
[ ] rabbitmq_sharding 3.7.28
[ ] rabbitmq_shovel 3.7.28
[ ] rabbitmq_shovel_management 3.7.28
[ ] rabbitmq_stomp 3.7.28
[ ] rabbitmq_top 3.7.28
[ ] rabbitmq_tracing 3.7.28
[ ] rabbitmq_trust_store 3.7.28
[e*] rabbitmq_web_dispatch 3.7.28
[ ] rabbitmq_web_mqtt 3.7.28
[ ] rabbitmq_web_mqtt_examples 3.7.28
[ ] rabbitmq_web_stomp 3.7.28
[ ] rabbitmq_web_stomp_examples 3.7.28