Wednesday, November 6, 2024
HomeLinuxHow to install and Configure RabbitMQ in Rhel/CentOS 6

How to install and Configure RabbitMQ in Rhel/CentOS 6

About RabbitMQ:

RabbitMQ is one of the more popular message broker solutions in the market, offered with an open-source license (Mozilla Public License v1.1) as an implementation of Advanced Message Queuing Protocol. Developed using the Erlang language, it is actually relatively easy to use and get started. It was first published in early 2007 and has since seen an active development with its latest release being version 3.6.1 (March 2016).

How does it work?

RabbitMQ works by offering an interface, connecting message senders (Publishers) with receivers (Consumers) through an exchange (Broker) which distributes the data to relevant lists (Message Queues).

rabbitmq

How is it different than the others?

RabbitMQ, unlike some other solutions, is a fully-fledged application stack (i.e. a message broker). It gives you all the tools you need to work with, instead of acting like a framework for you to implement your own. Being extremely popular, it is really easy to get going using RabbitMQ and to find answers to your questions online.

AMQP – Advanced Message Queuing Protocol

AMQP is a widely accepted open-source standard for distributing and transferring messages from a source to a destination. As a protocol and standard, it sets a common ground for various applications and message broker middlewares to interoperate without encountering issues caused by individually set design decisions.

Step1:

Before start install, make sure your server is up2date. To update use

#yum update –y

Once you make sure server is up2date, install erlang using following commend

Erlang is the main dependency, which required for RabbitMQ.

For install erlang we need to enable third party remi package repositories, using follow commend

# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

rabbitmq-server

Now you can install erlang using yum,

# yum install erlang –y

Step 2: Install RabbitMQ-Sever

Once we install erlang, now we can install RabbitMQ

We can download latest RabbitMQ in follow link.. Download Link

# wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1-1.noarch.rpm

Add the necessary public key for verification

# rpm –import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc

To Install

# rpm –ivh rabbitmq-server-3.2.2-1.noarch.rpm

Step 3: Enabling Management Console

RabbitMQ management console allow you to monitor the server process In GUI

Using this console you can:

  • Manage exchanges, queues, bindings, users
  • Monitor queues, message rates, connections
  • Send and receive messages
  • Monitor Erlang processes, memory usage
  • And much more

To Enable

# rabbitmq-plugins enable rabbitmq_management

Once you enabled the management console, you can access it using http://(your-Server-IP):15672. You will get sample screen like below. For login use default username and Password – guest/guest

rabbitmq-plugin

After Logged in

rabbitmq-plugins

Step 4: Manage the RabbitMQ Service

To RabbitMQ start as a daemon by default

# chkconfig rabbitmq-server on

To start, stop and restart service

To Start,

# /etc/init.d/rabbitmq-server start

To Stop,

# /etc/init.d/rabbitmq-server stop

To Restart

# /etc/init.d/rabbitmq-server restart

To check status

# /etc/init.d/rabbitmq-server status

Step 5: Some useful Commends

Sample configuration Path

# /usr/share/doc/rabbitmq-server/

To check plugins List

To check plugins List

To Add user in rabbitMQ, we can perform in CLI and GUI both,

In CLI

# rabbitmqctl add_user foxer

# rabbitmqctl ser_user_tags foxer administrator

# rabbitmqctl set_permissions -p / foxer “.*” “.*” “.*”

RELATED ARTICLES
- Advertisment -

Most Popular

Recent Comments