安装Erlang
https://www.erlang.org/
点击download
https://www.erlang.org/downloads
下载安装即可
安装rabbitmq-server
https://www.rabbitmq.com/
搜索 Download
点击 Download + installation
点击 install windows
下载rabbitmq-server-3.12.0.exe
图形化的安装。
安装完成后,这时windows服务已经启动。
执行 rabbitmqctl.bat status
有可能会出现
1
| Error: unable to perform an operation on node 'rabbit@DESKTOP-UVTEHFR'. Please see diagnostics information and suggestions below.
|
rabbitmq在报错信息之后给出了一些建议的解决办法
1 2 3 4 5 6 7 8 9 10 11
| 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
In addition to the diagnostics info below:
* See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more
|
一般是第二条
1
| CLI tool fails to authenticate with the server (e.g. due to CLI tool
|
Erlangcookie不匹配
1 2 3 4
| C:\Windows\System32\config\systemprofile\.erlang.cookie 与 C:\用户\你的用户名\.erlang.cookie 不匹配,把这两个改成一个就可以了,覆盖就可以了
|
这时右键我的电脑->管理->服务和应用程序 停止rabbitmq服务 启动rabbitmq服务。
这时再一执行rabbitmqctl.bat status, 显示正常。
启用web管理
rabbitmq-plugins enable rabbitmq_management
浏览器访问:http://localhost:15672/,默认账号和密码为:guest
登录进去后就可以看到交换机和队列了。
也可以点击admin添加用户