rabbitmq安装部署
安装erlang
下载地址:https://www.erlang.org/downloads
1.安装Erlang,并设置系统变量Path C:\Program Files\Erlang OTP\bin
2.设置系统变量 ERLANG_HOME C:\Program Files\Erlang OTP
3.测试命令 erl -version
安装rabbitmq
1.直接执行安装文件
测试命令
rabbitmqctl status rabbitmq-service stop rabbitmq-service start rabbitmq-plugins enable rabbitmq_management
管理插件安装
rabbitmq-plugins enable rabbitmq_management
端口5672
http://localhost:15672,默认的用户名和密码均为 guest
注意事项:erlang和rabbitmq版本兼容问题,官方有说明地址https://www.rabbitmq.com/docs/which-erlang
rabbitmq 4.04到4.1.4 使用erlang 27.X
----
安装过程中遇到的其他问题:
windows 系统中安装部署 rabbitmq中遇到以下错误提示:
C:\Program Files\RabbitMQ Server\rabbitmq_server-4.1.4\sbin>rabbitmqctl status Error: unable to perform an operation on node 'rabbit@USER-20240102FZ'. Please see diagnostics information and suggestions below.
Most common reasons for this are: * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues) * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server) * Target node is not running
原因:CLI 工具使用的 Erlang cookie 与 RabbitMQ 服务节点不匹配。
找到服务端的 cookie 文件:
C:\Users\Administrator\.erlang.cookie
找到 CLI 工具的 cookie 文件:
C:\Windows\system32\config\systemprofile\.erlang.cookie
确保两个文件内容一致,或者将服务端的 cookie 文件复制,覆盖掉CLI 工具的 cookie 文件