In this tutorial, we will show you how to install RabbitMQ on your Ubuntu 20.04 LTS. For those of you who didn’t know, RabbitMQ is open source message broker software (sometimes called message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP). The RabbitMQ server is written in the Erlang programming language and is built on the Open Telecom Platform framework for clustering and failover. Client libraries to interface with the broker are available for all major programming languages.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step by step installation RabbitMQ on Ubuntu 20.04 Focal Fossa. You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian based distribution like Linux Mint.
Install RabbitMQ on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running these following
apt commands in the terminal.
Step 2. Installing Erlang.
Now we add the repository to your Ubuntu system by running the following commands:
echo"deb https://packages.erlang-solutions.com/ubuntu focal contrib"|sudotee/etc/apt/sources.list.d/rabbitmq.list
Next, update your system package list and install Erlang:
First, you need to import RabbitMQ:
wget-O-https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc | sudo apt-key add -
wget-O-https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
Then, add the RabbitMQ repository to Ubuntu:
echo"deb https://dl.bintray.com/rabbitmq-erlang/debian focal erlang-22.x"|sudotee/etc/apt/sources.list.d/rabbitmq.list
Now we just need to run an update and install the
rabbitmq-server from our newly added package:
Once successfully installed, RabbitMQ starts and is enabled on boot. You can check this by using:
For easy management, you can even enable the RabbitMQ Management Dashboard. To install the plugin, use the following command:
If you have an active UFW firewall, open both ports 5672 and 15672:
RabbitMQ will be available on HTTP port 15672 by default. Open your favourite browser and navigate to
http://server-ip-address:15672 and complete the required steps to finish the installation.
By default, the guest user exists and can connect only from localhost. You can login with this user locally with the password “guest”
To log into the network, create an admin user. Then login with the username and assigned password:
Congratulations! You have successfully installed RabbitMQ. Thanks for using this tutorial for installing RabbitMQ on Ubuntu 20.04 LTS (Focal Fossa) system. For additional help or useful information, we recommend you to check the official RabbitMQ website.