How to Setup RabbitMQ in Linux Server? (original) (raw)

Last Updated : 23 Jul, 2025

RabbitMQ is a robust message broker that is open source, used between two different applications to great advantage in handling asynchronous messaging; it is, in turn, very effective at delivering the reliable routing of messages between services. The following guide will show you how to install and configure RabbitMQ on your Linux server.

Prerequisites

Installation

The installation process varies a little depending on your Linux flavor. It is described below for Debian/Ubuntu systems and RPM-based systems such as CentOS, RHEL, Fedora:

Debian/Ubuntu

**1. Update your package lists:

sudo apt-get update

Screenshot_2024_0604_143419

Update packages

**2. Install Erlang, a dependency for RabbitMQ:

sudo apt-get install erlang

Screenshot_2024_0604_143511

Install erlang

**3. Update package lists again and install RabbitMQ:

sudo apt update

sudo apt-get install rabbitmq-server

Screenshot_2024_0604_143551

Install rabbitmq server

**4. Start and Enable RabbitMQ

After installation, start the RabbitMQ service and enable it to start on boot:

sudo systemctl start rabbitmq-server

**Verifying Installation

Once all the required installation is complete, then we need to verify that RabbitMQ is running or not:

sudo systemctl status rabbitmq-server

Screenshot_2024_0604_143717

Verification

This command will show that the RabbitMQ service is active and running at this instance.

With default, The RabbitMQ has some minimal security configurations. Here are some basic step that need to secure RabbitMQ :

Set a strong password for the default user "guest":

Screenshot_2024_0604_143901

Setup login credentials

Enabling Management Plugin

The RabbitMQ Management Plugin provides different web interface for the complete managment of your RabbitMQ instance. To simply enable it:

sudo rabbitmq-plugins enable rabbitmq_management

Screenshot_2024_0604_143823

Enable plugins

Accessing Management Console

By default, the management console is available at port **15672. Open your web browser and type **http://localhost:15672. You will be asked for a username and password. Type the user name "**guest" and the password you set above.

Screenshot_2024_0604_143932-(1)

Management console

Additional Considerations

This document describes a very simplified, basic RabbitMQ setup only. For configuration and features more advanced than what is covered here. There are several issues that you might want to investigate further, including:

Conclusion

RabbitMQ is the most powerful tool to implement asynchronous messaging between applications working on your Linux server. Following the steps described in this guide will get you started with a basic setup of RabbitMQ. Refer to official documentation for in-depth configuration and explore features like the Management Plugin for web-based administration. It allows for reliable and scalable communication within your application ecosystem using RabbitMQ.