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.
First, get the source code from our GitHub repositories:
git clone https://github.com/rabbitmq/rabbitmq-server.git rabbitmq
Then, use GNU Make to pull down dependencies and build the server and all plugins that ship with the RabbitMQ distribution:
cd rabbitmq make
In order to build RabbitMQ, a few tools must be installed.
RabbitMQ requires a recent version of Python 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.
The Erlang development and runtime tools are needed to compile RabbitMQ server, tools and tier 1 plugins.
On a Debian-based system, install the erlang-nox
, erlang-dev
and erlang-src
packages.
See Erlang compatibility guide to learn more about supported versions of Erlang/OTP.
A recent version of Elixir is needed to build RabbitMQ CLI tools.
GNU make is the primary build tool used by RabbitMQ.
A recent version of xsltproc, which is part of libxslt and xmlto must be available.
zip and unzip would be necessary if source code is obtained via an archive instead of a git repository clone.
Change to the rabbitmq
directory, and type make
.
Other interesting Makefile
targets include
Make Target | Description |
---|---|
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 the node's data directory, under /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" make run-broker RABBITMQ_NODENAME=rmq |
In practice, building RabbitMQ server from source is of limited use unless an easy to deploy package (e.g. a generic binary build or Debian one) can be produced.
Everything related to packaging the RabbitMQ server is in the main RabbitMQ repository.
There is a number of top-level packaging Make targets available, one for each package type (or family of packages, such as RPM):
make package-generic-unix
make package-deb
make package-rpm
make package-rpm-suse
make package-windows