In this article, we will show you how to install RabbitMQ on an Ubuntu 22.04 system. This guide is also applied on other latest Ubuntu systems.
RabbitMQ is an open-source message broker software that implements the Advanced Message Queuing Protocol (AMQP). It has since been extended with a plug-in architecture to support Streaming Text Oriented Messaging Protocol (STOMP), MQ Telemetry Transport (MQTT), and other protocols It is written in the Erlang programming language and is designed to support flexible messaging for applications in a distributed environment.
Message brokers like RabbitMQ allow different parts of a system to communicate by sending and receiving messages. A message is a simple piece of data that is sent from one application or system to another. The message broker acts as a middleman, routing messages between applications and allowing them to communicate without the need to know about each other’s implementation details.
Before we begin, make sure you have the following prerequisites:
To install RabbitMQ on Ubuntu, we need to add the RabbitMQ package repository to our system. To do this, open a terminal and enter the following command:
sudo echo "deb https://dl.bintray.com/rabbitmq/debian focal main" | sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list
echo "deb https://dl.bintray.com/rabbitmq-erlang/debian focal erlang" | sudo tee /etc/apt/sources.list.d/bintray.erlang.list
This command adds the RabbitMQ repository to the list of package sources on your system.
Next, we need to add the RabbitMQ GPG key to our system to verify the authenticity of the RabbitMQ packages we will be installing. To do this, run the following command:
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
This command downloads the RabbitMQ GPG key and adds it to your system’s keyring.
Now that we have added the RabbitMQ repository and GPG key to our system, we can proceed to install RabbitMQ. To do this, run the following command:
sudo apt update
sudo apt install rabbitmq-server
This will update the list of available packages and install RabbitMQ on your system.
After the installation is complete, start the RabbitMQ service by running the following command:
sudo systemctl start rabbitmq-server
To enable RabbitMQ to start automatically at boot, run the following command:
sudo systemctl enable rabbitmq-server
RabbitMQ comes with a built-in management plugin that provides a web-based management interface. To enable the plugin, run the following command:
sudo rabbitmq-plugins enable rabbitmq_management
To configure the firewall on Ubuntu 22.04, you can use the ufw (Uncomplicated Firewall) utility. First, check the status of the firewall:
sudo ufw status
By default, the firewall should be inactive. To enable the firewall, run:
sudo ufw enable
To allow incoming connections to RabbitMQ, you will need to open the appropriate ports. RabbitMQ uses port 5672 for AMQP and port 15672 for the management interface. To allow incoming connections on these ports, run:
sudo ufw allow 5672
sudo ufw allow 15672
After enabling the plugin, you can access the management interface by visiting the following URL in your web browser:
http://localhost:15672/
OR
http://YOUR-SERVER-IP:15672/
The default username and password for the management interface are both “guest“.
In this article, we have shown you how to install RabbitMQ on an Ubuntu 22.04 system. We have also shown you how to enable the management plugin and access the management interface. With RabbitMQ installed and configured, you can now start using it to manage your message queues and facilitate communication between different services and applications.
The post How to Install Rabbitmq Server on Ubuntu appeared first on Osgrove.
Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…
What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…
Wouldn’t it be wonderful to wake up one day with a desire to explore AI…
Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…
Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…
Canonical is pleased to announce security patching and support for Valkey through the Ubuntu Pro…