Install RabbitMQ Server on Ubuntu 18.043 min read

Devops Engineer
Sorry! The Author has not filled his profile.
follow me

RabbitMQ is one of the most widely deployed open source message brokers. It is an implementation of the Advanced Message Queuing Protocol (AMQP) and Streaming Text Oriented Messaging Protocol, Message Queueing Telemetry transport and other protocols via a plugin.

  • Install ErlangRabbitMQ needs Erlang before we start installing Rabbit MQ package,so let’s install Erlang first.
    wget -O- | sudo apt-key add -
    wget -O- | sudo apt-key add -
    echo "deb bionic main" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
  • Install Rabbit MQ Server
    sudo apt update
    sudo apt install rabbitmq-server

    After installing, let’s check the service is running or not and enable to start on boot.

    root@rabbitmaster:~# systemctl status rabbitmq-server.service
    ● rabbitmq-server.service - RabbitMQ Messaging Server
       Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
       Active: active (running) since Tue 2020-07-14 14:16:43 UTC; 1 months 2 days ago
     Main PID: 4558 (rabbitmq-server)
       CGroup: /system.slice/rabbitmq-server.service
               ├─4558 /bin/sh /usr/sbin/rabbitmq-server
               ├─4568 /bin/sh -e /usr/lib/rabbitmq/bin/rabbitmq-server
               ├─4661 /usr/lib/erlang/erts-7.3/bin/epmd -daemon
               ├─4722 /usr/lib/erlang/erts-7.3/bin/beam.smp -W w -A 64 -P 1048576 -K true -B i -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.5.7
               ├─4834 inet_gethost 4
               └─4835 inet_gethost 4
    Jul 14 14:16:42 rabbitmaster systemd[1]: Starting RabbitMQ Messaging Server...
    Jul 14 14:16:42 rabbitmaster rabbitmq[4559]: Waiting for rabbit@rabbitmaster ...
    Jul 14 14:16:42 rabbitmaster rabbitmq[4559]: pid is 4568 ...
    Jul 14 14:16:43 rabbitmaster systemd[1]: Started RabbitMQ Messaging Server.
    lines 1-16/16 (END)

    Let’s enable service to start on boot.

    root@rabbitmaster:~# systemctl is-enabled rabbitmq-server.service


  • Enable Management Dashboard for RabbitMQFor easy management, let’s enable Web dashboard for RabbitMQ.
    sudo rabbitmq-plugins enable rabbitmq_management
    sudo chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
  • Let’s check the Rabbit MQ dashboard is working and will create an Admin user for login.Here username is “adminUser” and password “adminPassword” kindly replace these values while executing.
    rabbitmqctl add_user adminUser adminPassword
    rabbitmqctl set_user_tags adminUser administrator
    sudo rabbitmqctl set_permissions -p / adminUser “.*” “.*” “.*”

    Open the Dashboard URL through below URL.


    Now you will be able to login with a credential which we have created.

    Rabbit MQ Server Dashboard

  • How to delete the user and change the user password in Rabbit MQDelete User
    rabbitmqctl delete_user username

    Change RabbitMQ user password

    rabbitmqctl change_password username strongpassword

    List the User permission

    rabbitmqctl list_user_permissions username

    RabbitMQ setup for standalone instance has been done and configured. Visit the below link for CLuster setup of RabbitMQ.
    How to setup RabbitMQ Cluster on Ubuntu 18.04



© 2020, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points

Related posts

Leave a Reply