Rabbitmq - sinherle/Recipes GitHub Wiki
RabbitMQ version 3.6.0 has been successfully built and tested for Linux on z Systems. The following instructions can be used for RHEL 6.6, RHEL 7.1, SLES11 and SLES 12.
General Notes:
i) When following the steps below please use a standard permission user unless otherwise specified.
ii) A directory /<source_root>/
will be referred to in these instructions, this is a temporary writeable directory anywhere you'd like to place it.
Required build/runtime dependencies:
-
RHEL7.1/RHEL6.6
Erlang > R13, See this article for complete build/install instructions: Building Erlang on RHEL7/RHEL6
-
SLES12/SLES11
Erlang > R13, See this article for complete build/install instructions: [Building Erlang on SLES12/SLES11] (https://github.com/linux-on-ibm-z/docs/wiki/Building-Erlang-on-SLES12)
-
RHEL7.1/RHEL6.6
sudo yum install -y nc gzip findutils zip unzip libxslt xmlto patch subversion ca-certificates ant ant-junit java-1.7.1-ibm java-1.7.1-ibm-devel xz xz-devel git
-
SLES12
sudo zypper install -y zip unzip libxslt xmlto patch subversion procps ant ant-junit java-1_7_1-ibm java-1_7_1-ibm-devel git-core
-
SLES11
sudo zypper install -y zip unzip libxslt xmlto patch subversion procps ant ant-junit java-1_7_0-ibm java-1_7_0-ibm-devel python-devel python-xml git-core
Note:- Check the installed version of sed. If the sed version is lesser than 4.2.2 then use below steps to build and install sed 4.2.2 from source:-
cd /<source_root>/ wget http://ftp.gnu.org/gnu/sed/sed-4.2.2.tar.gz tar -xvzf sed-4.2.2.tar.gz cd /<source_root>/sed-4.2.2 ./configure make sudo make install sudo cp /usr/local/bin/sed /usr/bin/sed
Set JAVA_HOME, ANT_HOME, ERL_TOP and PATH
-
RHEL7.1/RHEL6.6
export JAVA_HOME=/usr/lib/jvm/java
-
SLES12/SLES11
export JAVA_HOME=/usr/lib64/jvm/java
-
RHEL7.1/RHEL6.6/SLES12/SLES11
export ANT_HOME=/usr/share/ant export PATH=$PATH:$ERL_TOP/bin:/usr/lib/erlang/lib/erl_interface-3.7.20/bin/:$JAVA_HOME/bin:$ANT_HOME
-
Download the source
cd /<source_root>/ wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.0/rabbitmq-server-3.6.0.tar.xz tar -xvzf rabbitmq-server-3.6.0.tar.xz cd /<source_root>/rabbitmq-server-3.6.0
-
The all target in the Makefile will build and test the server. A non-zero make return value indicates a failure. Unit test results will be output to the console.
make all
-
Install the server, by setting the location of the RabbitMQ server binary, command and documentation respectively in the variables - MAN_DIR, TARGET_DIR, SBIN_DIR.
sudo TARGET_DIR=<dir> SBIN_DIR=<dir> MAN_DIR=<dir> make install
For example:
sudo TARGET_DIR=/usr/bin SBIN_DIR=/usr/sbin MAN_DIR=/usr/share/man make install
-
Download the umbrella and checkout the rabbitmq_v3_6_0 version
cd /<source_root>/ git clone https://github.com/rabbitmq/rabbitmq-public-umbrella.git cd /<source_root>/rabbitmq-public-umbrella git checkout -b rabbitmq_v3_6_0
-
Download all dependencies
make co
-
Download and extract the RabbitMQ Server 3.6.0
cd /<source_root>/rabbitmq-public-umbrella/deps wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.0/rabbitmq-server-3.6.0.tar.xz tar -xvzf rabbitmq-server-3.6.0.tar.xz
-
Build RabbitMQ server
mv rabbitmq-server-3.6.0 rabbit cd /<source_root>/rabbitmq-public-umbrella/deps/rabbit make all
-
Set environment variables for installation
export TARGET_DIR=/usr/bin export SBIN_DIR=/usr/sbin export MAN_DIR=/usr/share/man
-
Install RabbitMQ server
sudo make install
-
Download the clients for version 3.6.0
cd /<source_root>/rabbitmq-public-umbrella/deps/ wget https://www.rabbitmq.com/releases/rabbitmq-java-client/v3.6.0/rabbitmq-java-client-3.6.0.tar.gz wget https://www.rabbitmq.com/releases/rabbitmq-erlang-client/v3.6.0/amqp_client-3.6.0-src.tar.xz
-
Extract package and rename, so they can be used by other make targets
tar -xvzf rabbitmq-java-client-3.6.0.tar.gz mv rabbitmq-java-client-3.6.0 rabbitmq_java_client tar -xvzf amqp_client-3.6.0-src.tar.xz mv amqp_client-3.6.0-src amqp_client
-
Run the test suite
cd /<source_root>/rabbitmq-public-umbrella/deps/rabbitmq_test make all
-
Set environment variable for plugins
export RABBITMQ_PLUGINS_DIR=/<source_root>/rabbitmq-public-umbrella/deps/rabbit/plugins
-
Create directory for RabbitMQ
sudo mkdir /etc/rabbitmq
Copy the rabbitmq.config file in /etc/rabbitmq directory.
-
Enable RabbitMQ management plugin and start RabbitMQ server
cd /<source_root>/rabbitmq-public-umbrella/deps/rabbit sudo make run-broker PLUGINS='rabbitmq_management rabbitmq_consistent_hash_exchange'
We can view the RabbitMQ management UI at http://localhost:15672