The article describes the installation of RabbitMQ for Ubuntu Linux 20.04. You can also refer to the brief guide in the official documentation.
It is recommended to install RabbitMQ in the same Kubernetes environment as the HUMMIX application. For more details on infrastructure organization options, refer to Prepare HUMMIX On-Premises infrastructure.
RabbitMQ version 4.0 is not supported in the current version of HUMMIX. Check the supported RabbitMQ versions in the System requirements for HUMMIX On-Premises article.
Attention
In this example, the virtual host name is hummixvhost, the user is hummixuser, and the password is SecretPassword. When configuring, set this data according to the security policy in your organization.
Installation consists of three steps:
Step 1: Install RabbitMQ
- Install the required packages:
sudo apt-get install curl gnupg apt-transport-https -y
- Import all necessary keys:
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
curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg > /dev/null
curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.9F4587F226208342.gpg > /dev/null
The latest keys for different versions of RabbitMQ are listed in the official RabbitMQ documentation.
- Add RabbitMQ repositories:
sudo tee /etc/apt/sources.list.d/rabbitmq.list <<EOF
deb [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu $(lsb_release -cs) main
deb-src [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu $(lsb_release -cs) main
deb [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu $(lsb_release -cs) main
deb-src [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu $(lsb_release -cs) main
EOF
- Update package cache:
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 rabbitmq-server:
sudo systemctl enable --now rabbitmq-server
Step 2: Configure RabbitMQ
Note
Note
The password can contain the following characters:
- Uppercase Latin letters: A to Z
- Lowercase Latin letters: a to z
- Digits: 0 to 9
- Symbols: -_
Reserved (invalid) characters: ! * ' ( ) ; : @ & = + $ , / ? % # [ ]
To configure RabbitMQ, perform the following actions:
- Enable necessary plugins:
sudo rabbitmq-plugins enable \
rabbitmq_management
- Make sure to add a vhost and grant the user access to it:
sudo rabbitmqctl add_vhost hummixvhost
sudo rabbitmqctl add_user hummixuser SecretPassword
sudo rabbitmqctl set_permissions -p hummixvhost hummixuser ".*" ".*" ".*"
sudo rabbitmqctl set_user_tags hummixuser administrator
Configuring TLS/SSL in RabbitMQ
To enable TLS/SSL support in RabbitMQ, in the /etc/rabbitmq/rabbitmq.conf file:
listeners.tcp = none
sudo systemctl restart rabbitmq-server For more details on TLS/SSL configuration in RabbitMQ, refer to RabbitMQ TLS Support. |
Step 3: Connect to RabbitMQ
Connection string to RabbitMQ:
amqp://hummixuser:SecretPassword@<rabbitmq-server-address>:5672/hummixvhost
Connection string to RabbitMQ with TLS/SSL:
amqps://hummixuser:SecretPassword@<rabbitmq-server-address>:5671/hummixvhost