<Marc Qualie/>

Install RabbitMQ on Ubuntu 12.04 Quickly

I've put together this simple install script that I compiled from the various tutorials on the rabbitmq site. It's not intended to be anything new or that isn't easily accessible; It's simply the quickest way I've found to get up and running with the web interface out of the box.

echo "deb https://www.rabbitmq.com/debian/ testing main" > /etc/apt/sources.list.d/rabbitmq.list
wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo apt-key add rabbitmq-signing-key-public.asc
apt-get update
apt-get install rabbitmq-server -y
service rabbitmq-server start
rabbitmq-plugins enable rabbitmq_management
rabbitmqctl add_user admin password
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
rabbitmqctl delete_user guest
service rabbitmq-server restart

Make sure you change the word "password" to the actual password you want to login with in the add_user line before running. The default port for the admin interface is 15672. You can use the management interface to finish off your configuration such as adding exchanges, queues, users and vhosts. Make sure to open the correct firewall ports (15672, 5672) if you are going to be accessing the box outside of a VPN or localhost.

If you have any questions about this post, or anything else, you can get in touch on Bluesky or browse my code on Github.