docker安装rabbitmq
docker pull rabbitmq:management
启动命令
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 --restart always -v /opt/rabbitmq/lib/:/var/lib/rabbitmq -v /opt/rabbitmq/log/:/var/log/rabbitmq -e RABBITMQ_DEFAULT_USER=hanke -e RABBITMQ_DEFAULT_PASS=hanke.1234 181d
如果报错, 试试yum update 如果touch rabbitmq.config失败, 试试手动touch该文件
如果服务启动成功了但是访问15672时还是报错 rabbitmq-plugins enable rabbitmq_management rabbitmqctl start_app 可以参考
|
https://blog.csdn.net/weixin_43641651/article/details/89848530?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.edu_weight&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.edu_weight
问题 一个目录挂载 一直提示没有权限
想把/etc/rabbitmq挂载到/opt/rabbitmq/etc下, 这个还没想好怎么办
-v /opt/rabbitmq/etc:/etc/rabbitmq
安装插件
进入容器内 docker exec -it [容器id] /bin/bash
查看rabbitmq版本信息 rabbitmqct status 当前版本 3.8.5
更新 apt-get update
下载wget apt-get install -y wget
下载延迟队列插件到 /opt/rabbitmq/plugins 下 wget https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/v3.8.0/rabbitmq_delayed_message_exchange-3.8.0.ez
启动该插件 rabbitmq-plugins enable rabbitmq_delayed_message_exchange
|
rabbitmqctl add_user
rabbitmqctl delete_user
rabbitmqctl change_password
rabbitmqctl clear_password
rabbitmqctl set_user_tags
rabbitmqctl list_users
rabbitmqctl add_vhost
rabbitmqctl delete_vhost
rabbitmqctl list_vhosts [ …]
rabbitmqctl set_permissions [-p ] <read>
rabbitmqctl clear_permissions [-p ]
rabbitmqctl list_permissions [-p ]
rabbitmqctl list_user_permissions
|