原文链接:http://blog.csdn.net/rickey17/article/details/72756766
添加源
新增公钥(不加会有警告)
更新源
安装rabbitmq-server
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
sudo apt-get install rabbitmq-server
通过上篇介绍的命令invoke-rc.d rabbitmq-server stop/start/etc我们看见进程是启动的
[email protected]:/etc/apt/sources.list.d$ invoke-rc.d rabbitmq-server status
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: active (running) since 四 2017-05-25 20:42:25 CST; 5min ago
Main PID: 4865 (beam.smp)
Status: "Initialized"
CGroup: /system.slice/rabbitmq-server.service
├─4865 /usr/lib/erlang/erts-7.3/bin/beam.smp -W w -A 64 -P 1048576 -t 5000000 -stbt db -zdbbl 32000 -K true -- -root /usr/lib/erlang
├─4942 /usr/lib/erlang/erts-7.3/bin/epmd -daemon
├─5074 inet_gethost 4
└─5075 inet_gethost 4
5月 25 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]: RabbitMQ 3.6.10. Copyright (C) 2007-2017 Pivotal Software, Inc.
5月 25 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]: ## ## Licensed under the MPL. See http://www.rabbitmq.com/
5月 25 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]: ## ##
5月 25 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]: ########## Logs: /var/log/rabbitmq/[email protected]
5月 25 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]: ###### ## /var/log/rabbitmq/[email protected]
5月 25 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]: ##########
5月 25 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]: Starting broker...
5月 25 20:42:25 xq-VPCEG17YC rabbitmq-server[4865]: systemd unit for activation check: "rabbitmq-server.service"
5月 25 20:42:25 xq-VPCEG17YC systemd[1]: Started RabbitMQ broker.
5月 25 20:42:25 xq-VPCEG17YC rabbitmq-server[4865]: completed with 0 plugins.
打开管理页面
sudo rabbitmq-plugins enable rabbitmq_management
查看安装的插件
sudo rabbitmqctl list_users
查看用户
sudo rabbitmqctl list_users
新增管理员用户
sudo rabbitmqctl add_user admin admin
sudo rabbitmqctl set_user_tags admin administrator
用刚设置的账户登录管理页面
http://127.0.0.1:15672