RabbitMQ笔记

2020-05-29  本文已影响0人  觉无知而求索

安装

默认端口 - 官网文档

用户授权

# 添加 Virtual Hosts
rabbitmqctl add_vhost <vhost>    
eg:${MQ_HOME}/sbin/rabbitmqctl add_vhost test
 
# 删除 Virtual Hosts    
rabbitmqctl delete_vhost <vhost> 
eg:${MQ_HOME}/sbin/rabbitmqctl delete_vhost test
    
# 添加用户
rabbitmqctl add_user <username> <password>    
eg:${MQ_HOME}/sbin/rabbitmqctl  add_user admin admin

# 删除用户    
delete_user <username>   
eg:${MQ_HOME}/sbin/rabbitmqctl  delete_user admin

# 用户授权 
rabbitmqctl set_permissions [-p <vhost>] <user> <conf> <write> <read>
eg:${MQ_HOME}/sbin/rabbitmqctl  set_permissions -p test admin '.*' '.*' '.*'     

# 查看权限
rabbitmqctl list_user_permissions <user>
eg:${MQ_HOME}/sbin/rabbitmqctl  list_user_permissions admin
上一篇下一篇

猜你喜欢

热点阅读