Simple way to install RabbitMQ in Ubuntu?

Eki Eqbal picture Eki Eqbal · Jan 10, 2012 · Viewed 44.6k times · Source

Is there any simple way to install RabbitMQ for Ubuntu? I did the the following:

Add the following line to /etc/apt/sources.list:

deb http://www.rabbitmq.com/debian/ testing main  

then install with apt-get:

$ sudo apt-get install rabbitmq-server

But I get the following error every time:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 rabbitmq-server: Depends: erlang-nox (>= 1:12.b.3) but 1:11.b.5dfsg-11 is to be     installed
 E: Broken packages

How am I supposed to install dependencies and to control the version of erlang-nox since it is installed already?

Answer

Mudaser Ali picture Mudaser Ali · Mar 5, 2014

Simplest way to install rabbitMQ in ubuntu:

echo "deb http://www.rabbitmq.com/debian/ testing main"  | sudo tee  /etc/apt/sources.list.d/rabbitmq.list > /dev/null
wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo apt-key add rabbitmq-signing-key-public.asc
sudo apt-get update
sudo apt-get install rabbitmq-server -y
sudo service rabbitmq-server start
sudo rabbitmq-plugins enable rabbitmq_management
sudo service rabbitmq-server restart

Default username / password will be guest / guest and port for will be 15672; for UI follow - http://localhost:15672

if you want to change the username and password or add new user please follow these

sudo rabbitmqctl add_user user_name password_for_this_user
sudo rabbitmqctl set_user_tags user_name administrator
sudo rabbitmqctl set_permissions -p / user_name ".*" ".*" ".*"

and to delete guest user please run this command

sudo rabbitmqctl delete_user guest