Saturday, June 11, 2016

[RABBITMQ - ARTICLE:1] Installing RabbitMQ in Ubuntu

This article describes about how to install RabbitMQ in Ubuntu and how to configure it for our use and also explains about the logs available.

Versions: RabbitMQ 3.6.1
Dependency: Erlang 18.2

Before start the installation, we need to install Erlang 18.2 which is a dependency for RabbitMQ. You can find the installation steps for Erlang in my previous blog:

http://ajanthane.blogspot.com/2016/06/installing-erlang-in-ubuntu.html

After successfully installed the Erlang, download the RabbitMQ Server Generic Unix from the below location.
https://www.rabbitmq.com/install-generic-unix.html , Here you can find the latest version.

To find previous versions, you can follow this link.

As here our version is 3.6.1, go to the above link and download the rabbitmq-server-generic-unix-3.6.1.tar.xz.

After extracting, we can start the RabbitMQ Server. Go to

/home/ajanthan/rabbitmq_server-3.6.1/sbin

and execute the below command

ajanthan@ajanthan-ThinkPad-T440p:~/rabbitmq_server-3.6.1/sbin$
./rabbitmq-server start

By Default the management console is not enabled in the installation. To enable it you need to run the below command to install the management plugins.
ajanthan@ajanthan-ThinkPad-T440p:~/rabbitmq_server-3.6.1/sbin$
./rabbitmq-plugins enable rabbitmq_management

After installing the management plugins, if we done a restart the console will look like this.



Commands for start and stop RabbitMQ Server:
ajanthan@ajanthan-ThinkPad-T440p:~/rabbitmq_server-3.6.1/sbin$ ./rabbitmq-server start

ajanthan@ajanthan-ThinkPad-T440p:~/rabbitmq_server-3.6.1/sbin$ ./rabbitmqctl stop
Command to check log files:
ajanthan@ajanthan-ThinkPad-T440p:~/rabbitmq_server-3.6.1$ sudo tail -f var/log/rabbitmq/rabbit@ajanthan-ThinkPad-T440p.log


Now you can access the management console using:
URL: http://localhost:15672
Username: guest
Password: guest

References


[1] https://www.rabbitmq.com/

No comments:

Post a Comment