Mac上安装RabbitMQ

文章目录

    • 相关安装命令
    • 环境变量

使用homebrew安装rabbitmq

官方文档参考:
https://www.rabbitmq.com/install-homebrew.html

相关安装命令

## 更新命令
brew update

## 查找
brew search rabbitmq

## 安装
brew install rabbitmq

## 安装好后,查看rabbitmq的安装信息:
brew info rabbitmq

## 后台启动的方式
brew services start rabbitmq

## 停止rabbit服务器
brew services stop rabbitmq

环境变量

Intel Macs,把CLI工具路径设置了软连接,在 /usr/local/sbin
Apple Silicon Macs,在 `/opt/homebrew/sbin ;

例如,在/usr/local/sbin下:

rabbitmq-defaults -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmq-defaults
rabbitmq-diagnostics -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmq-diagnostics
rabbitmq-env -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmq-env
rabbitmq-plugins -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmq-plugins
rabbitmq-queues -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmq-queues
rabbitmq-server -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmq-server
rabbitmq-streams -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmq-streams
rabbitmq-upgrade -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmq-upgrade
rabbitmqadmin -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmqadmin
rabbitmqctl -> ../Cellar/rabbitmq/3.12.2/sbin/rabbitmqctl
vmware-rabbitmq -> ../Cellar/rabbitmq/3.12.2/sbin/vmware-rabbitmq

如果上面的路径没有在PATH里,则需要添加一下:

# for macOS Intel
export PATH=$PATH:/usr/local/sbin

# for Apple Silicon
export PATH=$PATH:/opt/homebrew/sbin

将上述导出添加到shell配置文件(例如~/.bashrc , ~/.zshrc。为每个新shell(包括OS重启)更新PATH。

你可能感兴趣的:(消息中间件,macos,rabbitmq)