Homebrew 是 MacOS 的一个流行的软件包管理器。可从 Homebrew 的仓库中安装RabbitMQ 。
首先,确保你已经安装了Homebrew。
并且需要配置 HOMEBREW_BOTTLE_DOMAIN 环境变量,使用命令检查:
xecho $HOMEBREW_BOTTLE_DOMAIN如果没有设置HOMEBREW_BOTTLE_DOMAIN环境变量,请使用命令进行设置:
x
test -r ~/.zprofile && echo 'export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"' >> ~/.zprofiletest -r ~/.bash_profile && echo 'export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"' >> ~/.bash_profileexport HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"用以下方法安装 Node.js 服务器:
xxxxxxxxxxbrew install node安装后使用命令检查Node.js:
xxxxxxxxxxnode --versionnpm 是Node.js 提供的包管理工具,其默认仓管在国际网,访问速度较慢,通过设置为国内镜像能够改善性能:
x
npm config set registry=http://registry.npm.taobao.org或者安装cnpm工具,替代npm工具:
x
npm install -g cnpm --registry=https://registry.npm.taobao.org 检查
xxxxxxxxxxnpm config get registry