Candid photograph of a Linux server terminal with a soft olive-green glow against a dark slate background, conveying a calm technical atmosphere.

Step-by-step guides for system administrators — covering command-line basics, web server setup, and preparation material for technical interviews.

Browse Tutorials

Installing and Configuring RabbitMQ on Fedora for Reliable Messaging

Message brokers sit at the heart of distributed systems, queueing events between services that may scale, fail, or restart independently. RabbitMQ remains one of the most widely deployed brokers because it speaks AMQP natively, supports pluggable protocols, and ships with a web-based management interface that makes day-to-day operations straightforward. For teams running modern microservice stacks, it offers a balance of reliability, throughput, and tooling that has aged well since its first release.

Fedora is a sensible base for a development or staging broker, especially on the rolling-release cadence favoured by many Australian engineering teams in Sydney and Melbourne who want the latest packages without waiting for a long-term support window. The repository includes current Erlang builds, which matter because RabbitMQ tracks Erlang releases closely. The steps below assume a fresh Fedora workstation or server with sudo access and a static IP, which is common practice for hosts in Brisbane data centres that connect back to corporate networks over the NBN.

This walkthrough covers dependency installation, repository setup, service management, user configuration, and the management plugin. By the end, the broker will accept AMQP traffic, expose a dashboard, and persist messages across restarts.

Preparing the System and Verifying the Fedora Release

Begin by refreshing the package index and confirming which Fedora release is running, since repository paths differ between major versions.

sudo dnf update -y
sudo dnf install -y curl gnupg
cat /etc/fedora-release

A clean update avoids version mismatches that surface later when the Erlang dependency cannot be satisfied. If the host runs inside the AWS Sydney region (ap-southeast-2), make sure the security group permits AMQP on port 5672 from your application subnet, or the broker will start cleanly while remaining unreachable from peers.

Installing Erlang and Supporting Libraries

RabbitMQ is written in Erlang, and the official server packages depend on a matching OTP release. Fedora provides recent versions in its standard repositories, so no extra configuration is required.

sudo dnf install -y erlang

Confirm the install with erl -version. If the output shows an older OTP than the RabbitMQ release notes require, add the official Cloudsmith or PackageCloud repository and pin the desired version. Skipping this verification is a common cause of startup failures logged as init terminating in do_boot.

Adding the RabbitMQ Repository and Installing the Server

The Fedora extras repository does not always carry the latest RabbitMQ, so the project recommends its own repo for production deployments.

sudo dnf config-manager --add-repo https://packagecloud.io/rabbitmq/rabbitmq-server/fedora/$(rpm -E %fedora)/x86_64/rabbitmq_rabbitmq-server.repo
sudo dnf install -y rabbitmq-server

This pulls in the daemon, CLI tools, and default configuration under /etc/rabbitmq/. Australian operators handling sensitive workloads often pair this step with a review of the Essential Eight maturity guidance from the Cyber Security Centre, since message brokers are routinely targeted for credential harvesting.

Starting the Service and Verifying the AMQP Listener

Enable and start the systemd unit, then check that the broker is listening.

sudo systemctl enable --now rabbitmq-server
sudo systemctl status rabbitmq-server
sudo ss -tlnp | grep 5672

If the port is missing, inspect /var/log/rabbitmq/ for boot errors. Timestamps in the log are recorded in the system's local time, which on east-coast hosts is either AEST or AEDT depending on daylight saving. After confirming the listener, create a service account for your application rather than reusing the default guest user, which only accepts loopback connections. For external clients, terminate TLS at a reverse proxy; the Linuxtpoint guide on Nginx reverse proxy setup covers the proxy_pass block and the headers that preserve the original client IP.

Creating Users, Virtual Hosts, and Permissions

The bundled rabbitmqctl tool handles most administrative tasks from the terminal. Engineers who spend long stretches in Emacs can keep a persistent REPL using comint, and the walkthrough on Emacs comint sessions shows how to bind rabbitmqctl to a buffer that survives across reconnects.

sudo rabbitmqctl add_user appuser 'ChangeMe-StrongPass'
sudo rabbitmqctl set_user_tags appuser management
sudo rabbitmqctl add_vhost /orders
sudo rabbitmqctl set_permissions -p /orders appuser '.*' '.*' '.*'

This pattern mirrors the principle of least access: the application gets a narrowly scoped vhost, and the management tag grants dashboard access without full administrator powers. Rotate credentials regularly and store them in a secret manager, since plaintext passwords in shell history are a recurring source of post-incident findings during APRA reviews in the finance sector.

Enabling the Management Plugin and Locking Down Access

The management plugin exposes a web UI on port 15672 by default. Enable it with:

sudo rabbitmq-plugins enable rabbitmq_management

For production deployments, terminate TLS and restrict access through a reverse proxy. Browser access on the default port is unencrypted, so the dashboard should never be exposed directly to the internet. Bind it to localhost or front it with Nginx, which also makes it straightforward to layer basic authentication and IP allowlists sourced from corporate ranges in Sydney or Perth offices.

A quick reference for the ports the broker exposes:

Protocol Default Port Typical Use
AMQP 5672 Application messaging
AMQPS 5671 Encrypted AMQP
MQTT 1883 IoT device telemetry
MQTTS 8883 Encrypted MQTT
HTTP 15672 Management UI
HTTPS 15671 Encrypted management UI

The broker is now ready to accept connections from your applications. The key points to retain are that Erlang must match the RabbitMQ release, the default guest user should be replaced before opening the listener beyond localhost, and vhost boundaries keep multi-tenant workloads isolated. Regular checks of /var/log/rabbitmq/ and the management dashboard surface queue backlogs before they affect downstream services, and pairing the broker with a firewall ruleset aligned to the table above completes a defensible baseline for a Fedora host.