Installing RabbitMQ on CentOS5

Install EPEL

It is recommended to use distribution's packaged version of Erlang to run the server. This is part of Fedora, and in EPEL for RHEL. To enable EPEL run the following command

su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
Installing Erlang

Add the package repository provided by the owner of EPEL Erlang

su -c 'wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo'
yum –y install erlang
Install RabbitMQ from package manager (Recommended)
yum -y install rabbitmq-server
Install RabbitMQ using RPM file

Download the Fedora RPM version of  rabbitMQ from following link under the section Download the RabbitMQ server.

RabbitMQ

cd /usr/share

sudo wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.4.1/rabbitmq-server-2.4.1-1.noarch.rpm

Execute the downloaded rpm file
sudo rpm -i rabbitmq-server-2.4.1-1.noarch.rpm
Test the RabbitMQ installation
sudo  /etc/init.d/rabbitmq-server start

sudo  /etc/init.d/rabbitmq-server status

If you see somewhat following output installation was successful

Status of node [email protected] ...
[{pid,11519},
{running_applications,[{rabbit,"RabbitMQ","2.4.1"},
{mnesia,"MNESIA  CXC 138 12","4.4.17"},
{os_mon,"CPO  CXC 138 46","2.2.5"},
{sasl,"SASL  CXC 138 11","2.1.9.3"},
{stdlib,"ERTS  CXC 138 10","1.17.3"},
{kernel,"ERTS  CXC 138 10","2.14.3"}]},
{nodes,[{disc,[[email protected]]}]},
{running_nodes,[[email protected]]}]
...done.

You can stop the server by this command

sudo  /etc/init.d/rabbitmq-server stop
Make RabbitMQ as a service to start at boot
sudo /sbin/chkconfig rabbitmq-server on
You can use following commands to control rabbitmq service

sudo /sbin/service rabbitmq-server start
sudo /sbin/service rabbitmq-server status
sudo /sbin/service rabbitmq-server stop

Enjoy the Rabbit!!