Installing RabbitMQ on FreeBSD 8.0

I needed to use AMQP for one of the apps which I'm hacking on right now .. so needed to install RabbitMQ. RabbitMQ is the fantastic, open sourced message queue application that is both high performance (I'm coming from SQS which is somewhat slow) and low taxing on your CPU, which is basically great for me since I'm running it in a VPS environment.

So I fired up SSH and installed Erlang first since RabbitMQ is written in Erlang

# cd /usr/ports/lang/erlang

# make clean install

I didn't need have an X environment so can safely uncheck Java apps, X, WX. It will start building .. after you are done .. time to install RabbitMQ.

# cd /usr/ports/net/rabbitmq

# make clean install

After you are done, RabbitMQ will tell you something like this

##############################################################################

Please note:The "rabbitmqctl" command must be run as the rabbitmq user,with a real shell, and

with the ${HOME} environment variable set to thatuser's real home directory.

su users can do

something like this: 

# env HOME=/home/rabbitmq su -m rabbitmq -c 'rabbitmqctl ...'

sudo users can do something like this: # sudo -H -u rabbitmq rabbitmqctl ...##############################################################################

 

Ok, great ! Now we have installed RabbitMQ. Remember to add an entry to your rc.conf so it will start automatically and also to allow you to start it manually now.

# echo 'rabbitmq_enable="YES"' >> /etc/rc.conf

 

If you are in your root directory (because you are su), and you try starting RabbitMQ, you will get some wierd errors .. error_logger, protocol error blah blah blah. Closer inspection seems to indicate that RabbitMQ does not have enough privileges to write to your current directory.

No worries, just go back to root and start it from there.

# cd /

# /usr/local/etc/rc.d/rabbitmq start

 

If all goes well, RabbitMQ will report to you that the node has started and you are ready to start on your MQ apps!

 

Filed under  //  freebsd   installation   rabbitmq  
Comments (0)
Posted