http://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202005%2F08%2F20200508102713_L8aCB.jpeg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1649077062&t=40b7b14053ef546a57de4934b9442cbe",

Mac (Intel) brew 安装 rabbitMQ

一、安装

## rabbitmq 依赖 erlang 环境, 先安装 erlang
brew install erlang
brew install rabbitmq


## 安装主要日志(备份)
==> Caveats
==> erlang
Man pages can be found in:
  /usr/local/opt/erlang/lib/erlang/man

Access them with `erl -man`, or add this directory to MANPATH.
cookie.@Cookie ~ % 
cookie.@Cookie ~ % brew install rabbitmq

==> Fetching rabbitmq
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/rabbitmq-3.13.2.all.bottle.tar.gz
########################################################################################################################### 100.0%
==> Pouring rabbitmq-3.13.2.all.bottle.tar.gz
==> Caveats
Management UI: http://localhost:15672
Homebrew-specific docs: https://rabbitmq.com/install-homebrew.html

To start rabbitmq now and restart at login:
  brew services start rabbitmq
Or, if you don't want/need a background service you can just run:
  CONF_ENV_FILE="/usr/local/etc/rabbitmq/rabbitmq-env.conf" /usr/local/opt/rabbitmq/sbin/rabbitmq-server
==> Summary
🍺  /usr/local/Cellar/rabbitmq/3.13.2: 1,526 files, 36.0MB
==> Running `brew cleanup rabbitmq`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

r

## 配置环境变量(经测试 brew 已经命令配置到环境中)
vi ~/.zshrc

export RABBIT_HOME=/usr/local/Cellar/rabbitmq/3.12.12
export PATH=$PATH:$RABBIT_HOME/sbin

:wq

source ~/.zshrc
## 安装 RabiitMQ 的可视化监控插件
rabbitmq-plugins enable rabbitmq_management
## 配置快速启动命令
vi ~/.zshrc

## 追加
alias sa-rabbitmq="rabbitmq-server -detached"
alias st-rabbitmq="rabbitmqctl stop"

:wq
source ~/.zshrc

## 启动服务
sa-rabbitmq 

## 查看日志
tail -f /usr/local/var/log/rabbitmq/rabbit@localhost.log

## 访问地址:http://localhost:15672
## 默认账号:guest / guest
posted @ 2024-05-15 21:47  DeepInThought  阅读(164)  评论(0编辑  收藏  举报