windows11下 podman-desktop 复制插件文件 到 RabbitMQ 容器内,并启用

目的: 刚启用的 RabbitMQ 容器,发现没有rabbitmq_delayed_message_exchange 插件,开始手动安装

官网

https://www.rabbitmq.com/community-plugins

https://github.com/rabbitmq/rabbitmq-delayed-message-exchange

下载rabbitmq_delayed_message_exchange-4.0.2.ez, 解压缩后目录是rabbitmq_delayed_message_exchange-4.0.2

查看 podman 虚拟机

bash 复制代码
podman machine list

输出

bash 复制代码
NAME                    VM TYPE     CREATED      LAST UP            CPUS        MEMORY      DISK SIZE
podman-machine-default  wsl         8 hours ago  Currently running  8           2GiB        100GiB

进入默认 podman 虚拟机

bash 复制代码
podman machine ssh

查看 盘符映射

bash 复制代码
ls -asl /mnt

查看 虚拟机内 podman 容器

bash 复制代码
podman ps

输出

bash 复制代码
CONTAINER ID  IMAGE                                    COMMAND          CREATED      STATUS      PORTS
             NAMES
045723fe3135  docker.io/library/rabbitmq:4-management  rabbitmq-server  5 hours ago  Up 5 hours  0.0.0.0:5672->5672/tcp, 0.0.0.0:15672->15672/tcp, 4369/tcp, 5671/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp  rabbitmq

复制文件

我的文件是在dwork 目录下rabbitmq_delayed_message_exchange-4.0.2

那么 在 虚拟机内的目录是 /mnt/d/work/rabbitmq_delayed_message_exchange-4.0.2

bash 复制代码
 podman cp /mnt/d/work/rabbitmq_delayed_message_exchange-4.0.2 045723fe3135:/opt/rabbitmq/plugins/

进入容器内

bash 复制代码
podman exec -it rabbitmq bash

查看

bash 复制代码
cd /opt/rabbitmq/plugins/
ls -asl

输出

bash 复制代码
README                         rabbit-4.0.5                             rabbitmq_recent_history_exchange-4.0.5
accept-0.3.5                   rabbit_common-4.0.5                      rabbitmq_sharding-4.0.5
amqp10_client-4.0.5            rabbitmq_amqp1_0-4.0.5                   rabbitmq_shovel-4.0.5
amqp10_common-4.0.5            rabbitmq_auth_backend_cache-4.0.5        rabbitmq_shovel_management-4.0.5
amqp_client-4.0.5              rabbitmq_auth_backend_http-4.0.5         rabbitmq_shovel_prometheus-4.0.5
aten-0.6.0                     rabbitmq_auth_backend_ldap-4.0.5         rabbitmq_stomp-4.0.5
base64url-1.0.1                rabbitmq_auth_backend_oauth2-4.0.5       rabbitmq_stream-4.0.5
cowboy-2.12.0                  rabbitmq_auth_mechanism_ssl-4.0.5        rabbitmq_stream_common-4.0.5
cowlib-2.13.0                  rabbitmq_aws-4.0.5                       rabbitmq_stream_management-4.0.5
credentials_obfuscation-3.4.0  rabbitmq_consistent_hash_exchange-4.0.5  rabbitmq_top-4.0.5
cuttlefish-3.4.0               rabbitmq_event_exchange-4.0.5            rabbitmq_tracing-4.0.5
eetcd-0.3.6                    rabbitmq_federation-4.0.5                rabbitmq_trust_store-4.0.5
enough-0.1.0                   rabbitmq_federation_management-4.0.5     rabbitmq_web_dispatch-4.0.5
gen_batch_server-0.8.8         rabbitmq_federation_prometheus-4.0.5     rabbitmq_web_mqtt-4.0.5
getopt-1.0.3                   rabbitmq_jms_topic_exchange-4.0.5        rabbitmq_web_mqtt_examples-4.0.5
gun-1.3.3                      rabbitmq_management-4.0.5                rabbitmq_web_stomp-4.0.5
horus-0.3.1                    rabbitmq_management_agent-4.0.5          rabbitmq_web_stomp_examples-4.0.5
jose-1.11.10                   rabbitmq_mqtt-4.0.5                      ranch-2.1.0
khepri-0.16.0                  rabbitmq_peer_discovery_aws-4.0.5        recon-2.5.6
khepri_mnesia_migration-0.7.1  rabbitmq_peer_discovery_common-4.0.5     redbug-2.1.0
oauth2_client-4.0.5            rabbitmq_peer_discovery_consul-4.0.5     seshat-0.6.1
amqp_client-4.0.5              rabbitmq_auth_backend_ldap-4.0.5         rabbitmq_stomp-4.0.5
aten-0.6.0                     rabbitmq_auth_backend_oauth2-4.0.5       rabbitmq_stream-4.0.5
base64url-1.0.1                rabbitmq_auth_mechanism_ssl-4.0.5        rabbitmq_stream_common-4.0.5
cowboy-2.12.0                  rabbitmq_aws-4.0.5                       rabbitmq_stream_management-4.0.5
cowlib-2.13.0                  rabbitmq_consistent_hash_exchange-4.0.5  rabbitmq_top-4.0.5
credentials_obfuscation-3.4.0  rabbitmq_delayed_message_exchange-4.0.2  rabbitmq_tracing-4.0.5
cuttlefish-3.4.0               rabbitmq_event_exchange-4.0.5            rabbitmq_trust_store-4.0.5
eetcd-0.3.6                    rabbitmq_federation-4.0.5                rabbitmq_web_dispatch-4.0.5
enough-0.1.0                   rabbitmq_federation_management-4.0.5     rabbitmq_web_mqtt-4.0.5
gen_batch_server-0.8.8         rabbitmq_federation_prometheus-4.0.5     rabbitmq_web_mqtt_examples-4.0.5
getopt-1.0.3                   rabbitmq_jms_topic_exchange-4.0.5        rabbitmq_web_stomp-4.0.5
gun-1.3.3                      rabbitmq_management-4.0.5                rabbitmq_web_stomp_examples-4.0.5
horus-0.3.1                    rabbitmq_management_agent-4.0.5          ranch-2.1.0
jose-1.11.10                   rabbitmq_mqtt-4.0.5                      recon-2.5.6
khepri-0.16.0                  rabbitmq_peer_discovery_aws-4.0.5        redbug-2.1.0
khepri_mnesia_migration-0.7.1  rabbitmq_peer_discovery_common-4.0.5     seshat-0.6.1
oauth2_client-4.0.5            rabbitmq_peer_discovery_consul-4.0.5     stdout_formatter-0.2.4
observer_cli-1.7.5             rabbitmq_peer_discovery_etcd-4.0.5       syslog-4.0.0
osiris-1.8.5                   rabbitmq_peer_discovery_k8s-4.0.5        sysmon_handler-1.3.0
prometheus-4.11.0              rabbitmq_prelaunch-4.0.5                 systemd-0.6.1
quantile_estimator-0.2.1       rabbitmq_prometheus-4.0.5                thoas-1.2.1
ra-2.14.0                      rabbitmq_random_exchange-4.0.5
rabbit-4.0.5                   rabbitmq_recent_history_exchange-4.0.5

启用插件

bash 复制代码
rabbitmq-plugins enable rabbitmq_delayed_message_exchange

查看插件是否启用

bash 复制代码
Listing plugins with pattern ".*" ...
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status: * = running on rabbit@045723fe3135
 |/
[  ] rabbitmq_amqp1_0                  4.0.5
[  ] rabbitmq_auth_backend_cache       4.0.5
[  ] rabbitmq_auth_backend_http        4.0.5
[  ] rabbitmq_auth_backend_ldap        4.0.5
[  ] rabbitmq_auth_backend_oauth2      4.0.5
[  ] rabbitmq_auth_mechanism_ssl       4.0.5
[  ] rabbitmq_consistent_hash_exchange 4.0.5
[E*] rabbitmq_delayed_message_exchange 4.0.2
[  ] rabbitmq_event_exchange           4.0.5
[  ] rabbitmq_federation               4.0.5
[  ] rabbitmq_federation_management    4.0.5
[  ] rabbitmq_federation_prometheus    4.0.5
[  ] rabbitmq_jms_topic_exchange       4.0.5
[E*] rabbitmq_management               4.0.5
[e*] rabbitmq_management_agent         4.0.5
[  ] rabbitmq_mqtt                     4.0.5
[  ] rabbitmq_peer_discovery_aws       4.0.5
[  ] rabbitmq_peer_discovery_common    4.0.5
[  ] rabbitmq_peer_discovery_consul    4.0.5
[  ] rabbitmq_peer_discovery_etcd      4.0.5
[  ] rabbitmq_peer_discovery_k8s       4.0.5
[E*] rabbitmq_prometheus               4.0.5
[  ] rabbitmq_random_exchange          4.0.5
[  ] rabbitmq_recent_history_exchange  4.0.5
[  ] rabbitmq_sharding                 4.0.5
[  ] rabbitmq_shovel                   4.0.5
[  ] rabbitmq_shovel_management        4.0.5
[  ] rabbitmq_shovel_prometheus        4.0.5
[  ] rabbitmq_stomp                    4.0.5
[  ] rabbitmq_stream                   4.0.5
[  ] rabbitmq_stream_management        4.0.5
[  ] rabbitmq_top                      4.0.5
[  ] rabbitmq_tracing                  4.0.5
[  ] rabbitmq_trust_store              4.0.5
[e*] rabbitmq_web_dispatch             4.0.5
[  ] rabbitmq_web_mqtt                 4.0.5
[  ] rabbitmq_web_mqtt_examples        4.0.5
[  ] rabbitmq_web_stomp                4.0.5
[  ] rabbitmq_web_stomp_examples       4.0.5

安装 rabbitmq

bash 复制代码
podman run -itd --name=rabbitmq \
-p 15672:15672 \
-p 5672:5672 \
-e RABBITMQ_DEFAULT_USER=admin \
-e RABBITMQ_DEFAULT_PASS=admin \
rabbitmq:4-management

-itd:以交互模式启动容器并在后台运行。

--name=rabbitmq:为容器指定一个名称。

-v /d/docker/rabbitmq:/var/lib/rabbitmq:目录挂载

-p 15672:15672:管理端口

-p 5672:5672:消息接收端口

-e RABBITMQ_DEFAULT_USER=admin:用户名

-e RABBITMQ_DEFAULT_PASS=admin:密码

相关推荐
40岁的系统架构师3 小时前
10 为什么系统需要引入分布式、微服务架构
分布式·微服务·架构
donnie4w3 小时前
如何开发一个分布式日志系统
分布式
明达技术3 小时前
MR30分布式IO:贴标机产线的高效扩展与控制新纪元
分布式
张某人想退休11 小时前
请简述公司的系统服务架构类型(单体架构、分布式架构、微服务架构、分层架构、集群架构、SOA 架构、中台架构)
分布式·微服务·架构
昵称难产中11 小时前
浅谈云计算17 | 分布式存储
分布式·网络协议·云原生·系统架构·云计算
中东大鹅13 小时前
构建基于Hadoop的数据湖解决方案
大数据·hadoop·分布式
小马爱打代码14 小时前
(处理 Kafka 消息积压) - 高吞吐 + 零丢失的阻塞队列实战方案
分布式·kafka
Ultipa18 小时前
图数据库 | 18、高可用分布式设计(中)
数据库·分布式·数据库架构·图数据库·图计算