Installing rabbitmq-server on RHEL
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
RabbitMQ is a popular open-source message broker used widely for queueing, distributing, and managing asynchronous communication in diverse software and web applications. Installing RabbitMQ on a Red Hat Enterprise Linux (RHEL) system involves several steps, mainly because it requires the Erlang programming language environment to run. Here is a step-by-step guide on how to install rabbitmq-server on RHEL.
Prerequisites
Before installing RabbitMQ, ensure your RHEL system meets the following requirements:
- Network Connectivity: Required for downloading packages.
- Root or Sudo Privileges: Necessary for installing packages system-wide.
- Erlang: RabbitMQ requires Erlang to be installed.
Step 1: Install Erlang
RabbitMQ requires the Erlang runtime. You can install Erlang through the EPEL repository or using Erlang Solutions repo, which tends to offer more updated versions.
- Add the EPEL repository:
- Install Erlang from Erlang Solutions:
Step 2: Add the RabbitMQ Repository
With Erlang installed, the next step is to add the RabbitMQ repository to your system.
Step 3: Install RabbitMQ Server
Now, install the RabbitMQ server using yum:
Step 4: Enable and Start RabbitMQ Service
After installation, you should enable and start the RabbitMQ service:
Step 5: Check Service Status
To confirm that RabbitMQ is running, you can check the status of the service:
Step 6: Enable RabbitMQ Management Console (Optional)
The RabbitMQ Management Plugin provides a user-friendly interface to manage the server. To enable it, run:
The management console is available on port 15672 of your server. You can access it via http://your-server-ip:15672.
Securing RabbitMQ
- Change Default User Credentials: By default, RabbitMQ comes with a user named "guest" with full privileges, accessible from localhost only. Change these defaults and set strong passwords.
- Firewall Configuration: Adjust the firewall settings to control access to the RabbitMQ service especially if it's exposed over the network.
- SSL/TLS Configuration: For production environments, configure SSL/TLS to ensure that all data transmitted to and from the RabbitMQ server is encrypted.
Summary Table
| Task | Command/Instruction | Remarks |
| Install Erlang | sudo yum install -y erlang | Requires EPEL and Erlang repo |
| Add RabbitMQ repository | Execute the shell script from packagecloud | - |
| Install RabbitMQ | sudo yum install rabbitmq-server -y | - |
| Start and enable RabbitMQ service | sudo systemctl enable/start rabbitmq-server | Enable to start at boot |
| Enable RabbitMQ Management Console | sudo rabbitmq-plugins enable rabbitmq_management | Access via port 15672 |
| Securing RabbitMQ | Change default user credentials and configure SSL/TLS | Ensure security best practices |
Additional Resources
For further customization and advanced configurations refer to the official RabbitMQ documentation or the RHEL-specific guides which can provide insights tailored to enterprise environments.
With this setup, you now have a basic RabbitMQ server running on RHEL. This setup is suitable for development or small production environments. For larger setups, consider clustering RabbitMQ, tuning it for performance, and securing network communications.
Related reading
- InstanceAlreadyExistsException coming from kafka consumer
- Integrating Apache Kafka with Apache Spark Streaming using Python
- Integrating RabbitMQ with database transactions
- Integration Testing with Bunny Gem and RabbitMQ
- Instantly detect client disconnection from server socket
- Interactive shell using Docker Compose
- Integration tests of a polyglot stack (Java/MongoDB/RabbitMQ...)
- Interact with celery ongoing task

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.