RABBITMQ First article: RABBITMQ installation detailed

Source: Internet
Author: User
Tags rabbitmq

Installation Environment

Virtual machine: vmware®workstation 10.0.1 Build

Linux system: CentOS6.5

Official installation: http://www.rabbitmq.com/install-rpm.html

1. Install Erlang

1) Enable Epel on your machine

Execute the following two lines of command as root

Su-c ' Rpm-uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm '
su-c ' yum install Foo

2) Enableerlang Repository

Execute the following command as root (guaranteed to install the latest version of Epel)

Wget-o/etc/yum.repos.d/epel-erlang.repo Http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo

3) Install Erlang

Execute the following command as Root

Yum Install Erlang

2. Installation Rabbitmq-server

RPM--import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
Yum Install RABBITMQ-SERVER-3.2.3-1.NOARCH.RPM (Note: To download down)

3, install Rabbitmqweb management plug-ins

The installation succeeds when the following command is executed at the terminal:

Rabbitmq-plugins Enable rabbitmq_management
service Rabbitmq-server restart

Open Browser Login: http://127.0.0.1:15672 55672 can also jump directly to the following Web Admin

Login account password default is guest

4, start RABBITMQ Server

/etc/init.d/rabbitmq-serverstart
or
service Rabbitmq-service start

5, Management

The RABBITMQ server is managed mainly through the Rabbitmqctl and rabbimq-plugins two tools, and the following are some common features.

1). Server Startup and shutdown

Start: rabbitmq-server–detached

OFF: Rabbitmqctl stop

If there are multiple instances of a single machine, add –n to the RABBITMQCTLH after the specified name

2). Plug-in Management

To open a plugin: rabbitmq-pluginsenable xxx

To close a plugin: rabbitmq-pluginsdisablexxx

Note: After restarting the server, it takes effect.

3). Virtual_host Management

New Virtual_host:rabbitmqctladd_vhost XXX

Revoke Virtual_host:rabbitmqctl delete_vhost XXX

4). User Management

New User: Rabbitmqctl add_user xxxpwd

Delete User: Rabbitmqctl delete_user xxx

Password change: Rabbimqctlchange_password {username} {NewPassword}

Set User role: Rabbitmqctlset_user_tags {username} {tag ...}

Tag can be for administrator,monitoring, management

5). Rights Management

Permission settings: set_permissions [-pvhostpath] {user} {conf} {write} {read}

Vhostpath

Vhost Path

User

User name

Conf

A regular expression match which configuration resources can be accessed by that user.

Write

A regular expression match which configuration resources can be read by the user.

Read

A regular expression match which configuration resources can be accessed by that user.

6). Get Server Status information

Server Status: Rabbitmqctl status

Queue info: Rabbitmqctl list_queues[-p vhostpath] [Queueinfoitem ...]

Queueinfoitem can be: Name,durable,auto_delete,arguments,messages_ready,

Messages_unacknowledged,messages,consumers,memory

Exchange information: Rabbitmqctllist_exchanges[-p Vhostpath] [Exchangeinfoitem ...]

Exchangeinfoitem are: name,type,durable,auto_delete,internal,arguments.

Binding information: Rabbitmqctllist_bindings[-p Vhostpath] [Bindinginfoitem ...]

Bindinginfoitem are: source_name,source_kind,destination_name,destination_kind,routing_key,arguments

Connection information: rabbitmqctllist_connections [Connectioninfoitem ...]

Connectioninfoitem are: Recv_oct,recv_cnt,send_oct,send_cnt,send_pend and so on.

Channel information: Rabbitmqctl List_channels[channelinfoitem ...]

Channelinfoitem has consumer_count,messages_unacknowledged,messages_uncommitted,acks_uncommitted,messages_. Unconfirmed,prefetch_count,client_flow_blocked


Installation FAQ:

1, start Rabbitmq-server, error message: Starting Rabbitmq-server:failed-check/var/log/rabbitmq/startup_{log, _err}

Resolve: Use Netstat to see if there is, if there is a kiss to kill it, in the boot, I tried to solve.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.