How to Download, Install and Manage RabbitMQ-Server v3.8.0 on Ubuntu, Debian and Linux Mint - Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee

Tuesday, October 22, 2019

How to Download, Install and Manage RabbitMQ-Server v3.8.0 on Ubuntu, Debian and Linux Mint

 




 RabbitMQ is one of the more popular message broker solutions in the market, offered with an open-source license (Mozilla Public License v1.1) as an implementation of Advanced Message Queuing Protocol. Developed using the Erlang language, it is actually relatively easy to use and get started.

1.  Robust messaging for applications.
2.  Easy to use.
3.  Runs on all major operating systems.
4.  Supports a huge number of developer platforms and
5.  Open source and commercially supported

Website :- https://www.rabbitmq.com

The latest release of RabbitMQ is 3.8.0
Downloading and Installing RabbitMQ

Add the RabbitMQ source to the APT source list.
Step1 :- sudo echo "deb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.list.d/rabbitmq.list

Add the verification key for the package to avoid any unsigned packages.
Step2 :- sudo wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc

Step3 :- sudo apt-key add rabbitmq-signing-key-public.asc
Or  curl -s http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | sudo apt-key add -

Updating, Download and Install RabbitMQ
Step4 :- sudo apt-get update

Step5 :- sudo apt-get  install rabbitmq-server


In order to manage the maximum amount of connections upon launch
Step6 :- sudo nano /etc/default/rabbitmq-server
Uncomment the limit line (i.e. remove #)

Start the server and verify it is running
Step7 :- sudo service rabbitmq-server restart
       OR  sudo invoke-rc.d rabbitmq-server stop/start/status

systemctl disable firewalld
systemctl stop firewalld

Install the Management GUI

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 users. You can send and receive messages, and monitor activity on specific queues.

Managing RabbitMQ
Step8 :- sudo rabbitmq-plugins enable rabbitmq_management

Once you've enabled the console, it can be accessed using your favourite web browser.
Step9 :- http://[your IP address]:15672

The default username and password are both set “guest” for the log in. Add Management User

To create a new user

Step10 :- sudo rabbitmqctl add_user admin  123

Step11 :- sudo rabbitmqctl set_user_tags admin administrator

Step12 :- sudo rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

Step13 :- sudo rabbitmqctl delete_user guest

Step14 :- sudo service rabbitmq-server restart


Web GUI should now be accessible to the new user

URL :- http://127.0.0.1:15672/

Remote Access

Add rule, restart service
Step15 :- sudo iptables -A INPUT -p tcp --dport 15672 -m state --state NEW,ESTABLISHED -j ACCEPT

Step16 :- sudo service ufw reload

Verify port is listening
Step17 :- netstat -tulpn

Managing on Ubuntu / Debian Based Systems

To start the service:
service rabbitmq-server start

# To stop the service:
service rabbitmq-server stop

# To restart the service:
service rabbitmq-server restart

# To check the status:
service rabbitmq-server status

And that's it! You now have your own message queue working on your virtual server.

Configuring RabbitMQ