mac下如何搭建rabbitmq服务器
1. 执行安装命令
% brew install rabbitmq
安装成功后显示内容如下:
==> Installing rabbitmq
==> Pouring rabbitmq--3.11.0.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="/opt/homebrew/etc/rabbitmq/rabbitmq-env.conf" /opt/homebrew/opt/rabbitmq/sbin/rabbitmq-server
==> Summary
🍺 /opt/homebrew/Cellar/rabbitmq/3.11.0: 1,406 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="/opt/homebrew/etc/rabbitmq/rabbitmq-env.conf" /opt/homebrew/opt/rabbitmq/sbin/rabbitmq-server
2. 启动rabbitmq server
% rabbitmq-server
2022-09-29 14:04:20.503367+08:00 [notice] <0.44.0> Application syslog exited with reason: stopped
2022-09-29 14:04:20.507205+08:00 [notice] <0.228.0> Logging: switching to configured handler(s); following messages may not be visible in this log output
## ## RabbitMQ 3.11.0
## ##
########## Copyright (c) 2007-2022 VMware, Inc. or its affiliates.
###### ##
########## Licensed under the MPL 2.0. Website: https://rabbitmq.com
Erlang: 25.1 [jit]
TLS Library: OpenSSL - OpenSSL 1.1.1q 5 Jul 2022
Release series support status: supported
Doc guides: https://rabbitmq.com/documentation.html
Support: https://rabbitmq.com/contact.html
Tutorials: https://rabbitmq.com/getstarted.html
Monitoring: https://rabbitmq.com/monitoring.html
Logs: /opt/homebrew/var/log/rabbitmq/rabbit@localhost.log
/opt/homebrew/var/log/rabbitmq/rabbit@localhost_upgrade.log
<stdout>
Config file(s): (none)
Starting broker... completed with 7 plugins.
3. 登录rabbitmq管理端
管理端的默认用户名、密码均为guest。访问http://localhost:15672/