您现在的位置是:首页>文章详情

RabbitMQ在Ubuntu 16.04下的安装与配置

泛逸舟

按照上一篇的介绍,我们选择一种安装方式

安装Erlang   >>>>  官网 >> http://www.erlang.org/   可以参考官网的安装方式

本人以命令行安装 : 安装依赖库

# sudo apt-get install build-essential 
# sudo apt-get install libncurses5-dev 
# sudo apt-get install libssl-dev
# sudo apt-get install m4 
# sudo apt-get install unixodbc unixodbc-dev
# sudo apt-get install freeglut3-dev libwxgtk2.8-dev 
# sudo apt-get install xsltproc 
# sudo apt-get install fop 
# sudo apt-get install tk8.5

安装完依赖库之后 安装erlang

sudo apt-get install erlang


安装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我们看见进程是启动的

xq@xq-VPCEG17YC:/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

525 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]:               RabbitMQ 3.6.10. Copyright (C) 2007-2017 Pivotal Software, Inc.
525 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]:   ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
525 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]:   ##  ##
525 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]:   ##########  Logs: /var/log/rabbitmq/rabbit@xq-VPCEG17YC.log
525 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]:   ######  ##        /var/log/rabbitmq/rabbit@xq-VPCEG17YC-sasl.log
525 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]:   ##########
525 20:42:21 xq-VPCEG17YC rabbitmq-server[4865]:               Starting broker...
525 20:42:25 xq-VPCEG17YC rabbitmq-server[4865]: systemd unit for activation check: "rabbitmq-server.service"
525 20:42:25 xq-VPCEG17YC systemd[1]: Started RabbitMQ broker.
525 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

这里写图片描述

评论

评论插件