1.安装
brew install rabbitmq
安装目录
( base) sencheung@192 3. 10. 7 % pwd
/ opt/homebrew/Cellar/rabbitmq/3. 10. 7
2.启动服务
路径(其实不用到该路径下也可以开启服务)
( base) sencheung@192 3. 10. 7 % pwd
/ opt/homebrew/Cellar/rabbitmq/3. 10. 7
开启服务
rabbitmq-server
成功开启 显示如下
Erlang: 25. 0. 4 [jit]
TLS Library: OpenSSL - OpenSSL 1. 1. 1q 5 Jul 2022
Doc guides: https:/ / rabbitmq. com/documentation. html
Support: https:/ / rabbitmq. com/contact. html
Tutorials: https:/ / rabbitmq. com/getstarted. html
Monitoring: https:/ / rabbitmq. com/monitoring. html
Logs: / opt/homebrew/var / log/rabbitmq/rabbit@localhost. log
/ opt/homebrew/var / log/rabbitmq/rabbit@localhost_upgrade. log
<stdout>
Config file( s) : ( none)
Starting broker. . . completed with 7 plugins.
3.开启rabbitmq_management(可视化客户端)
另开启一个窗口,进入sbin目录
( base) sencheung@192 sbin % pwd
/ opt/homebrew/Cellar/rabbitmq/3. 10. 7/sbin
执行以下命令:
rabbitmq-plugins enable rabbitmq——management
成功开启 显示如下:
Enabling plugins on node rabbit@localhost:
rabbitmq_management
The following plugins have been configured:
rabbitmq_amqp1_0
rabbitmq_management
rabbitmq_management_agent
rabbitmq_mqtt
rabbitmq_stomp
rabbitmq_stream
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@localhost. . .
Plugin configuration unchanged.
进入可视化管理器
地址:localhost:15672
登录账号密码:guest
页面如下:
登录:
成功登录页面:
4.停止服务
停止rabbitmq服务
停止可视化管理器
( base) sencheung@192 sbin % pwd
/ opt/homebrew/Cellar/rabbitmq/3. 10. 7/sbin
( base) sencheung@192 sbin % rabbitmq-server disable rabbitmq_management
5.启动rabbitmq出现错误解决
错误如下:
ERROR: epmd error for host localhost: nxdomain ( non-existing domain)
错误原因:
解决:
sudo chmod 777 / etc/hosts
vim / etc/hosts