Friday, 29 April 2016

A Trip on the ServiceBus

or installing RabbitMq on Windows 2012 r2 Server Core
Note: if you are planning to install this on a domain server have a look at this post first, otherwise you will need to reinstall RabbitMq to work correctly on your domain.

The destination of this voyage is to set up a RabbitMq Service Host on a Windows Serer with the use of the graphical interface.

At this point I have a clean installed Windows 2012 Server running on a local Hyper-V.

First, download and install erlang (Here’s what Microsoft has to say about downloading on the command ine with BitsTransfer.):

mkdir \downloads
cd \downloads
powershell
$url = "http://erlang.org/download/otp_win64_18.3.exe"
$output = ".\otp_win64_18.3.exe"
Import-Module BitsTransfer
Start-BitsTransfer -Source $url -Destination $output
.\otp_win64_18.3.exe

You can “next”, “next”, “install”, “close” over the dialog boxes (it may ask to install the VC redistributable).

Next download and install RabbitMq:

$url = "https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1.exe"
$output = ".\rabbitmq-server-3.6.1.exe"
Import-Module BitsTransfer
Start-BitsTransfer -Source $url -Destination $output
.\rabbitmq-server-3.6.1.exe

Again, “next”, “install”, “next”, “finish” and you’re done.
Punch a hole in the firewall. Yeah I know, this next command just shuts the firewall off … we’ll set it back up shortly:

netsh advfirewall set allprofiles state off

Set rabbit up as a windows service:

exit
setx ERLANG_HOME "c:\program files\erl7.3" /m 
setx RABBITMQ_HOME "c:\program files\RabbitMQ Server\rabbitmq_server-3.6.1" /m
setx PATH "%path%;%RABBITMQ_HOME%\sbin" /m
rabbitmq-service install
rabbitmq-plugins enable rabbitmq_management
rabbitmqctl add_user admin admin
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

It is at this point that you should be able to connect to the admin console via a web browser at:

http:\\{your-server-ip}:15672\

Disclaimer: This is not a properly configured production server, among other things (as noted earlier), the firewall was turned off and the admin|admin username|password is just silly. The rabbitmq web site covers the production settings in depth: read it.

© 2016, Floatingman IT Consulting

No comments:

Post a Comment