Install RABBITMQ under Linux

Source: Internet
Author: User
Tags rabbitmq

1. Installing 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 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

2, Installation Rabbitmq-server

wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.0/rabbitmq-server-3.5.0-1.noarch.rpm

RPM-IVH rabbitmq-server-3.5.0-1.noarch.rpm

3, start the RABBITMQ, and verify the startup situation

Rabbitmq-server--detached &ps aux |grep rabbitmq

4. Start in a service mode

Service Rabbitmq-server Start

5. Install Rabbitmqweb Management plug-in

The installation succeeds when the terminal executes the following command:

Rabbitmq-plugins Enable Rabbitmq_management

6. Input http://192.168.1.102:15672/

Unable to login solution

Vim/etc/rabbitmq/rabbitmq.config

Write information, and save

[{rabbit, [{loopback_users, [Guest,guest]}}].

User Management

RABBITMQ server is mainly managed by Rabbitmqctl and rabbimq-plugins two tools, the following are some common functions.

1). Server Startup and shutdown

Start: rabbitmq-server–detached

Close: Rabbitmqctl stop

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

2). Plugin 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

Undo Virtual_host:rabbitmqctl Delete_vhost XXX

4). User Management

New User: Rabbitmqctl add_user xxxpwd

Delete User: Rabbitmqctl delete_user xxx

Change Password: Rabbimqctlchange_password {username} {NewPassword}

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

Tag can be administrator,monitoring, management

View Current user list Rabbitmqctl list_users

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 information: 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 info: 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

Install RABBITMQ under Linux

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.