Windows下安装RabbitMQ
RabbitMQ简介与安装
RabbitMQ 即一个消息队列,主要是用来实现应用程序的异步和解耦,同时也能起到消息缓冲,消息分发的作用。
(1)RabbitMQ基于Erlang,安装RabbitMQ前先要安装Erlang
(2)RabbitMQ插件启动,通过启动此插件可以查看RabbitMQ的一些信息
官网:http://www.rabbitmq.com/
官方下载:http://www.rabbitmq.com/download.html
Erlang:http://www.erlang.org/downloads
RabbitMQ运行状态与可视化
检查RabbitMQ运行状态
打开命令行,进入RabbitMQ的安装目录: cd D:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.13\sbin
> rabbitmqctl status
如果出现以下信息,说明安装是成功的,并且说明当前RabbitMQ Server已经启动:
D:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.13\sbin>rabbitmqctl status
Status of node rabbit@YEZHOU.ME ...
[{pid,6728},
{running_applications,
[{rabbit,"RabbitMQ","3.7.13"},
{rabbit_common,
"Modules shared by rabbitmq-server and rabbitmq-erlang-client",
"3.7.13"},
...
如果出现以下错误:
******************************
ERLANG_HOME not set correctly.
******************************
Please either set ERLANG_HOME to point to your Erlang installation or place the
RabbitMQ server distribution in the Erlang lib folder.
则需要配置环境变量
ERLANG_HOME = D:\Program Files\erl10.3
配置可视化RabbitMQ管理界面
输入命令rabbitmq-plugins enable rabbitmq_management
即可添加可视化插件
> rabbitmq-plugins enable rabbitmq_management
Enabling plugins on node rabbit@YEZHOU.ME:
rabbitmq_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@YEZHOU.ME...
The following plugins have been enabled:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
started 3 plugins.
查看可视化插件是否成功,可在web浏览器中输入地址:http://127.0.0.1:15672/
输入默认账号: guest,密码: guest
就可以登录查看rabbitmq里的资源信息
至此已经安装成功,并且监控插件已启动
(1)默认安装完后,RabbitMQ已启动
(2)可以运行
rabbitmqctl stop
命令来停止服务(3)可以运行
rabbitmq-server -detached
命令来重启服务并后台运行(4)RabbitMQ的日志信息,可以在
C:/Users/Administrator/AppData/Roaming/RabbitMQ/log/
文件夹下进行查看,如:C:/Users/Administrator/AppData/Roaming/RabbitMQ/log/rabbit@mywin-PC.log
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/04/01/installing-rabbitmq-under-windows/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
共有 0 条评论