Backend Development 4 min read

Step-by-Step Guide to Installing and Configuring RabbitMQ on CentOS 7

This tutorial walks through preparing a CentOS 7 environment, installing required plugins, setting up Erlang, downloading and building RabbitMQ Server, starting the service, enabling the management UI, and managing users and permissions with detailed command examples.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
Step-by-Step Guide to Installing and Configuring RabbitMQ on CentOS 7

1. Environment Setup: Use CentOS 7.x (free) as the operating system.

2. Install required plugin: Install yum install socat -y because RabbitMQ depends on the socat utility.

3. Install Erlang: Download the Erlang package from https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-21.3.8.16-1.el7.x86_64.rpm and install it with the following commands:

curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
sudo yum install erlang-21.3.8.16-1.el7.x86_64

Verify the installation with erl -v .

4. Install RabbitMQ Server: Download the source package from https://github.com/rabbitmq/rabbitmq-server/releases , extract it, configure, compile and install:

wget https://github.com/rabbitmq/rabbitmq-server/archive/refs/tags/v3.10.7.tar.gz
tar -axvf v3.10.7.tar.gz
cd v3.10.7
./configure --prefix=/etc/erlang
make && make install

Start the service and check its status:

systemctl start rabbitmq-server
systemctl status rabbitmq-server

Enable the service to start on boot and manage its lifecycle:

systemctl enable rabbitmq-server
systemctl stop rabbitmq-server
systemctl restart rabbitmq-server

5. Enable Management Plugin: Activate the web management UI with rabbitmq-plugins enable rabbitmq_management and restart the server.

Access the UI at http:// your_ip :15672 using the default credentials guest / guest .

6. User Management: Create users, assign tags, set permissions, change passwords, and delete users using rabbitmqctl commands, for example:

rabbitmqctl add_user username password
rabbitmqctl set_user_tags username role
rabbitmqctl set_permissions -p "/" username ".*" ".*" ".*"
rabbitmqctl change_password username new_password
rabbitmqctl delete_user username
rabbitmqctl list_user

These steps complete the installation, configuration, and basic administration of RabbitMQ on a CentOS 7 system.

backendlinuxinstallationCentOSErlangmessage-queue
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.