小标
2018-09-25
来源 :
阅读 1182
评论 0
摘要:本文主要向大家介绍了Windows运维之RabbitMq windows 安装,通过具体的内容向大家展现,希望对大家学习Windows运维有所帮助。
本文主要向大家介绍了Windows运维之RabbitMq windows 安装,通过具体的内容向大家展现,希望对大家学习Windows运维有所帮助。
参考官方网址:
//www.rabbitmq.com/install-windows-manual.html
//www.rabbitmq.com/install-windows.html
一、 安装Erlang
Rabbit MQ 是建立在强大的Erlang OTP平台上,因此安装Rabbit MQ的前提是安装Erlang。
下载并安装 Eralng OTP For Windows (otp_win64_20.0)
二、 设置环境变量
添加一下系统环境变量(正常安装的也要检查下):
有最好,没有的话就手动添加。
三、 安装RabbitMQ
下载并运行安装 Rabbit MQ Server Windows Installer (v3.6.10)
默认安装的Rabbit MQ 监听端口是5672
四、 配置
1、激活Rabbit MQ‘s Management Plugin(C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.2.3\sbin\rabbitmq-plugins.bat)
命令:rabbitmq-plugins enable rabbitmq_management
要重启服务才能生效。
使用浏览器打开//localhost:15672 访问Rabbit Mq的管理控制台(默认用户为guest,密码:guest)
2、使用rabbitmqctl控制台命令(位于C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.2.3\sbin>)
查看用户列表
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
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注系统运维windows频道!
喜欢 | 0
不喜欢 | 0
您输入的评论内容中包含违禁敏感词
我知道了

请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式AI+学习就业服务平台 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号