Installing on Generic Unix

Download the Server

Packaged for generic Unix systems (tar.gz) rabbitmq-server-generic-unix-3.4.3.tar.gz(Signature)

Generic Unix or Linux (BSD, Mac OS X)

Install the Server

Install a recent version of Erlang.

Download rabbitmq-server-generic-unix-.tar.gz from the link above.

Contained in the tarball is a directory named rabbitmq_server-3.4.3. You should extract this into somewhere appropriate for application binaries on your system. The sbin directory will be found in this directory.

Run RabbitMQ Server

Start the Server

Invoke the sbin/rabbitmq-server shell script. This displays a short banner message, concluding with the message "completed with [n] plugins.", indicating that the RabbitMQ broker has been started successfully.

You can also start the server in "detached" mode with rabbitmq-server -detached, in which case the server process runs in the background.

Configure the Server
You can customise the RabbitMQ environment by setting environment variables in $RABBITMQ_HOME/etc/rabbitmq/rabbitmq-env.conf. Server components may be configured, too, in the RabbitMQ configuration file located at $RABBITMQ_HOME/etc/rabbitmq/rabbitmq.config. Neither of these files exist after installation.

File Locations

The Generic Unix tarball is designed as far as possible to run without requiring configuration changes or special permissions. The directories and files used by default are all held under the installation directory rabbitmq_server-3.4.3 which is in the $RABBITMQ_HOME variable in the scripts.

Should you wish to install RabbitMQ Server such that it uses the conventional system directories for configuration, database, log files, plugins etc, it is possible to do this.

Find the line:

in the sbin/rabbitmq-defaults script and change this line to:
but do not modify any other line in this script.

Note: After this modification the default directory locations may require different permissions. 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 RABBITMQ_ENABLED_PLUGINS_FILE will need to be writable (for rabbitmq-plugins). The configuration files will be looked for in /etc/rabbitmq/.

Security and Ports

SELinux and similar mechanisms may prevent RabbitMQ from binding to a port. When that happens, RabbitMQ will fail to start. Make sure the following ports can be opened:

  • 4369 (epmd), 25672 (Erlang distribution)
  • 5672, 5671 (AMQP 0-9-1 without and with TLS)
  • 15672 (if management plugin is enabled)
  • 61613, 61614 (if STOMP is enabled)
  • 1883, 8883 (if MQTT is enabled)

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 fromn any other machine.

See the documentation on access control for information on how to create more users, delete the guest user, or allow remote access to the guest user.

Managing the Broker

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 to stop the server.
  • Invoke rabbitmqctl status to check whether it is running.

More info on rabbitmqctl.