官网地址:
RabbitMQ: easy to use, flexible messaging and streaming — RabbitMQ
一、brew安装
brew update #更新一下homebrew
brew install rabbitmq #安装rabbitMQ
安装结果:
==> Caveats
==> rabbitmq
Management Plugin enabled by default at http://localhost:15672To restart rabbitmq after an upgrade:
brew services restart rabbitmq
Or, if you don't want/need a background service you can just run:
CONF_ENV_FILE="/opt/homebrew/etc/rabbitmq/rabbitmq-env.conf" /opt/homebrew/opt/rabbitmq/sbin/rabbitmq-server
rabbitmq 的安装路径:
/opt/homebrew/opt/rabbitmq
二、配置环境变量
1、
vi ~/.bash_profile
2、
export RABBIT_HOME=${PATH}:/opt/homebrew/opt/rabbitmq
export PATH=${PATH}:$RABBIT_HOME/sbin
3、
source ~/.bash_profile
三、启动RabbitMQ
1、前台运行
rabbitmq-server
2、后台运行
rabbitmq-server -detached
3、查看运行状态
rabbitmqctl status
4、开始 Web插件
rabbitmq-plugins enable rabbitmq_management
5、重启
rabbitmq-server restart
5、关闭
rabbitmqctl stop
四、访问
1、浏览器地址
http://localhost:15672/
默认用户名和密码为guest
添加用户
rabbitmqctl add_user miaojiang 123
设置用户为管理员
rabbitmqctl set_user_tags miaojiang administrator
配置用户可以远程登录
rabbitmqctl set_permissions -p "/" miaojaing ".*" ".*" ".*"
查看新添加的账户
rabbitmqctl list_users
查看用于的权限
rabbitmqctl list_permissions -p /文章来源:https://www.toymoban.com/news/detail-635473.html
五、参考:
MacOS安装RabbitMQ消息中间件(亲测有效 直接CV)_mac 运行rabbitmq_Dkrillex的博客-CSDN博客文章来源地址https://www.toymoban.com/news/detail-635473.html
到了这里,关于MacOS安装RabbitMQ的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!