How to Install and Configure RabbitMQ with Erlang on Linux
This guide walks you through installing Erlang, downloading and building RabbitMQ 3.0.4 from source on a Linux system, verifying the installations, starting the server in detached mode, checking its status, and troubleshooting common port‑conflict issues on CentOS 6.
Installation – Erlang
To run RabbitMQ you must first install Erlang. The current stable version is R16B, which can be downloaded from the Erlang website.
cd /usr/save
wget http://www.erlang.org/download/otp_src_R16B.tar.gz
tar xvfz /usr/save/otp_src_R16B.tar.gzAfter downloading, install Erlang from source:
cd otp_src_R16B
LANG=C; export LANG
./configure
make
make installVerification – Erlang
Run erl to start the Erlang shell, confirming successful installation.
# erl
Erlang R16B (erts-5.10.1) ...Download RabbitMQ
The stable RabbitMQ server version is 3.0.4. Choose the appropriate Linux package; this example uses the Generic Unix build.
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 could_not_start_tcp_listener, see the troubleshooting section.
Verify RabbitMQ Status
Use rabbitmqctl status to check the server status and rabbitmqctl stop to stop it.
# sbin/rabbitmqctl status
... (output omitted for brevity) ...
# sbin/rabbitmqctl stopTroubleshooting
Problem: On CentOS 6, installing RabbitMQ may fail with “could_not_start_tcp_listener” due to a port conflict with the Matahari package (qpidd) that also uses port 5672.
Solution: Stop and disable the qpidd service, or uninstall the Matahari packages.
# chkconfig --list | grep -i qpid
qpidd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# service qpidd stop
Stopping Qpid AMQP daemon [ OK ]
# chkconfig qpidd off
# chkconfig --list | grep -i qpid
qpidd 0:off 1:off 2:off 3:off 4:off 5:off 6:offAfter disabling qpidd, RabbitMQ should start correctly.
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.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
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.
