RSS

Installing RabbitMQ on Ubuntu

14 Oct

By: MONKEY HACKS

 

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 -i

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


ou can access the user-management with rabbitmqctl and use the command:

add_user {username} {password}

or more preferably maybe edit an existing user, or set the permissions for the new user with:

set_permissions [-p vhostpath] {user} {conf} {write} {read}

For example use the following commands: (it is important to perform these three steps even when creating a new user, if you want to be able to login to the UI console and for your programs to work without facing any permission issues)

add_user newadmin s0m3p4ssw0rd
set_user_tags newadmin administrator
set_permissions -p / newadmin ".*" ".*" ".*"
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.
Congratulations! You now have your own RabbitMQ Server. If you have any questions, feel free to leave them in the comments below.
*** Notation: if guest fail login please do as follow:

So I created the rabbitmq.config inside the directory /etc/rabbitmq with this:

[{rabbit, [{loopback_users, []}]}].

Then

sudo invoke-rc.d rabbitmq-server stop

sudo invoke-rc.d rabbitmq-server start

and both the console and the java client can access using guest/guest:

 

Advertisements
 
Leave a comment

Posted by on October 14, 2015 in Application Server, RabbitMQ

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: