rabbitmq freebsd install

rabbitmq install on freebsd10

rabbitmq is a solid amqp messaging provider, needing only minor manual configuration under freebsd. unfortunately, it's not totally obvious what those manual steps are. Here is what worked for me:

first, install rabbitmq from ports

cd /usr/ports/net/rabbitmq
make install

this might take a while as it needs to compile the Erlang bits. If asked about port config options, make sure you set ADMIN=on, which will set up the web admin interface (assuming you want that).

Next, make sure your /etc/rc.conf asks for rabbitmq to be started

rabbitmq_enable="YES"

and finally create (this is the manual bit that otherwise will make you read the manual) a startup super config file /usr/local/etc/rabbitmq/rabbitmq-env.conf to will tell rabbitmq where to finds its actual config file.

NODENAME=bunny@myhostname
CONFIG_FILE=/usr/local/etc/rabbitmq/rabbitmq

Three things to note here:

  • bunny is the name under while rabbitmqctl will look up your rabbit on the Erlang port mapper infrastructure dohickey
  • myhostame should be the no-dots (ie: hostname -s) plain primary hostname of your box (as it knows itself)
  • there is no rabbitmq file, but the port install did create a vanilla rabbitmq.config file, and rabbitmq automatically appends '.config' to the CONFIG_FILE path

Almost there, now create a vhost and an admin user

rabbitmqctl add_vhost test
rabbitmqctl add_user testadmin secret
rabbitmqctl set_permissions -p test testadmin ".*" ".*" ".*"
rabbitmqctl set_user_tags testadmin administrator

Now you can /usr/local/etc/rc.d/rabbitmq start your amqp daemon and log into the rabbitmq webadmin interface on port 15672 to configure things from there using your web browser.