- 19 Dec 2024
- 1 Minute to read
- Print
- PDF
Install RabbitMQ on Ubuntu
- Updated on 19 Dec 2024
- 1 Minute to read
- Print
- PDF
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:
Log in to the Ubuntu Server as a root user.
Update your local package index to ensure you have the latest version of available packages. sudo apt update
Install the RabbitMQ server package from the official Ubuntu repositories. sudo apt install rabbitmq-server
Start the RabbitMQ service. sudo systemctl start rabbitmq-server
On Boot, enable the RabbitMQ service. sudo systemctl enable rabbitmq-server
The status of the RabbitMQ has to be checked. sudo systemctl status rabbitmq-server
Setup the RabbitMQ Management plugin. sudo rabbitmq-plugins enable rabbitmq_management
Restart the RabbitMQ server. sudo systemctl restart rabbitmq-server
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 ".*" ".*" ".*"
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.