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.
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_64Verify 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 installStart the service and check its status:
systemctl start rabbitmq-server
systemctl status rabbitmq-serverEnable the service to start on boot and manage its lifecycle:
systemctl enable rabbitmq-server
systemctl stop rabbitmq-server
systemctl restart rabbitmq-server5. 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_userThese steps complete the installation, configuration, and basic administration of RabbitMQ on a CentOS 7 system.
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.