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.
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 installVerify 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.4Start 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 stopTroubleshooting
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 qpidAfter disabling qpidd, RabbitMQ should start normally.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
