This tutorial will demonstrate how to install RabbitMQ 3.x on CentOS 6.3 ("minimal" profile).
This install was performed using VMWare Fusion on OSX, but should demonstrate the process on most environments using Linux-supported drivers. The virtual was 1-core, 1.6GB RAM, 6GB HDD space; I did not use the quick setup VMWare offers.
There are two ways of installing RabbitMQ on CentOS. The ways differ based on which distribution of Erlang you chose to use (the one out of EPEL or a later version from Erlang Solutions). We will demonstrate both ways in this example.
One of the goals of this tutorial is to not install anymore software than needed. We will use "vi" instead of "pico" or "nano" because that's what's bundled with CentOS minimal profile. If you would rather use another text editor, please install it on your own.
Root Password: rabbit
Disk: Use all space and let CentOS allocate as it sees fit.
Profile. Use default [minimal]. This will not include a GUI.
Reboot the machine.
Create the Rabbit account
We don't want to do everything as root, so we'll create an account called "rabbit".
Login as root (password=rabbit)
Create the 'rabbit' user account.
# -m creates the home directory adduser rabbit -m
Change user "rabbit"'s password to "rabbit".
Add "rabbit" to the sudoers file.
Add the following line in the file:
rabbit ALL=(ALL) ALL
Log in as user "rabbit"
su - rabbit
Network settings will depend on your network environment. The following reflects a DHCP setup.
Edit the settings for your network device. This will be a file in /etc/sysconfig/network-scripts/, probably ifcfg-eth0:
The file is only about 3.5mb and should download in about 3s.
There are two options for installing Erlang via RPM:
Use the EPEL repository. There is a reasonably new (couple months old) Erlang distribution (R14B) available, and the RabbitMQ RPM's dependencies map to this Erlang RPM. This is the cleanest install, but you don't benefit from having a newer Erlang VM.
Use the Erlang Solutions' RPM. The company is creating RPM's of the latest Erlang releases (R15B03) and making them available from their website. Checking the Erlang project site, the RPM provided was the latest version of Erlang available at the time. The RabbitMQ RPM will cry about unsatisfied dependencies when installed this method unless the --nodeps flag is used to install the RPM.
Start the RabbitMQ server to ensure it was correctly installed:
sudo service rabbitmq-server start
iptables is turned on automatically with a CentOS install. In order to connect to the broker, you will need to either turn iptables off (sudo service iptables stop) or configure iptables to allow connections on port 5672. For more on iptables and RabbitMQ, go to the "Configuring iptables for RabbitMQ" section.