How to Install RabbitMQ with Erlang/OTP on Ubuntu Linux

|

|

RabbitMQ, a lightweight open-source message broker, can be installed on Ubuntu 16.04, 17.10, and 18.04 by first installing Erlang/OTP, as RabbitMQ requires this to run. Once both are installed, user can enable RabbitMQ to start upon server boot up and activate RabbitMQ Web Console for easier management. Note that for Ubuntu 18.04, users have to…

This article explains how to install RabbitMQ with Erlang/OTP on Ubuntu Linux.

RabbitMQ is a lightweight and popular open-source message broker that supports multiple messaging protocols that many enterprises have widely deployed.

Installing RabbitMQ with Erlang/OTP on Ubuntu Linux allows you to use this lightweight and popular open-source message broker, which supports multiple messaging protocols, flexible routing, and delivery acknowledgment.

Many enterprises and businesses widely use it to manage their mail processes. Following the steps in the tutorial, you can easily install RabbitMQ with Erlang/OTP support on Ubuntu 16.04 / 17.10 and 18.04.

The tutorial also shows you how to enable the RabbitMQ web management console for easy server management.

RabbitMQ supports Advanced Message Queuing Protocol, multiple messaging protocols delivery acknowledgment, flexible routing, and many more. As a result, many enterprises and businesses use this advanced open-source application to manage mail processes.

The steps below are a great place to start if you haven’t installed it.

Install Erlang/OTP

RabbitMQ needs Erlang/OTP to run. However, Erlang/OTP packages in standard Debian and Ubuntu also can be pretty outdated. Consider installing a newer version, such as 20.1.7.1. To install the latest version of Erlang, add the repository below.

sudo sh -c 'echo "deb https://packages.erlang-solutions.com/ubuntu $(lsb_release -sc) contrib" >> /etc/apt/sources.list.d/erlang.list'

After adding the repository above, run the commands below to add the repository key.

wget https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
sudo apt-key add erlang_solutions.asc

After that, run the commands below to install Erland/OTP

sudo apt update
sudo apt install erlang

Add RabbitMQ Repository to Ubuntu

To install RabbitMQ on Ubuntu 16.04 and 17.10 easily, add its repository. To do that, run the commands below. Unfortunately, at the time of this writing, the repository below didn’t support Ubuntu 18.04. However, after 18.04 is released, the commands below should work on it.

sudo sh -c 'echo "deb https://dl.bintray.com/rabbitmq/debian $(lsb_release -sc) main" >> /etc/apt/sources.list.d/rabbitmq.list'

After running the commands above, run the commands below to add the repository key to Ubuntu.

wget -O- https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc | sudo apt-key add -
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -

After adding the RabbitMQ repository and key, run the commands below to install the RabbitMQ package.

sudo apt update
sudo apt install rabbitmq-server

After installing, the commands below can stop and enable RabbitMQ to start when the server boots.

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

Enable RabbitMQ Web Console

RabbitMQ also provides a web management console for easy management. To enable it, run the commands below.

sudo rabbitmq-plugins enable rabbitmq_management

After that, open your browser and browse to the server name or IP address followed by port # 15672

Example:  http://example.com:15672

You should see the RabbitMQ web management console to log on. The default username and password are guests.

Username: guest

Password:  guest

Log in and begin configuring your server

On Ubuntu 18.04, you’ll have to install the Erlang/OTP package from the link below manually:

https://packages.erlang-solutions.com/erlang/

and

RabbitMQ Deb packages from the link below:

https://www.rabbitmq.com/install-debian.html

After 18.04 is fully released, the repositories above should work and allow you to install them easily.

Enjoy~

You may also like the post below:

Like this:



7 responses to “How to Install RabbitMQ with Erlang/OTP on Ubuntu Linux”

  1. apex Avatar
    apex

    thanks! this was clear, and even better than that on the rabbitMQ website

  2. Antonio Avatar
    Antonio

    try install erlang:
    The following packages have unmet dependencies:
    erlang : Depends: erlang-diameter but it is not going to be installed
    Depends: erlang-eldap but it is not going to be installed
    Depends: erlang-ftp but it is not going to be installed
    Depends: erlang-tftp but it is not going to be installed
    Recommends: erlang-jinterface but it is not going to be installed
    Recommends: erlang-ic-java but it is not going to be installed
    Recommends: erlang-mode but it is not going to be installed
    Recommends: erlang-src but it is not going to be installed
    Recommends: erlang-examples but it is not going to be installed
    esl-erlang : Depends: libwxbase2.8-0 but it is not installable or
    libwxbase3.0-0 but it is not installable or
    libwxbase3.0-0v5 but it is not going to be installed
    Depends: libwxgtk2.8-0 but it is not installable or
    libwxgtk3.0-0 but it is not installable or
    libwxgtk3.0-0v5 but it is not going to be installed
    Depends: libsctp1 but it is not going to be installed
    Recommends: erlang-mode but it is not going to be installed
    libssl-dev : Depends: libssl1.0.0 (= 1.0.2g-1ubuntu4.13) but 1.0.2g-1ubuntu4.12 is to be installed
    Recommends: libssl-doc but it is not going to be installed
    E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

  3. Athul Avatar
    Athul

    How to install ssl in rabbitmq mqtt?

  4. ani Avatar
    ani

    superb

  5. gugan Avatar
    gugan

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    rabbitmq-server is already the newest version (3.7.10-1).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Setting up rabbitmq-server (3.7.10-1) …
    dpkg: error processing package rabbitmq-server (–configure):
    installed rabbitmq-server package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
    rabbitmq-server
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  6. Jonathan Avatar
    Jonathan

    Well after spending 3 hours trying to get Rabbit installed this is my savior. Thank you!!

  7. Nayan Avatar
    Nayan

    Great Article..
    Easy & simple steps to install RabbitMQ.

Leave a Reply to Antonio Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.