Skip to content
How to Install and Troubleshoot RabbitMQ on Linux: Step-by-Step Guide
Operations 6 min read

How to Install and Troubleshoot RabbitMQ on Linux: Step-by-Step Guide

This guide explains what RabbitMQ is, walks through installing Erlang and RabbitMQ on a Linux system, shows how to start and verify the server, and provides troubleshooting tips for common startup errors such as port conflicts.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations

RabbitMQ is an open‑source message‑queue server that lets you enqueue messages from one application and retrieve them from the same or another application, supporting multiple programming languages.

Install Erlang

RabbitMQ requires Erlang to run. Download the stable Erlang R16B source, extract it, and compile:

cd /usr/save
wget http://www.erlang.org/download/otp_src_R16B.tar.gz
tar xvfz /usr/save/otp_src_R16B.tar.gz
cd otp_src_R16B
LANG=C; export LANG
./configure
make
make install

Verify the installation by running erl and confirming the Erlang shell appears.

Download RabbitMQ

The current stable RabbitMQ version is 3.0.4. Choose the appropriate package for your platform; the example uses the Generic Unix tarball.

cd /usr/save
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.0.4/rabbitmq-server-generic-unix-3.0.4.tar.gz
tar xvfz rabbitmq-server-generic-unix-3.0.4.tar.gz
cd rabbitmq_server-3.0.4

Start RabbitMQ Server

Start the server in detached mode:

# cd /usr/save/rabbitmq_server-3.0.4
# sbin/rabbitmq-server -detached
Warning: PID file not written; -detached was passed.

If you encounter a could_not_start_tcp_listener error, see the troubleshooting section.

Check RabbitMQ Status

Use rabbitmqctl status to view node information and rabbitmqctl stop to stop the server.

# sbin/rabbitmqctl status
... (output omitted for brevity) ...
# sbin/rabbitmqctl stop

Troubleshooting

On CentOS 6, the Matahari package may occupy port 5672, causing the “could_not_start_tcp_listener” error. Stop the qpidd daemon and disable it from startup, or uninstall the Matahari‑related packages.

# chkconfig --list | grep -i qpid
# service qpidd stop
# chkconfig qpidd off
# chkconfig --list | grep -i qpid

After disabling qpidd, RabbitMQ should start normally.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxMessage QueueRabbitMQtroubleshootingerlang
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.