Step‑by‑Step Guide to Install and Run RabbitMQ on Linux
This tutorial walks you through installing Erlang, downloading the RabbitMQ server, starting it in detached mode, verifying its status, and troubleshooting common TCP‑listener errors on CentOS systems, providing all necessary commands and configuration details.
Overview
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 many programming languages.
Install Erlang
RabbitMQ requires Erlang to run. The stable Erlang version at the time of writing is R16B.
cd /usr/save
wget http://www.erlang.org/download/otp_src_R16B.tar.gz
tar xvfz /usr/save/otp_src_R16B.tar.gzBuild and install from source:
cd otp_src_R16B
LANG=C; export LANG
./configure
make
make installVerify Erlang Installation
Run erl from the command line; you should see the Erlang shell indicating version R16B.
# erl
Erlang R16B (erts-5.10.1) ...Download RabbitMQ
The current stable RabbitMQ server version is 3.0.4. For this guide we use the Generic Unix package.
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
Launch 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.Verify RabbitMQ Status
Use rabbitmqctl to check the server status or stop it when needed.
# sbin/rabbitmqctl status
... (output showing node, running applications, memory, etc.)To stop the server:
# sbin/rabbitmqctl stopTroubleshooting
If you encounter the error could_not_start_tcp_listener on CentOS 6, it is often caused by a port conflict with the Matahari package, which also listens on port 5672. Stop the qpidd daemon or uninstall the conflicting packages.
# chkconfig --list | grep -i qpid
# service qpidd stop
# chkconfig qpidd offAfter disabling the conflicting service, restart RabbitMQ; it should start without errors.
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.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
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.
