Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud ServerRabbitmq is a free and open source message broker system that implements the Advanced Message Queuing Protocol (AMQP). It is also known as message-oriented middleware written in the Erlang programming language and built on the Open Telecom Platform framework for clustering and failover.
Rabbitmq is a scalable implementation of an AMQP broker. AMQP is the most widely used open-source standard for distributing and transferring messages from a source to a destination.
The Rabbitmq message broker system provides lot's of features some of them are listed below:
In this tutorial, we will learn how to install rabbitmq on Ubuntu 16.04 server.
Before starting, you will need to update Ubuntu repository with the latest one.
You can do this by running the following commands:
sudo apt-get update -y
sudo apt-get upgrade -y
Before installing rabbitmq, you will need to install erlang as a prerequisite of rabbitmq. You can install them by running the following commands:
wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
sudo apt-key add erlang_solutions.asc
sudo apt-get update -y
sudo apt-get install erlang -y
sudo apt-get install erlang-nox -y
Once you have Erlang, you can continue with installing RabbitMQ:
First, you will need to add rabbitmq repository to apt. You can easily add it with the following command:
sudo echo "deb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.list
Once the repository is added, you will need to 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
Next update the apt repository with the following command:
sudo apt-get update
Once the repository is up to date, then install rabbitmq server by running the following command:
sudo apt-get install rabbitmq-server
Once installation is complete, start the rabbitmq server and enable it to start on boot by running the following command:
sudo systemctl start rabbitmq-server
sudo systemctl enable rabbitmq-server
You can check the status of rabbitmq server with the following command:
sudo systemctl status rabbitmq-server
RabbitMQ comes with default built-in settings which will quite likely be sufficient for running your RabbitMQ server effectively. If it runs fine, then you possibly don't need any configuration at all.
There are three way to customize RabbitMQ server.
You can define ports, file location and names using environment variable file.
You can defines server component settings for permissions, limits and clusters using configuration file.
You can find location of configuration file by inspecting RabbitMQ log file.
If you want to manage the maximum amount of connections upon launch, then you will need to modify rabbitmq-server
file located at /etc/default/ directory.
sudo nano /etc/default/rabbitmq-server
Find the line that containing word ulimit
and uncomment it:
ulimit -n 1024
Save and close the file, then you can proceed to next step.
By default RabbitMQ web management console runs on port 15672
. So you will need to allow this port through UFW firewall. By default UFW firewall is disabled in Ubuntu 16.04, so you will need to enable it first.
You can enable UFW filrewall with the following command:
sudo ufw enable
Once UFW is enabled, allow port 15672
using the following command:
sudo ufw allow 15672
Once you are done, you can proceed to next step.
Once everything is setup properly, it's time to access Rabbitmq web management console. Before starting, you will need to install rabbitmq web management plugin first. You can easily manage and monitor your RabbitMQ server in a variety of ways using this plugin. Using this console, you can manage queues, bindings and users, monitor queues, message rates, connections and also monitor Erlang processes, memory usage etc.
To install this plugin simply run the following command:
sudo rabbitmq-plugins enable rabbitmq_management
The above command will enable the following plugins:
Once the plugin is enabled, you will need to restart rebbitmq service for the changes to come into effect.
Next, you will also need to create new admin user.
You can create a new admin user with the following commands:
sudo rabbitmqctl add_user radmin radmin
sudo rabbitmqctl set_user_tags radmin administrator
sudo rabbitmqctl set_permissions -p / radmin ".*" ".*" ".*"
Next, open your favourite web browser and type the URL http://server-ip-address:15672
and login with your newly create user and password.
HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1227298460.png" alt="" />
After login the RabbitMQ web management console you should see the dashboard in following image:
HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1106298597.png" alt="" />
Finally, you have successfully installed RabbitMQ server on Ubuntu 16.04. You can now easily manage your RabbitMQ server from your web.
In this tutorial, you have learn how to install RabbitMQ server on Ubuntu 16.04 server. You have also learned how to enable the RabbitMQ web management plugins. I hope, you can now easily deploy RabbitMQ server in production environment.
Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server
Related Posts
Comments