1. 程式人生 > >mac 安裝 RabbitMQ

mac 安裝 RabbitMQ

1.使用brew來安裝 RabbitMQ

brew install rabbitmq

看到如下的程式碼表示RabbitMQ安裝成功

localhost:~ lidong$ brew install rabbitmq
Updating Homebrew...
==> Installing dependencies for rabbitmq: jpeg, libpng, libtiff, wxmac, erlang
==> Installing rabbitmq dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-8
d.sierra.bottle.2.tar ######################################################################## 100.0% ==> Pouring jpeg-8d.sierra.bottle.2.tar.gz �� /usr/local/Cellar/jpeg/8d: 19 files, 708.3K ==> Installing rabbitmq dependency: libpng ==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.28.sierra.bottle ######
################################################################## 100.0% ==> Pouring libpng-1.6.28.sierra.bottle.tar.gz �� /usr/local/Cellar/libpng/1.6.28: 26 files, 1.2M ==> Installing rabbitmq dependency: libtiff ==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.0.7_1.sierra.bott ######
################################################################## 100.0% ==> Pouring libtiff-4.0.7_1.sierra.bottle.tar.gz �� /usr/local/Cellar/libtiff/4.0.7_1: 248 files, 3.4M ==> Installing rabbitmq dependency: wxmac ==> Downloading https://homebrew.bintray.com/bottles/wxmac-3.0.2_4.sierra.bottle ######################################################################## 100.0% ==> Pouring wxmac-3.0.2_4.sierra.bottle.tar.gz �� /usr/local/Cellar/wxmac/3.0.2_4: 810 files, 24.6M ==> Installing rabbitmq dependency: erlang ==> Downloading https://homebrew.bintray.com/bottles/erlang-19.2.sierra.bottle.t ######################################################################## 100.0% ==> Pouring erlang-19.2.sierra.bottle.tar.gz ==> Caveats Man pages can be found in: /usr/local/opt/erlang/lib/erlang/man Access them with `erl -man`, or add this directory to MANPATH. ==> Summary �� /usr/local/Cellar/erlang/19.2: 7,310 files, 280.9M ==> Installing rabbitmq ==> Using the sandbox ==> Downloading https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitm ######################################################################## 100.0% ==> /usr/bin/unzip -qq -j /usr/local/Cellar/rabbitmq/3.6.6/plugins/rabbitmq_mana ==> Caveats Management Plugin enabled by default at http://localhost:15672 Bash completion has been installed to: /usr/local/etc/bash_completion.d To have launchd 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: rabbitmq-server ==> Summary �� /usr/local/Cellar/rabbitmq/3.6.6: 188 files, 5.8M, built in 9 minutes 12 seconds

注意: rabbitmq的安裝目錄: /usr/local/Cellar/rabbitmq/3.6.6

3.RabbitMQ 的啟動

進入到 /usr/local/Cellar/rabbitmq/3.6.6,執行

localhost:3.6.6 lidong$ sbin/rabbitmq-server

4.RabbitMQ 啟動外掛

待RabbitMQ 的啟動完畢之後,另起終端進入cd /Users/lidong/javaEE/rabbitmq_server-3.6.6/sbin 。啟動外掛:

 sudo ./rabbitmq-plugins enable rabbitmq_management(執行一次以後不用再次執行)

5.登陸管理介面

瀏覽器輸入:http://localhost:15672/

這裡寫圖片描述

賬號密碼初始預設都為guest

這裡寫圖片描述