Install RabbitMQ on Ubuntu
  • 19 Dec 2024
  • 1 Minute to read
  • PDF

Install RabbitMQ on Ubuntu

  • PDF

Article summary

RabbitMQ is a powerful, open-source message-broker software that facilitates communication between different distributed system components. Installing RabbitMQ on an Ubuntu system is a straightforward process that involves setting up the required repository, installing the necessary dependencies, and configuring the broker for optimal performance. Following a few simple steps, you can get RabbitMQ up and running on your Ubuntu machine, enabling you to manage efficiently and route messages between services and applications. This guide will walk you through the installation process, ensuring your RabbitMQ server is ready to handle messaging tasks effectively.

Install RabbitMQ on Ubuntu

To install RabbitMQ on Ubuntu, perform the following steps:

  1. Log in to the Ubuntu Server as a root user.  

  2. Update your local package index to ensure you have the latest version of available packages. sudo apt update

  3. Install the RabbitMQ server package from the official Ubuntu repositories. sudo apt install rabbitmq-server

  4. Start the RabbitMQ service. sudo systemctl start rabbitmq-server

  5. On Boot, enable the RabbitMQ service. sudo systemctl enable rabbitmq-server

  6. The status of the RabbitMQ has to be checked. sudo systemctl status rabbitmq-server

  7. Setup the RabbitMQ Management plugin.  sudo rabbitmq-plugins enable rabbitmq_management

  8. Restart the RabbitMQ server.  sudo systemctl restart rabbitmq-server

  9. Create a new user in RabbitMQ and grant them admin privileges, as the guest user can only be accessed locally on the localhost. sudo rabbitmqctl add_user admin Pass@2233

    sudo rabbitmqctl set_user_tags myuser administrator

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

  10. In Firewall, allow RabbitMQ.  sudo ufw allow proto tcp from any to any port 5672,15672

    ss -tunelp | grep 15672

After the installation, access RabbitMQ on http://x.x.x.x:15672/ with username as admin and password as Pass@2233.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.