Learn how to install RabbitMQ Server on CentOS 8 with this step-by-step guide. Set up a reliable message broker to efficiently handle your messaging needs. Follow the instructions to install, configure, and start using RabbitMQ on your Linux system. #centlinux #linux #rabbitmq
RabbitMQ is an open-source message broker software designed to manage the exchange of information between different applications, services, or systems. It facilitates communication by implementing the Advanced Message Queuing Protocol (AMQP) but also supports other protocols like STOMP, MQTT, and HTTP.
Here are some key features of RabbitMQ:
RabbitMQ is commonly used in microservices architectures, data processing pipelines, real-time messaging applications, and anywhere asynchronous communication is needed to decouple producers and consumers, enhancing the efficiency, reliability, and maintainability of systems.
The RabbitMQ source code is available on GitHub Repository and it is distributed under Mozilla Public License.
Read Also: How to install RabbitMQ on Rocky Linux 9
RabbitMQ and Redis are both popular tools used for messaging and data management, but they serve different purposes and have distinct features. Here’s a comparison of RabbitMQ and Redis:
In summary, RabbitMQ and Redis serve different roles in a system architecture. RabbitMQ is a specialized message broker with a focus on reliability and routing, while Redis is a versatile in-memory data store optimized for speed and real-time data access.
Recommended Online Training: RabbitMQ: The Complete Guide with Software Architecture Applications
We are using a minimal CentOS 8 virtual machine with following specifications.
Use a ssh client to connect with rabbitmq-01.centlinux.com server as Linux root user.
Update software packages in your Linux operating system to the latest stable releases by using dnf command.
You may read our previous article, if you want to completely upgrade CentOS 7 to CentOS 8 operating system.
# dnf update -y
Check the Linux operating system and Kernel version of the virtual machine in use here.
# cat /etc/redhat-release CentOS Linux release 8.3.2011 # uname -r 4.18.0-240.1.1.el8_3.x86_64
Some of the required software packages by the message-broker software are available in EPEL (Extra Packages for Enterprise Linux) yum repository.
Therefore, you are required to enable / install EPEL yum repository on your Linux server before installing RabbitMQ.
# dnf install -y epel-release
To install a latest version of RabbitMQ software, you can either compile the source code for your preferred Linux distro, or you can add the official yum repository to install the message-broker software from pre-compiled RPM packages.
This software provides a bash script for automated installation of their official yum repository.
Execute the following command to install RabbitMQ yum repository on your Linux server.
# curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
Build cache for newly installed yum repositories.
# dnf makecache CentOS Linux 8 - AppStream 3.5 kB/s | 4.3 kB 00:01 CentOS Linux 8 - BaseOS 4.3 kB/s | 3.9 kB 00:00 CentOS Linux 8 - Extras 1.5 kB/s | 1.5 kB 00:00 Extra Packages for Enterprise Linux Modular 8 - 27 kB/s | 104 kB 00:03 Extra Packages for Enterprise Linux 8 - x86_64 88 kB/s | 8.7 MB 01:40 rabbitmq_rabbitmq-server 99 B/s | 833 B 00:08 rabbitmq_rabbitmq-server-source 152 B/s | 819 B 00:05 Metadata cache created.
Now, you can easily install RabbitMQ on CentOS 8 by using a dnf command. All the dependencies will be resolved automatically because you have already setup the EPEL yum repository on your Linux server.
# dnf install -y rabbitmq-server
Enable and start RabbitMQ service as follows.
# systemctl enable --now rabbitmq-server.service Created symlink /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service â /usr/lib/systemd/system/rabbitmq-server.service.
Verify the status of RabbitMQ service.
# systemctl status rabbitmq-server.service
Although RabbitMQ software contains sufficient CLI (command line) tools for administration of message-broker server.
But you can optionally install the RabbitMQ management console to perform GUI based administration.
Execute following command to install RabbitMQ management console on your Linux server.
# rabbitmq-plugins enable rabbitmq_management Enabling plugins on node rabbit@rabbitmq-01: rabbitmq_management The following plugins have been configured: rabbitmq_management rabbitmq_management_agent rabbitmq_web_dispatch Applying plugin configuration to rabbit@rabbitmq-01... The following plugins have been enabled: rabbitmq_management rabbitmq_management_agent rabbitmq_web_dispatch started 3 plugins.
Verify that the RabbitMQ management console service is running on default port 15672.
# ss -tulpn | grep 15672 tcp LISTEN 0 128 0.0.0.0:15672 0.0.0.0:* users:(("beam.smp",pid=2949,fd=98))
To allow incoming traffic to RabbitMQ management console, you are required to allow the default service port 15672/tcp in Linux firewall.
Further, RabbitMQ uses port 5672/tcp for AMQP protocol based queues. Therefore, you should also enable it in the Linux Firewall.
Execute the following command to allow required ports in Linux firewall.
# firewall-cmd --permanent --add-port={5672,15672}/tcp success # firewall-cmd --reload success
RabbitMQ software shipped with a default user guest with password guest. This guest user has administrative privileges but it can only be login to message-broker server from localhost.
Therefore, we need to create another admin user to access RabbitMQ management console remotely.
First, check the already available users on message-broker server.
# rabbitmqctl list_users Listing users ... user tags guest [administrator]
Now, execute following command at Linux command line to create a new user for administration of RabbitMQ server.
# rabbitmqctl add_user admin Str0ngP@ssw0rd Adding user "admin" ... # rabbitmqctl set_user_tags admin administrator Setting tags for user "admin" to [administrator] ...
Open URL http://rabbitmq-01.centlinux.com:15672/ in a web browser.
Login as admin user that you have created in previous steps.
After successful login, you may reach at the dashboard of RabbitMQ Management UI. You can perform complete administration of your message-broker server from here.
We strongly recommend that you should buy and read RabbitMQ in Depth (PAID LINK) by Manning Publications to grow your knowledge in this area and to learn to use the RabbitMQ server for your applications.
Setting up RabbitMQ Server on CentOS 8 can greatly enhance your system’s messaging capabilities, ensuring reliable and efficient communication between your applications. By following the proper installation and configuration steps, you can leverage RabbitMQ’s powerful features to improve your overall system performance.
If you need expert assistance with installing RabbitMQ Server on CentOS 8, I offer professional services to help you get started. From initial setup to advanced configuration, I can ensure your RabbitMQ installation is optimized for your specific needs.
Visit my Fiverr profile to learn more about my services and how I can assist you in setting up RabbitMQ Server on CentOS 8. Let’s work together to enhance your system’s messaging infrastructure!
Puppy Linux is a fast, lightweight OS designed for speed and simplicity, perfect for old…
Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…
Discover how to change Apache port in Linux easily. Follow our simple guide to modify…
Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…
Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…
Discover the ultimate Fail2ban configuration guide. Learn how to set up, customize, and optimize Fail2ban…
This website uses cookies.
View Comments
Masha Allah, sir please make article on Kafka
You may find it here.