網頁

2022/12/7

Mac Homebrew 安裝RabbitMQ

Mac使用Homebrew安裝RabbitMQ。


範例環境:

  • macOS Ventura 13.0.1
  • Homebrew 3.6.14


安裝RabbitMQ

在終端機(Terminal)輸入brew install rabbitmq

% brew install rabbitmq
...
==> Installing dependencies for rabbitmq: jpeg-turbo, libpng, xz, zstd, libtiff, wxwidgets and erlang
...
==> Installing rabbitmq
==> Pouring rabbitmq--3.11.4.all.bottle.tar.gz
==> Caveats
Management Plugin enabled by default at http://localhost:15672

To restart rabbitmq after an upgrade:
  brew services restart 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.11.4: 1,409 files, 33.5MB
==> Running `brew cleanup rabbitmq`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> rabbitmq
Management Plugin enabled by default at http://localhost:15672

To restart rabbitmq after an upgrade:
  brew services restart 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


啟動RabbitMQ

安裝完後輸入brew services start rabbitmq啟動RabbitMQ服務。

% brew services start rabbitmq
==> Successfully started `rabbitmq` (label: homebrew.mxcl.rabbitmq)

輸入brew services list可檢視運行中的RabbitMQ服務。

% brew services list
Name          Status  User  File
rabbitmq      started matt  ~/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plis


登入RabbitMQ UI

參考「RabbitMQ 圖形管理介面(Management UI)登入」。


發收訊息

參考「RabbitMQ 在UI管理介面發送訊息」。


停止RabbitMQ

輸入brew services stop rabbitmq終止RabbitMQ服務。

% brew services stop rabbitmq
Stopping `rabbitmq`... (might take a while)
==> Successfully stopped `rabbitmq` (label: homebrew.mxcl.rabbitmq)

輸入brew services list確認RabbitMQ服務已停止。

% brew services list
Name          Status User File
rabbitmq      none


沒有留言:

張貼留言