How to Install RabbitMQ on Debian 11 Server. This article will introduce what RabbitMQ is with its benefits and then we will move onto installation phase. Let’s start.
What is RabbitMQ
RabbitMQ is a free and open source message queue solution written in Erlang OTP. It is built based on the “Open telecom platform framework” for clustering message requests from the client. RabbitMQ server allows different services in your application to communicate with each other without worrying about message loss when fulfilling different quality of service (QoS) requirements. It provides a common platform to send and receive a message and facilitates encryption services to maintain confidentiality. It is used by many large companies including Zalando, Boomerang, WeWork, WunderList and many more. It is highly beneficial for messaging, and it can be integrated effortlessly. It has the ability to interpret the system’s data in a more simple and readable format.
Before starting, it is recommended to update and upgrade all system packages to the latest version. You can update them using the following command:
apt-get update -y
apt-get upgrade -y
Once all the packages are updated, you will also need to install some required dependencies on your server. You can install all the required packages with the following command:
Once all the packages are installed, you can proceed to the next step.
Install Erlang on Debian 11
Next step is to install Erlang package as a prerequisite on your server. By default, the Erlang package is not included in the Debian 11 default repository. So you will need to add the Erlang repository to your server. You can install it by running the following command:
By default, the RabbitMQ server is not available in the Debian 11 default repository. So you will need to add the RabbitMQ repository to your server. You can add it by running the following command:
Next in how to install RabbitMQ on Debian 11 server is to create an administrative user to authenticate RabbitMQ. You can create it by running the following command:
rabbitmqctl add_user admin admin-password
You will get the following output:
Adding user "admin" ...
Please set an administrator tag on the admin account using the following command:
rabbitmqctl set_user_tags admin administrator
Next, set the required permission on the admin account using the following command:
Next, you will need to install the RabbitMQ management plugin to access the RabbitMQ web interface. You can enable it by running the following command:
rabbitmq-plugins enable rabbitmq_management
You will get the following output:
Enabling plugins on node rabbit@server:
rabbitmq_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@server...
The following plugins have been enabled:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
started 3 plugins.
At this point, the RabbitMQ management plugin is started and listening on port 15672. You can check it by running the following command:
ss -tunelp | grep 15672
You will get the listening port in the following output:
If you are using the UFW firewall on your system, then you will need to allow SSH and RabbitMQ ports via UFW firewall. You can allow all of them by running the following command:
The RabbitMQ also provides a rabbitmqadmin command line utility that allows you to backup RabbitMQ configuration including, users, vhosts, queues, exchanges and bindings.
First, download the rabbitmqadmin utility using the following command:
How to Install RabbitMQ on Debian 11 Server Conclusion
RabbitMQ is a platform to send and receive messages and it safely delivers your messages until it is received. RabbitMQ is a solid message queue software but there are alternatives such as Kafka, ActiveMQ or Redis.
In this post, we explained how to install the RabbitMQ on Debian 11 server. We also explained how to enable the RabbitMQ management plugin, access the RabbitMQ dashboard and backup and restore the RabbitMQ configuration. You can now use RabbitMQ as a message brocker service with your application.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.
00votes
Article Rating
Subscribe
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.