springboot-rabbitmq

mac-rabbitmq之踩坑安装

2020-11-02  本文已影响0人  前进的码农

安装命令集合

#安装Erlang
brew install erlang
erl
#切国内镜像
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
brew update
#修改githubhosts
sudo vim /etc/hosts
#安装rabbitmq
brew install rabbitmq
#启动
 brew services start rabbitmq

安装Erlang语言环境

brew install erlang

版本与 Erlang语言对应关系


image.png

https://www.rabbitmq.com/which-erlang.html
看这个官方说明文档

报错解决

如果报这个错 Error: Permission denied @ apply2files - /usr/local/lib/docker/cli-plugins
直接输入sudo chown -R (whoami)(brew --prefix)/*即可

环境验证

输入:erl


image.png

这里的版本为22,如果需要安装指定版本请参考其他博客文章这里不做介绍

安装rabbit

brew install rabbitmq
如果速度很慢可以切brew国内镜像

切国内镜像步骤

cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
brew update

如果发现

Error: An exception occurred within a child process:
  DownloadError: Failed to download resource "rabbitmq"
Download failed: https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.2/rabbitmq-server-generic-unix-3.8.2.tar.x

进入sudo vim /etc/hosts 把关于github的注释掉

启动

前台启动
rabbitmq-server
后台启动
brew services start rabbitmq

最终效果

http://localhost:15672/
默认账号密码分别为guest guest

image.png
上一篇 下一篇

猜你喜欢

热点阅读