2011-08-11

Installing RabbitMQ with Management Plugin from Source on Ubuntu 10.04

These should be run as sudo...
$ apt-get purge rabbitmq-*
$ userdel -fr rabbitmq
$ apt-get install xsltproc xmlto
$ useradd -M -r -s /bin/bash -d /var/lib/rabbitmq rabbitmq
$ mkdir -p /usr/local/lib/rabbitmq/plugins/
$ mkdir -p /var/log/rabbitmq/ /var/lib/rabbitmq/ /etc/rabbitmq/
$ chown -R root:root /usr/local/lib/rabbitmq/ /etc/rabbitmq/
$ chown -R rabbitmq:rabbitmq /var/log/rabbitmq/ /var/lib/rabbitmq/
$ chmod -R 775 /usr/local/lib/rabbitmq/ /var/log/rabbitmq/
$ chmod -R 700 /var/lib/rabbitmq/
$ cd /usr/local/src/
$ hg clone http://hg.rabbitmq.com/rabbitmq-public-umbrella
$ cd rabbitmq-public-umbrella
$ hg checkout rabbitmq_v2_5_1
$ make co
$ make release
$ make test
$ cp -fr rabbitmq-server/ebin /usr/local/lib/rabbitmq/
$ cp -f rabbitmq-server/scripts/rabbitmqctl /usr/local/sbin/
$ cp -f rabbitmq-server/scripts/rabbitmq-env /usr/local/sbin/
$ cp -f rabbitmq-server/scripts/rabbitmq-server /usr/local/sbin/
$ cp -f rabbitmq-management/dist/amqp_client-*.ez /usr/local/lib/rabbitmq/plugins/
$ cp -f rabbitmq-management/dist/mochiweb-*.ez /usr/local/lib/rabbitmq/plugins/
$ cp -f rabbitmq-management/dist/rabbitmq_management_agent-*.ez /usr/local/lib/rabbitmq/plugins/
$ cp -f rabbitmq-management/dist/rabbitmq_management-*.ez /usr/local/lib/rabbitmq/plugins/
$ cp -f rabbitmq-management/dist/rabbitmq_mochiweb-*.ez /usr/local/lib/rabbitmq/plugins/
$ cp -f rabbitmq-management/dist/webmachine-*.ez /usr/local/lib/rabbitmq/plugins/
$ bash -c 'echo "export HOME=/var/lib/rabbitmq" >> /etc/rabbitmq/rabbitmq-env.conf'
$ bash -c 'echo "export RABBITMQ_HOME=/usr/local/lib/rabbitmq" >> /etc/rabbitmq/rabbitmq-env.conf'
If you want to run RabbitMQ as a background service, add it as a supervisord service. Supervisord can be installed by doing:
apt-get install supervisor

No comments: