You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

In this blog post, I’ll take you through the installation of RabbitMQ on CentOS 7 / Fedora 29 / 28. RabbitMQ is an open source message broker software that implements the Advanced Message Queuing Protocol (AMQP). It receives messages from publishers (applications that publish them) and routes them to consumers (applications that process them).

In our previous guides, we covered:

How to install Latest RabbitMQ Server on Ubuntu 18.04 LTS

Installing RabbitMQ on CentOS 6 and CentOS 7

Follow the steps below to install RabbitMQ on Fedora 29 / Fedora 28.

Step 1: Install Erlang

Before installing RabbitMQ, you must install a supported version of Erlang/OTP. The version of Erlang package available on EPEL repository should be sufficient.

sudo dnf -y install erlang

Confirm installation by running the erlcommand:

$ erl 
Erlang/OTP 20 [erts-] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V9.3.3.3 (abort with ^G)

Step 2: Add PackageCloud Yum Repository

A Yum repository with RabbitMQ packages is available from PackageCloud.

Create a new Repository file for RabbitMQ.

sudo vim /etc/yum.repos.d/rabbitmq_rabbitmq-server.repo




Step 3: Install RabbitMQ on Fedora 29 / Fedora 28

The last step is the actual installation of RabbitMQ:

sudo dnf makecache -y --disablerepo='*' --enablerepo='rabbitmq_rabbitmq-server'
sudo dnf -y install rabbitmq-server

Confirm version of RabbitMQ installed:

$ rpm -qi rabbitmq-server
Name : rabbitmq-server
Version : 3.7.8
Release : 1.el7
Architecture: noarch
Install Date: Thu 15 Nov 2018 01:32:16 PM UTC
Group : Development/Libraries
Size : 10858832
License : MPLv1.1 and MIT and ASL 2.0 and BSD
Signature : RSA/SHA1, Thu 20 Sep 2018 03:32:57 PM UTC, Key ID 6b73a36e6026dfca
Source RPM : rabbitmq-server-3.7.8-1.el7.src.rpm
Build Date : Thu 20 Sep 2018 03:32:56 PM UTC
Build Host : 17dd9d9d-9199-4429-59e6-dc265f3581e9
Relocations : (not relocatable)
Summary : The RabbitMQ server
Description :
RabbitMQ is an open source multi-protocol messaging broker.

Step 4: Start RabbitMQ Service

Now that you have RabbitMQ installed on your Fedora, start and enable the service to start on system boot.

sudo systemctl start rabbitmq-server
sudo systemctl enable rabbitmq-server

Step 5: Enable the RabbitMQ Management Dashboard (Optional)

You can optionally enable the RabbitMQ Management Web dashboard for easy management.

sudo rabbitmq-plugins enable rabbitmq_management

The Web service should be listening on TCP port 15672

# ss -tunelp | grep 15672
tcp   LISTEN  0       128          *      users:(("beam.smp",pid=9525,fd=71)) uid:111 ino:39934 sk:9 <->

If you have an active Firewalld service, allow ports 5672 and 15672

sudo firewall-cmd --add-port={5672,15672}/tcp --permanent
sudo firewall-cmd --reload

Access it by opening the Server IP or hostname port 15672.

By default, the guest user exists and can connect only from localhost. You can log in with this user locally with the password “guest”

To be able to login on the network, create an admin user like below:

sudo rabbitmqctl add_user admin StrongPassword
sudo rabbitmqctl set_user_tags admin administrator

Login with this admin username and the password assigned.

RabbitMQ User Management Commands

Delete User:

rabbitmqctl delete_user user

Change User Password:

rabbitmqctl change_password user strongpassword

Create new Virtualhost:

rabbitmqctl add_vhost /my_vhost

List available Virtualhosts:

rabbitmqctl list_vhosts

Delete a virtualhost:

rabbitmqctl delete_vhost /myvhost

Grant user permissions for vhost:

rabbitmqctl set_permissions -p /myvhost user ".*" ".*" ".*"

List vhost permissions:

rabbitmqctl list_permissions -p /myvhost

To list user permissions:

rabbitmqctl list_user_permissions user

Delete user permissions:

rabbitmqctl clear_permissions -p /myvhost user

The next article to read is:

How to Backup and Restore RabbitMQ Data & Configurations

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF