windows10环境下的RabbitMQ安装步骤(图文)

全文下载,转

https://blog.csdn.net/weixin_39735923/article/details/79288578

安装下载,安装就一切ok

2、使用rabbitmqctl控制台命令(位于C:Program Files (x86)RabbitMQ Server abbitmq_server-3.2.3sbin>)

  • 查看用户列表

rabbitmqctl.bat list_users

  • 增加用户

rabbitmqctl.bat add_user [username] [password]

 

  • 删除用户

rabbitmqctl.bat delete_user [username]

 

  • 修改用户密码

rabbitmqctl.bat change_password [username] [newpassword]

 

  • 设置角色

rabbitmqctl.bat set_user_tags [username] [tag1],[tag2]…

 

目前有如下几种tag,

1)     超级管理员(administrator)

可登陆管理控制台(启用management plugin的情况下),可查看所有的信息,并且可以对用户,策略(policy)进行操作。

2)     监控者(monitoring)

可登陆管理控制台(启用management plugin的情况下),同时可以查看rabbitmq节点的相关信息(进程数,内存使用情况,磁盘使用情况等)

3)     策略制定者(policymaker)

可登陆管理控制台(启用management plugin的情况下), 同时可以对policy进行管理。但无法查看节点的相关信息(上图红框标识的部分)。

4)     普通管理者(management)

仅可登陆管理控制台(启用management plugin的情况下),无法看到节点信息,也无法对策略进行管理。

5)     其他的

无法登陆管理控制台。

如下图是官方网站上给出各个角色的解释:

Tag

Capabilities

(None)

No access to the management plugin

management

Anything the user could do via AMQP plus:

  • List virtual hosts to which they can log in via AMQP
  • View all queues, exchanges and bindings in "their" virtual hosts
  • View and close their own channels and connections
  • View "global" statistics covering all their virtual hosts, including activity by other users within them

policymaker

Everything "management" can plus:

  • View, create and delete policies and parameters for virtual hosts to which they can log in via AMQP

monitoring

Everything "management" can plus:

  • List all virtual hosts, including ones they could not log in to via AMQP
  • View other users's connections and channels
  • View node-level data such as memory use and clustering
  • View truly global statistics for all virtual hosts

administrator

Everything "policymaker" and "monitoring" can plus:

  • Create and delete virtual hosts
  • View, create and delete users
  • View, create and delete permissions
  • Close other users's connections

还有其他命令,请需要的时候查阅。

五、 安装过程遇到问题

1、激活Rabbit MQ's Management Plugin时出现如下错误:

Applying plugin configuration to rabbit@... failed.
 * Could not contact node rabbit@iZ28jyxu47dZ.
   Changes will take effect at broker restart.
 * Options: --online  - fail if broker cannot be contacted.
            --offline - do not try to contact broker.

在网上找了下面资料,本机做了如下操作后成功,具体是哪个操作奏效也不太清楚:

  • 同步Erlang Cookies

具体操作:将 C:WINDOWS.erlang.cookie   同步到RabbitMq 启动用户 例如win10:C:Users\%USERNAME%.erlang.cookie

  •  卸载RabbitMQ service 重新安装

rabbitmq-service stop

rabbitmq-service remove

rabbitmq-service install

rabbitmq-service start

原文地址:https://www.cnblogs.com/huojg-21442/p/9817150.html