获取rabbitmq镜像
# docker pull rabbitmq
运行rabbitmq镜像
# docker run --name rabbitmq -tid -p 5672:5672 -p 15672:15672 -p 25672:25672 rabbitmq
修改rabbitmq设置
# docker exec -it rabbitmq /bin/bash
新增用户
# rabbitmqctl add_user asdf pwd123456
查看用户
# rabbitmqctl list_users
Setting permissions for user "asdf" in vhost "/" ...
# rabbitmqctl set_permissions -p "/" asdf ".*" ".*" ".*"
# rabbitmqctl list_permissions -p /
将asdf用户设置为administrator角色
# rabbitmqctl set_user_tags asdf administrator
删除guest用户
# rabbitmqctl delete_user guest
查看用户
# rabbitmqctl list_users
开启web界面
# rabbitmq-plugins enable rabbitmq_management
web访问
# http://IP:15672