In this tutorial we’ll learn how to install RabbitMQ on CentOS 7. We will also install and configure its prerequisites. RabbitMQ is open source material broker applications (sometimes called message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP). The RabbitMQ server consists of the Erlang programming language and can be built on the Open Telecom Platform framework for clustering and failover.
I recommend to use a minimal CentOS server setup as a basis for the tutorial, that can be a virtual or a root server image with an CentOS 7 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.
Install RabbitMQ on CentOS 7
Step 1. First, ensure your system is fully up-to-date by running the following:
yum -y update
Step 2. Installing Erlang.
RabbitMQ is written in Erlang, you need to install Erlang before you can use RabbitMQ:
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm sudo rpm -Uvh erlang-solutions-1.0-1.noarch.rpm sudo yum install erlang erlang-nox
Verify your installation of Erlang:
Step 3. Installing RabbitMQ.
First, download the RabbitMQ rpm package as per your operating system version from its official website:
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.14/rabbitmq-server-3.6.14-1.el7.noarch.rpm rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
Finally, install RabbitMQ server using command:
sudo yum install rabbitmq-server-3.6.14-1.el7.noarch.rpm
Once installation is complete, start the rabbitmq server and enable it to start on boot by running the following command:
sudo systemctl enable rabbitmq-server sudo systemctl start rabbitmq-server
Step 4. Create Admin User in RabbitMQ .
By default RabbitMQ creates a user named “guest” with password “guest”. You can also create your own administrator account on RabbitMQ server using following commands. Change password with your own password:
sudo rabbitmqctl add_user radmin password sudo rabbitmqctl set_user_tags radmin administrator sudo rabbitmqctl set_permissions -p / radmin ".*" ".*" ".*"
Step 5. Configure firewall rules.
In order to access the RabbitMQ remote management console, you need to allow inbound TCP traffic on ports 4369, 25672, 5671, 5672, 15672, 61613, 61614, 1883, and 8883:
sudo firewall-cmd --zone=public --permanent --add-port=4369/tcp --add-port=25672/tcp --add-port=5671-5672/tcp --add-port=15672/tcp --add-port=61613-61614/tcp --add-port=1883/tcp --add-port=8883/tcp sudo firewall-cmd --reload
Step 6. Configure RabbitMQ Web Management Console.
To enable web management console run following command on your system:
sudo rabbitmq-plugins enable rabbitmq_management
Step 7. Accessing RabbitMQ Web Management Console.
Open your web browser and write your local IP address following by “:15672”, and “RabbitMQ” will start with you, use the below default admin and password.
Congratulation’s! You have successfully install and configure RabbitMQ on your CentOS 7 server. Thanks for using this tutorial installing RabbitMQ open source material broker applications on CentOS 7 system.