RabbitMQ Installation — Ubuntu/Debian
Infrastructure: RabbitMQ Message Broker
Platform: Ubuntu 22/24, Debian 11/12
Overview
This page covers the manual installation of RabbitMQ and Erlang on Ubuntu and Debian systems.
Prerequisites
Before starting, confirm the following:
- Ubuntu 22.04/24.04 or Debian 11/12 — fully updated (
apt-get update && apt-get upgrade -y) - Root or sudo access on the target host
- Internet access available (to download packages)
- Port 5672 open from Diskover web and worker hosts
- Port 15672 open from admin workstations (optional, for management UI)
Step 1 — Install Prerequisites
Install the packages needed to add external repositories:
apt-get update apt-get install -y curl gnupg apt-transport-https
Step 2 — Add the RabbitMQ and Erlang Repositories
Import the repository signing keys:
# RabbitMQ main signing key curl -1sLf "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | gpg --dearmor | tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null # Erlang repository signing key curl -1sLf "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key" | gpg --dearmor | tee /usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg > /dev/null # RabbitMQ server repository signing key curl -1sLf "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key" | gpg --dearmor | tee /usr/share/keyrings/rabbitmq.9F4587F226208342.gpg > /dev/null
Add the Erlang and RabbitMQ apt repositories. Replace $distribution with your Ubuntu/Debian codename (e.g., jammy for Ubuntu 22.04, noble for Ubuntu 24.04, bookworm for Debian 12):
# Determine your distribution codename DISTRO_CODENAME=$(lsb_release -cs) # Add Erlang repository tee /etc/apt/sources.list.d/erlang.list <<EOF deb [arch=amd64 signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-erlang/deb/ubuntu $DISTRO_CODENAME main deb-src [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-erlang/deb/ubuntu $DISTRO_CODENAME main EOF # Add RabbitMQ server repository tee /etc/apt/sources.list.d/rabbitmq.list <<EOF deb [arch=amd64 signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/ubuntu $DISTRO_CODENAME main deb-src [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/ubuntu $DISTRO_CODENAME main EOF
Update the package index:
apt-get update
Step 3 — Install RabbitMQ and Erlang
Install Erlang first, then RabbitMQ:
apt-get install -y erlang-base erlang-asn1 erlang-crypto erlang-eldap \ erlang-ftp erlang-inets erlang-mnesia erlang-os-mon erlang-parsetools \ erlang-public-key erlang-runtime-tools erlang-snmp erlang-ssl \ erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl apt-get install -y rabbitmq-server
Why install Erlang packages individually? This ensures you get only the Erlang modules RabbitMQ needs from the RabbitMQ-maintained repository, avoiding conflicts with system Erlang packages.
Step 4 — Start and Enable the Service
systemctl start rabbitmq-server systemctl enable rabbitmq-server systemctl status rabbitmq-server
You should see the service in an active (running) state:
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; preset: enabled)
Active: active (running) since ...
Main PID: 12345 (beam.smp)
...
Step 5 — Configure RabbitMQ for Diskover
Enable the management plugin and create a dedicated Diskover user:
# Enable the management UI plugin rabbitmq-plugins enable rabbitmq_management # Secure the default guest account (this password is not used by Diskover) rabbitmqctl change_password guest your-guest-password # Create a dedicated Diskover user (choose your own username and password) rabbitmqctl add_user diskover your-rabbitmq-password # Grant administrator privileges rabbitmqctl set_user_tags diskover administrator # Set permissions on the default vhost (configure, write, read) rabbitmqctl set_permissions -p / diskover ".*" ".*" ".*" # Restart to apply changes systemctl restart rabbitmq-server systemctl status rabbitmq-server
Step 6 — Verify the Installation
Check the service status:
systemctl status rabbitmq-server
Run a quick health check:
rabbitmqctl status
Example output from the health check:
Status of node rabbit@test-worker ... Runtime OS PID: 945 OS: Linux Uptime (seconds): 86357 Is under maintenance?: false RabbitMQ version: 4.2.4 RabbitMQ release series support status: see https://www.rabbitmq.com/release-information Node name: rabbit@test-worker Erlang configuration: Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit] Crypto library: OpenSSL 3.5.1 1 Jul 2025 Erlang processes: 441 used, 1048576 limit Scheduler run queue: 1 Cluster heartbeat timeout (net_ticktime): 60
Step 7 — Connect Diskover to RabbitMQ
After RabbitMQ is running, configure the connection in Diskover Admin:
Navigate to Diskover Admin (
http://your-web-host:8000/diskover_admin/config/)Go to System → Message Queue
Enter the RabbitMQ host IP, port (5672), and the
diskoveruser credentials you created aboveSave the configuration
Click the Test button to ensure Diskover Web is able to connect to RabbitMQ
Service Management
Action | Command |
|---|---|
Start |
|
Stop |
|
Restart |
|
Status |
|
Enable on boot |
|
Logs (journald) |
|
Logs (file) |
|
Helpful RabbitMQ Commands
# Quick status check rabbitmqctl status # Detailed diagnostics (plugins, memory, disk, listeners) rabbitmq-diagnostics status # List all queues with message counts and memory usage rabbitmqctl list_queues # List active connections rabbitmqctl list_connections # Check cluster status (useful for multi-node setups) rabbitmqctl cluster_status
Troubleshooting
Issue | Cause | Solution |
|---|---|---|
RabbitMQ fails to start | Erlang version mismatch or corrupt Mnesia database | Check |
| RabbitMQ service not running or node name mismatch | Ensure RabbitMQ is running ( |
Celery cannot connect to RabbitMQ | Wrong host/port/credentials in Diskover Admin, or port 5672 blocked | Verify the RabbitMQ connection settings in Diskover Admin. Test connectivity from the worker host: |
Management UI not accessible on port 15672 | Management plugin not enabled or firewall blocking | Enable the plugin: |
Support
Diskover Support Portal: https://support.diskoverdata.com
Diskover Knowledge Base: https://support.diskoverdata.com/hc/en-us
RabbitMQ Official Documentation: https://www.rabbitmq.com/docs
RabbitMQ Installation (Debian/Ubuntu): https://www.rabbitmq.com/docs/install-debian
Comments
0 comments
Please sign in to leave a comment.