Menu

Server Build Instructions

This section describes the process for obtaining a copy of the RabbitMQ server source code, as well as instructions for building the server from source.

Obtaining the source

First, obtain the source code from our GitHub repositories:

git clone https://github.com/rabbitmq/rabbitmq-server.git

Then, use GNU Make to pull down dependencies and build the server:

cd rabbitmq-server
make

Required Libraries and Tools

In order to build RabbitMQ, you will need a few tools.

RabbitMQ requires a recent version of Python 2 and simplejson.py (an implementation of a JSON reader and writer in Python), for generating AMQP 0-9-1 framing code. simplejson.py is included as a standard json library in the Python core since 2.6 release.

Additionally, you will need

  • the Erlang development and runtime tools
    If you are on a Debian-based system then you need the erlang-nox, erlang-dev and erlang-src packages installed. If you are building and installing Erlang from source then you must ensure that openssl is installed on your system.
  • a recent version of GNU make
  • a recent version of xsltproc, which is part of libxslt
  • a recent version of xmlto
  • zip and unzip

Building the server

Change to the rabbitmq-server directory, and type make.

Other interesting Makefile targets include

all
The default target. Builds the server.
shell
Builds the client libraries and starts an Erlang shell with the libraries loaded.
run-broker
Builds the server and starts an instance with an interactive Erlang shell. This will by default put data, including a Mnesia database, in /tmp/rabbitmq-test-instances, but this location can be overridden by setting the Makefile variable TEST_TMPDIR:

make run-broker TEST_TMPDIR=/some/other/location/for/rabbitmq-test-instances

clean
Removes temporary build products.
distclean
Removes all build products, including fetched dependencies.
tests
Runs a set of tests.

Building server packages

In practice, building RabbitMQ server from source is of limited use unless an easy to deploy package (e.g. a Debian one) can be produced.

Everything related to packaging the RabbitMQ server is in the rabbitmq-server-release repository. Furthermore, this repository has the list of plugins shipped with the broker. Please refer to the README.md for instructions to create the source archive or any binary packages.