Skip to main content
Version: 4.0

Generic Binary Build ("Generic UNIX Build")

Overview

RabbitMQ releases include a binary package for Linux, MacOS, and *BSD systems. It is minimalistic and not opinionated in how it is installed, configured and managed. This package is recommended in environments where more opinionated installation options (the Debian or RPM packages, Homebrew, BSD ports) cannot be used. It is also the most convenient option for running multiple versions on the same machine in development environments.

There's a separate binary package for Windows.

Unlike with the cases of Debian, RPM and Windows installer packages, node management with this package type is performed solely using RabbitMQ CLI tools or by the operator setting up e.g. a systemd service manually.

Downloads

DescriptionDownloadSignature
Generic UNIX binary build (tar.xz, from GitHub, recommended)rabbitmq-server-generic-unix-4.0.2.tar.xzSignature

Installation

Make Sure Erlang/OTP is Installed

This package requires a supported version of Erlang to be installed in order to run.

Install the Server

Download a rabbitmq-server-generic-unix-4.0.2.tar.xz archive and extract it.

Contained in the tarball is a directory named rabbitmq_4.0.2. This directory is the node base directory. It should be moved to a suitable application directory on the system, such as /usr/local. The sbin directory in that directory contains server and CLI tool scripts. It is a good candidate for including into PATH.

Operations

Running and Managing the Node

Unlike some other installation methods, namely the Debian and RPM packages, RabbitMQ generic UNIX binary build does not require sudo. It can be uncompressed into any location and started and managed using the scripts and CLI tools under sbin. Default data directory location will be under ./var, that is, in the installation directory.

Starting the Server

To start the server, run the sbin/rabbitmq-server script. This displays a short banner message, concluding with the message "completed with [n] plugins.", indicating that the RabbitMQ broker has been started successfully. To start the server in "detached" mode, use rabbitmq-server -detached. This will run the node process in the background.

Stopping the Server

To stop a running node, use sbin/rabbitmqctl shutdown. The command will wait for the node process to stop. If the target node is not running, it will exit with an error.

Configuring the Server

RabbitMQ configuration file located at $RABBITMQ_HOME/etc/rabbitmq/rabbitmq.conf is the primary way of configuring the node.

It is possible to use environment variables to control certain settings. The recommended way of doing that is using the $RABBITMQ_HOME/etc/rabbitmq/rabbitmq-env.conf file.

Neither of these files exist after installation, so they must be created first.

See RabbitMQ configuration guide to learn more.

File Locations

The generic binary build is designed to run without granted permissions to directories outside of its base one. The directories and files used by default are all held under the installation directory rabbitmq_4.0.2 which is in the $RABBITMQ_HOME variable in the scripts.

The node can be instructed to use more conventional system directories for configuration, node data directory, log files, plugins and so on. In order to make the node use operating system defaults, locate the following line

PREFIX=${RABBITMQ_HOME}

in the sbin/rabbitmq-defaults script and change this line to:

SYS_PREFIX=

but do not modify any other line in this script.

Important: after this modification the default directory locations may point to non-existent directories or directories that the effective node user won't have permissions for.

In particular RABBITMQ_MNESIA_BASE and RABBITMQ_LOG_BASE may need to be created (the server will attempt to create them at startup), and the enabled plugins file (RABBITMQ_ENABLED_PLUGINS_FILE) will need to be writable by rabbitmq-plugins.

The configuration files will be looked for in /etc/rabbitmq/.

Port Access

RabbitMQ nodes bind to ports (open server TCP sockets) in order to accept client and CLI tool connections. Other processes and tools such as SELinux may prevent RabbitMQ from binding to a port. When that happens, the node will fail to start. Refer to the Networking Guide for more details.

Default User Access

The broker creates a user guest with password guest. Unconfigured clients will in general use these credentials. By default, these credentials can only be used when connecting to the broker as localhost so you will need to take action before connecting from any other machine.

See the documentation on access control for information on how to create more users and delete the guest user.

Managing the Node

To stop the server or check its status, etc., you can invoke sbin/rabbitmqctl (as the user running rabbitmq-server). All rabbitmqctl commands will report the node absence if no broker is running.

  • Invoke rabbitmqctl stop or rabbitmqctl shutdown to stop the server
  • Invoke rabbitmq-diagnostics status to check whether it is running

See CLI tools guide to learn more.

Controlling System Limits on Linux

RabbitMQ installations running production workloads may need system limits and kernel parameters tuning in order to handle a decent number of concurrent connections and queues. The main setting that needs adjustment is the max number of open files, also known as ulimit -n. The default value on many operating systems is too low for a messaging broker (1024 on several Linux distributions). We recommend allowing for at least 65536 file descriptors for user rabbitmq in production environments. 4096 should be sufficient for many development workloads.

There are two limits in play: the maximum number of open files the OS kernel allows (fs.file-max on Linux, kern.maxfilesperproc on OS X and FreeBSD) and the per-user limit (ulimit -n). The former must be higher than the latter. For more information about controlling the system-wide limit, please refer to the excellent Riak guide on open file limit tuning.

Verifying the Limit

RabbitMQ management UI displays the number of file descriptors available for it to use on the Overview tab.

rabbitmq-diagnostics status

includes the same value. The following command

ulimit -a

can be used to display effective limits for the current user. There may be more convenient OS-specific ways of doing that for a running process, such as the /proc filesystem on Linux.

Configuration Management Tools

Configuration management tools (e.g. Chef, Puppet, BOSH) provide assistance with system limit tuning. Our developer tools guide lists relevant modules and projects.