[rabbitmq-discuss] Startup scripts on RedHat 5.6

Simon MacMullen simon at rabbitmq.com
Tue Jun 7 10:35:10 BST 2011

On 06/06/11 17:03, Dan wrote:
> Hi
> Could you clarify the best practice for starting and stopping RabbitMQ
> when using the generic source, please?
> (We're using the generic to get the latest versions of Erlang and
> Rabbit.)

I would suggest you get the latest Rabbit RPM from 
http://www.rabbitmq.com/server.html, and then install the Erlang R14B02 
RPM from the fedorapeople repository referenced there. But it's your 
machine :)

> Interactively it's all fine whilst logged on as the rabbit user.  I
> can start from the command line with:
>    rabbitmq_server-2.4.1/sbin/rabbitmq-server -detached
> and stop with:
>    rabbitmqctl stop
> But if I do this as root it causes problems with the permissions on
> the cookie and lock files, and I'd like RabbitMQ to start
> automatically on system reboot.

Sure. Also in general you shouldn't run servers as root, although I'm 
sure you're aware of that.


> Everything seems good to me, but I'd just like to check I'm doing the
> right thing given this is a production environment...?  I'm sure this
> problem has been solved already, so have I missed a trick with the
> default RPM startup script? e.g. does it use the SUID bit or something
> similar to achieve this?

The RPM installs a wrapper script which is used to invoke 
rabbitmq-server, rabbitmqctl etc. The "real" scripts live outside your 
path.  The wrapper script can be found here:


Cheers, Simon

Simon MacMullen
Staff Engineer, RabbitMQ
SpringSource, a division of VMware

More information about the rabbitmq-discuss mailing list