Install RabbitMQ server On Ubuntu

How to install Latest RabbitMQ Server on Ubuntu 18.04 LTS




Install Latest Erlang on Ubuntu 18.04 LTS

Step 1: Import Erlang GPG Key
Run the following commands to import Erlang repository GPG key

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

Step 2: Add the Erlang Repository
Once you have imported the key, add the repository to your Ubuntu 18.04 system by running the following commands:

echo "deb https://packages.erlang-solutions.com/ubuntu bionic contrib" | sudo tee /etc/apt/sources.list.d/rabbitmq.list

Step 3: Install Erlang
The last step is the actual installation of Erlang. Update your system package list and install Erlang

sudo apt update
sudo apt -y install erlang

To start  Erlang shell, run the command:
# erl
Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]
Eshell V10.1 (abort with ^G)
1>

Install Latest RabbitMQ Server on Ubuntu 18.04 LTS

How to install Latest RabbitMQ Server on Ubuntu 18.04 LTS
Step 1: Install Erlang/OTP

Step 2: Add RabbitMQ Repository To Ubuntu 18.04
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 -

Now add RabbitMQ Repository To Ubuntu 18.04:

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

Step 2: Install RabbitMQ Server Ubuntu 18.04 LTS

sudo apt update
sudo apt -y install rabbitmq-server

After installation, RabbitMQ service is started and enabled to start on boot. To check the status, run:

$ sudo systemctl status  rabbitmq-server.service 
* rabbitmq-server.service - RabbitMQ broker
   Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-10-24 13:14:42 PDT; 1min 11s ago
 Main PID: 9525 (beam.smp)
   Status: "Initialized"
    Tasks: 87 (limit: 1111)
   CGroup: /system.slice/rabbitmq-server.service
           |-9525 /usr/lib/erlang/erts-10.1/bin/beam.smp -W w -A 64 -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 1048576 -t 50
           |-9622 /usr/lib/erlang/erts-10.1/bin/epmd -daemon
           |-9778 erl_child_setup 32768
           |-9797 inet_gethost 4
           `-9798 inet_gethost 4

Oct 24 13:14:38 ubuntu-01 rabbitmq-server[9525]:   ##  ##
Oct 24 13:14:38 ubuntu-01 rabbitmq-server[9525]:   ##  ##      RabbitMQ 3.7.8. Copyright (C) 2007-2018 Pivotal Software, Inc.
Oct 24 13:14:38 ubuntu-01 rabbitmq-server[9525]:   ##########  Licensed under the MPL.  See http://www.rabbitmq.com/
Oct 24 13:14:38 ubuntu-01 rabbitmq-server[9525]:   ######  ##
Oct 24 13:14:38 ubuntu-01 rabbitmq-server[9525]:   ##########  Logs: /var/log/rabbitmq/rabbit@ubuntu-01.log
Oct 24 13:14:38 ubuntu-01 rabbitmq-server[9525]:                     /var/log/rabbitmq/rabbit@ubuntu-01_upgrade.log
Oct 24 13:14:38 ubuntu-01 rabbitmq-server[9525]:               Starting broker...
Oct 24 13:14:42 ubuntu-01 rabbitmq-server[9525]: systemd unit for activation check: "rabbitmq-server.service"
Oct 24 13:14:42 ubuntu-01 systemd[1]: Started RabbitMQ broker.
Oct 24 13:14:42 ubuntu-01 rabbitmq-server[9525]:  completed with 0 plugins.


You can confirm if the service is configured to start on boot using the command:
systemctl is-enabled rabbitmq-server.service

If it returns disabled, enable it by running:
sudo systemctl enable rabbitmq-server

Step 3: Enable the RabbitMQ Management Dashboard (Optional)
sudo rabbitmq-plugins enable rabbitmq_management

The Web service should be listening on TCP port 15672
ss -tunelp | grep 15672

If you have an active UFW firewall, open both ports 5672 and 15672
sudo ufw allow proto tcp from any to any port 5672,15672

Access it by opening the URL http://[server IP|Hostname]:15672

By default, the guest user exists and can connect only from localhost. You can login with this user locally with the password “guest”

To be able to login on the network, create an admin user like below:

rabbitmqctl add_user admin StrongPassword
rabbitmqctl set_user_tags admin administrator
Login with this admin username and the password assigned.

Moreinfo: https://computingforgeeks.com/how-to-install-latest-rabbitmq-server-on-ubuntu-18-04-lts/




Post a Comment

Previous Post Next Post