How to Install RabbitMQ on Ubuntu 16.04

r00t November 15, 2017

Install RabbitMQ on Ubuntu 16.04

In this tutorial we will show you how to install RabbitMQ on Ubuntu 16.04. 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 Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 16.04 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install RabbitMQ on Ubuntu 16.04

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

apt-get update -y
apt-get upgrade -y

Step 2. Installing Erlang.

First, use the following commands to add erlang apt repository on your system:

sudo dpkg -i erlang-solutions_1.0_all.deb

Now, you can install erlang package on your system using the following command:

sudo apt-get update
sudo apt-get install erlang erlang-nox

Step 3. Installing RabbitMQ.

Now you can install “RabbitMQ”, but first you have to add it to repository sources list, do that by the below command:

sudo echo “deb testing main” >> sudo /etc/apt/sources.list
sudo apt-key add rabbitmq-signing-key-public.asc

After that update apt cache and install RabbitMQ server on your system:

sudo apt-get update
sudo apt-get install rabbitmq-server

Once installation is complete, start the rabbitmq server and enable it to start on boot by running the following command:

sudo systemctl start rabbitmq-server
sudo systemctl enable rabbitmq-server

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 radmin 
sudo rabbitmqctl set_user_tags radmin administrator
sudo rabbitmqctl set_permissions -p / radmin ".*" ".*" ".*"

Step 4. Allow RabbitMQ through Firewall.

First enable your firewall by the below command:

sudo ufw enable

Allow “RabbitMQ” port, usually it works through port: 15672, enable it by the below command:

sudo ufw allow 15672

Step 5. 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 & password.

Username: radmin

Password: radmin

Install RabbitMQ on Ubuntu 16.04

Congratulation’s! You have successfully install and configured RabbitMQ on your Ubuntu 16.04 server. Thanks for using this tutorial installing RabbitMQ on Ubuntu 16.04 LTS (Xenial Xerus) system.

The Tags:

Leave a Comment

Comments are closed.