The script from the RabbitMQ official documentation is a good reference from any Debian 11 distro, especially for Azure which only have Debian 11 as the latest to install RabbitMQ
Based on the link and ensuring compatibility with Debian 11 (“bullseye”), here is the revised script incorporating the necessary changes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
#!/bin/sh sudo apt-get install curl gnupg apt-transport-https -y ## Team RabbitMQ's main signing key curl -1sLf "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null ## Community mirror of Cloudsmith: modern Erlang repository curl -1sLf https://keys.openpgp.org/vks/v1/by-fingerprint/E495BB49CC4BBE5B | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.erlang.gpg > /dev/null ## Community mirror of Cloudsmith: RabbitMQ repository curl -1sLf https://keys.openpgp.org/vks/v1/by-fingerprint/9F4587F226208342 | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.server.gpg > /dev/null ## Add apt repositories maintained by Team RabbitMQ sudo tee /etc/apt/sources.list.d/rabbitmq.list <<EOF ## Provides modern Erlang/OTP releases ## deb [signed-by=/usr/share/keyrings/rabbitmq.erlang.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/debian bullseye main deb-src [signed-by=/usr/share/keyrings/rabbitmq.erlang.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/debian bullseye main # another mirror for redundancy deb [signed-by=/usr/share/keyrings/rabbitmq.erlang.gpg] https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/debian bullseye main deb-src [signed-by=/usr/share/keyrings/rabbitmq.erlang.gpg] https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/debian bullseye main ## Provides RabbitMQ ## deb [signed-by=/usr/share/keyrings/rabbitmq.server.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/debian bullseye main deb-src [signed-by=/usr/share/keyrings/rabbitmq.server.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/debian bullseye main # another mirror for redundancy deb [signed-by=/usr/share/keyrings/rabbitmq.server.gpg] https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/debian bullseye main deb-src [signed-by=/usr/share/keyrings/rabbitmq.server.gpg] https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/debian bullseye main EOF ## Update package indices sudo apt-get update -y ## Install Erlang packages sudo apt-get install -y erlang-base \ erlang-asn1 erlang-crypto erlang-eldap erlang-ftp erlang-inets \ erlang-mnesia erlang-os-mon erlang-parsetools erlang-public-key \ erlang-runtime-tools erlang-snmp erlang-ssl \ erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl ## Install rabbitmq-server and its dependencies sudo apt-get install rabbitmq-server -y --fix-missing |
Run the following command to enable the management plugin:
1 |
sudo rabbitmq-plugins enable rabbitmq_management |
After enabling the plugin, restart the RabbitMQ service to apply the changes
1 |
sudo systemctl restart rabbitmq-server |
By default, RabbitMQ creates a user named guest
with the password guest
. However, this user can only log in from localhost
.
When You run this management dashabord using NGINX proxy, You should disabled the default user and replace with your own.
It’s recommended to create a new user for remote access. Replace your_username
and your_password
with your desired username and password
1 2 3 |
sudo rabbitmqctl add_user your_username your_passwordsudo rabbitmqctl set_user_tags your_username administratorsudo rabbitmqctl set_permissions -p / your_username ".*" ".*" ".*" |
The RabbitMQ Management interface will be available at http://localhost:15672/. If you’re accessing it remotely, replace localhost with your server’s IP address or domain name.
Good Luck with RabbitMQ installation on Debian 11