Fast RabbitMQ Deployment on Ubuntu 24.04 – Complete Tutorial

RabbitMQ is a powerful message broker that helps applications communicate efficiently. Whether you're setting up a high-performance distributed system or simply need a lightweight messaging solution, RabbitMQ is a go-to choice.

If you're using Ubuntu 24.04, this guide will walk you through the fastest way to install and configure RabbitMQ, ensuring a secure and optimized setup.

Step 1: Update Your System

Before installing RabbitMQ, it's important to update your system to get the latest package versions. Run:

sudo apt update && sudo apt upgrade -y

This ensures your system is ready for a smooth installation without dependency issues.

Step 2: Install Erlang

RabbitMQ is built on Erlang, so you must install it first:

sudo apt install erlang -y

To verify that Erlang is installed correctly, run:

erl -version

If you see an output with an Erlang version, you’re good to go!

Step 3: Install RabbitMQ Server

Now, install RabbitMQ using the official package:

sudo apt install rabbitmq-server -y

Once installed, enable and start RabbitMQ to ensure it runs on boot:

sudo systemctl enable rabbitmq-server

sudo systemctl start rabbitmq-server

To check the status:

sudo systemctl status rabbitmq-server

If you see "active (running)", your RabbitMQ installation is successful!

Step 4: Enable RabbitMQ Management Dashboard (Optional but Recommended)

RabbitMQ provides a web-based management interface that makes it easier to monitor and manage queues, exchanges, and users.

To enable the management plugin, run:

sudo rabbitmq-plugins enable rabbitmq_management

Now, you can access the RabbitMQ dashboard via:

http://localhost:15672

The default login credentials are:

  • Username: guest
  • Password: guest

For better security, create an admin user with:

sudo rabbitmqctl add_user admin YourSecurePassword

sudo rabbitmqctl set_user_tags admin administrator

sudo rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

Step 5: Secure RabbitMQ (Recommended)

For production environments, disable the default "guest" user:

sudo rabbitmqctl delete_user guest

Also, make sure RabbitMQ is only accessible from trusted sources by setting up a firewall:

sudo ufw allow 5672/tcp   # RabbitMQ messaging port

sudo ufw allow 15672/tcp  # RabbitMQ web interface

Final Thoughts

Congratulations! You've successfully installed and configured RabbitMQ on Ubuntu 24.04.

With RabbitMQ, you can enhance application communication, scale your messaging queues, and improve performance.

Source: orcacore.com/rabbitmq-setup-on-ubuntu-24-04/

Comments

Popular posts from this blog

PowerShell Speed Test: 4 Simple Steps to Measure Your Internet Speed on Windows

Easy Solution for PHP PECL imagick Issues with PHP 8.3 in cPanel

Discover Android 14 Features: What’s New and How to Make the Most of Them