Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 8 - Installing RabbitMQ Message Broker


The "debian" way

The easiest way to install a RabbitMQ server is to simply execute:

sudo apt-get install rabbitmq-server -y

This will install version 3.3.5.

Manual Deb Install

Alternatively, you could download the deb from their installation page for Debian/Ubuntu.

# Install gdebi so dependencies will auto install
sudo apt-get install gdebi -y

# Fetch the deb

# Install the deb
sudo gdebi rabbitmq-server_3.5.6-1_all.deb

You will now have version 3.5.6 installed.

Apt Repository

If you want the latest release and automatic updates through apt, then you can add their repository.

# Add to your sources list.
echo "deb testing main" | sudo tee -a /etc/apt/sources.list

# Add their key to prevent warning messages.
sudo apt-key add rabbitmq-signing-key-public.asc

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

You will now have version 3.5.6 installed.

Extra Commands

Check the Version

sudo rabbitmqctl status | grep RabbitMQ

Manage the Service

sudo service rabbitmq-server [start|stop|restart]

Enable the Management Console

sudo rabbitmq-plugins enable rabbitmq_management

# Create admin account
sudo rabbitmqctl add_user [username] [password]
sudo rabbitmqctl set_user_tags [username] administrator
sudo rabbitmqctl set_permissions -p / [username] ".*" ".*" ".*"

sudo service rabbitmq-server restart

Now just navigate to http://[server ip]:15672/ and login.

Create Connection Limit

echo "ulimit -n [limit]" | sudo tee /etc/default/rabbitmq-server

# Restart the service to take effect.
sudo service rabbitmq-server restart


Last updated: 16th August 2018
First published: 16th August 2018