安装
- 添加源
echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list
- 新增公钥
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
- 更新源
sudo apt-get update
- 安装rabbitmq-server
sudo apt-get install rabbitmq-server
检查rabbitmq进程状态
invoke-rc.d rabbitmq-server status
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor
Active: active (running) since 二 2018-02-06 19:43:54 CST; 1min 1s ago
Main PID: 24289 (beam.smp)
Status: "Initialized"
CGroup: /system.slice/rabbitmq-server.service
├─24289 /usr/lib/erlang/erts-7.3/bin/beam.smp -W w -A 64 -P 1048576 -
├─24367 /usr/lib/erlang/erts-7.3/bin/epmd -daemon
├─24501 inet_gethost 4
└─24502 inet_gethost 4
2月 06 19:43:50 master rabbitmq-server[24289]: RabbitMQ 3.6.15. Cop
2月 06 19:43:50 master rabbitmq-server[24289]: ## ## Licensed under the M
2月 06 19:43:50 master rabbitmq-server[24289]: ## ##
2月 06 19:43:50 master rabbitmq-server[24289]: ########## Logs: /var/log/rabbi
2月 06 19:43:50 master rabbitmq-server[24289]: ###### ## /var/log/rabbi
2月 06 19:43:50 master rabbitmq-server[24289]: ##########
2月 06 19:43:50 master rabbitmq-server[24289]: Starting broker...
2月 06 19:43:54 master rabbitmq-server[24289]: systemd unit for activation check:
2月 06 19:43:54 master systemd[1]: Started RabbitMQ broker.
2月 06 19:43:54 master rabbitmq-server[24289]: completed with 0 plugins.
查看安装的插件
sudo rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
amqp_client
cowlib
cowboy
rabbitmq_web_dispatch
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@master... started 6 plugins.
查看用户
sudo rabbitmqctl list_users
添加用户
sudo rabbitmqctl add_user admin admin
sudo rabbitmqctl set_user_tags admin administrator
打开http://127.0.0.1:15672用添加的用户登录