LinuxTutorialsUbuntu

How To Install RabbitMQ on Ubuntu 16.04

Install RabbitMQ on Ubuntu 16.04

In this tutorial, we will show you how to install and configuration of RabbitMQ on your Ubuntu 16.04. For those of you who didn’t know, RabbitMQ is open source message broker software (sometimes called message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP). The RabbitMQ server is written in the Erlang programming language and is built on the Open Telecom Platform framework for clustering and failover. Client libraries to interface with the broker are available for all major programming languages.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of RabbitMQ on a Ubuntu 16.04 server.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 16.04.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install RabbitMQ on Ubuntu 16.04

Step 1. First, make sure that all your system packages are up-to-date by running the following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Erlang.

Install Erlang using the command:

wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
sudo apt-key add erlang_solutions.asc
sudo apt-get update
sudo apt-get install erlang
sudo apt-get install erlang-nox

Step 3. Installing RabbitMQ.

First, Enable the RabbitMQ application repository:

echo "deb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.list

After the repository is added, we will add the RabbitMQ public key to our trusted key list to avoid any warnings about unsigned packages:

wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo apt-key add rabbitmq-signing-key-public.asc

Now we just need to run an update, and install the rabbitmq-server from our newly added package:

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

To start, stop, restart and check the RabbitMQ status, use the following:

# To automatic enable boot service:
systemctl enable rabbitmq-server

# To start the service:
systemctl start rabbitmq-server

# To stop the service:
systemctl stop rabbitmq-server

# To restart the service:
systemctl restart rabbitmq-server

# To check the status:
systemctl status rabbitmq-server

Step 4. Access RabbitMQ management console.

To manage your RabbitMQ server, you can use the rabbitmq-management plugin. This plugin allows you to manage and monitor your RabbitMQ server in a variety of ways, such as listing and deleting exchanges, queues, bindings, and many more. To install the plugin, use the following command:

sudo rabbitmq-plugins enable rabbitmq_management

RabbitMQ will be available on HTTP port 15672 by default. Open your favorite browser and navigate to http://your-domain.com:15672 or http://server-ip:15672 and complete the required steps to finish the installation.

Congratulations! You have successfully installed the RabbitMQ server. Thanks for using this tutorial for installing RabbitMQ on Ubuntu 16.04 system. For additional help or useful information, we recommend you check the official RabbitMQ website.

Squid Install Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “Squid Proxy” installation, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button