Monday, May 30, 2016

Installing RabbitMQ on Ubuntu 14.04

By default, RabbitMQ packages are included in Ubuntu and Debian Linux distributions. The problem is, they are horribly outdated. You are far better off downloading the package online and installing it yourself.

Installing RabbitMQ

sudo echo "deb http://www.rabbitmq.com/debian testing main" >> /etc/apt/sources.list
After the repository is added, we will 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
Now we just need to run an update, and install the rabbitmq-server from our newly added package.

sudo apt-get update
sudo apt-get install rabbitmq-server
If everything installed correctly, you should see a message similar to this:

RabbitMQ Management
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.

To install the plugin, use the following command:

sudo rabbitmq-plugins enable rabbitmq_management
Once the plugin is installed, you are able to access it via the following url:

http://[your-server]:15672/
If you are running the server on your local machine, the url will be as simple as http://localhost:15672/. You should see the following screen when you first access the plugin:


The default username and password are guest and guest. Login, and you will be greeted with the RabbitMQ dashboard.


I have installed the latest version of RabbitMQ on a VPS Debian Linux box. Tried to get login through guest/guest but returned with the message login failed. I did a little research and found that for security reason its prohibited to get login via guest/guest remotely.
I also have tried enabling guest uses on this version to get logged in remotely by creating a rabbitmq.config file manually (because the installation didn't create one) and placing the following entry only
[{rabbit, [{loopback_users, []}]}].

0 comments:

Post a Comment