Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Setup RabbitMQ on RHEL with 1 node

Enable snaps on Red Hat Enterprise Linux and install Erlang/OTP

The EPEL repository can be added to RHEL 9 with the following command:

...

Either log out and back in again or restart your system to ensure snap’s paths are updated correctly.

Install Erlang/OTP

To install Erlang/OTP, simply use the following command:

Code Block
sudo snap install erlang --classic

Install RabbitMQ Server (RHEL-9)

Install RabbitMQ and Cloudsmith Signing Keys

Yum will verify signatures of any packages it installs, therefore the first step in the process is to import the signing key.

Code Block
## primary RabbitMQ signing key
rpm --import 'https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc'
## modern Erlang repository
rpm --import 'https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key'
## RabbitMQ server repository
rpm --import 'https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key'

Add Yum Repositories for RabbitMQ and Modern Erlang

In order to use the Yum repository, a .repo file (e.g. rabbitmq.repo) has to be added under the /etc/yum.repos.d/ directory.

...

For more installing details please refer:https://www.rabbitmq.com/docs/install-rpm

Install Packages with dnf (yum)

Update package metadata:

Code Block
dnf update -y

...

Code Block
systemctl start rabbitmq-server   # Start RabbitMQ server
systemctl enable rabbitmq-server  # Enable RabbitMQ server to start on boot
systemctl status rabbitmq-server  # Check status of RabbitMQ server

Setting up an Admin User for RabbitMQ

The RabbitMQ admin user has permission to configure, read, and write any entity available on the RabbitMQ cluster.

...

Note: Once RabbitMQ UI is up you can log in by using the above username and password

Enabling the RabbitMQ Management Plugin

The RabbitMQ Management Plugin provides a web-based management UI running on default port 15672 and the command-line management tool [rabbitmqadmin]

...

Setup RabbitMQ on RHEL with 3 nodes

 Setup Hostname Resolution

Before setting up the RabbitMQ cluster, you will need to set up hostname resolution on all servers. So each server can communicate with each other by hostname.

...

Code Block
ping -c 3 RabbitMQ-Cluster-Node-1
ping -c 3 RabbitMQ-Cluster-Node-2
ping -c 3 RabbitMQ-Cluster-Node-3

Enable snaps on Red Hat Enterprise Linux and install Erlang/OTP

The EPEL repository can be added to RHEL 9 with the following command:

...

Either log out and back in again or restart your system to ensure snap’s paths are updated correctly.

Install Erlang/OTP

To install Erlang/OTP, simply use the following command:

Code Block
sudo snap install erlang --classic

Install RabbitMQ Server (RHEL-9)

Install RabbitMQ and Cloudsmith Signing Keys

Yum will verify signatures of any packages it installs, therefore the first step in the process is to import the signing key

Code Block
## primary RabbitMQ signing key
rpm --import 'https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc'
## modern Erlang repository
rpm --import 'https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key'
## RabbitMQ server repository
rpm --import 'https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key'

Add Yum Repositories for RabbitMQ and Modern Erlang

In order to use the Yum repository, a .repo file (e.g. rabbitmq.repo) has to be added under the /etc/yum.repos.d/ directory.

These repository mirrors only provide 64-bit x86 (amd64) packages of Erlang.

View file
namerabbitmq (1).repo

For more installing details please refer: https://www.rabbitmq.com/docs/install-rpm

Install Packages with dnf (yum)

Update package metadata:

Code Block
dnf update -y

...

Code Block
systemctl start rabbitmq-server   # Start RabbitMQ server
systemctl enable rabbitmq-server  # Enable RabbitMQ server to start on boot
systemctl status rabbitmq-server  # Check status of RabbitMQ server

Configure RabbitMQ Cluster

RabbitMQ is an application written in Erlang and by default, provides a .erlang.cookie file on the RabbitMQ data directory (/var/lib/rabbitmq).

...

  1. Finally, execute the rabbitmqctl command below to verify the RabbitMQ cluster status. You can run this from any server.

    Code Block
    sudo rabbitmqctl cluster_status

Setting up an Admin User for RabbitMQ

The RabbitMQ admin user has permission to configure, read, and write any entity available on the RabbitMQ cluster.

...

Note: Once RabbitMQ UI is up you can log in by using the above username and password

Enabling the RabbitMQ Management Plugin

The RabbitMQ Management Plugin provides a web-based management UI running on default port 15672 and the command-line management tool [rabbitmqadmin]

...