Building on Unix

Building on Unix Systems

Contents

  1. Requirements for OpenAMQ on Unix
  2. Specify the IBASE Directory
  3. Set Your PATH
  4. Choose a Build Model
  5. Unpack the Source Code
  6. Build the Packages
  7. Test the Server
  8. Unix Build FAQ

1. Requirements for OpenAMQ on Unix

  • Linux, Solaris*, or another Unix system
  • An ANSI C compiler (OpenAMQ builds tested with GCC, Sun C, and Intel C)
  • 1 gigabyte of available disk space
  • tar, gunzip

OpenAMQ has been validated on these Unix/Linux systems:

  • Red Hat Enterprise Linux 3 and 4.
  • Debian Linux 3.1 with 2.4, 2.6 kernels.
  • Solaris 8*, 10.

It may not build and/or not operate correctly on other Unix systems. If you need help to build OpenAMQ on other Unix systems please contact us.

*Note:

For optimal performance on Solaris, we recommend using Solaris 10 or newer, and compiling OpenAMQ with the Sun Studio 11 compilers.

2. Specify the IBASE Directory

The OpenAMQ libraries and executables are installed into the directory defined by the environment variable IBASE (the shared install base for all iMatix products).

Define IBASE using a command following this example:

$ IBASE=$HOME/ibase
$ export IBASE

You can add these commands to your shell startup script so that you do not need to retype them in each shell window.

3. Set Your PATH

To correctly access the OpenAMQ executables, you must place the IBASE/bin directory on your path. Do this using these commands:

$ PATH=$IBASE/bin:$PATH
$ export PATH

You can add these commands to your shell startup script so that you do not need to retype them in each shell window.

4. Choose a Build Model

From the same OpenAMQ source kit you can build many variations of the software:

  • single-threaded, useful for single-core servers (st).
  • multi-threaded, ideal for servers with two or more cores (mt).
  • with full debugging information (debug).
  • optimised, without debugging information (release).

The default build is mt,release. To choose a different build, set the BOOM_MODEL environment variable following this example: $ BOOM_MODEL="mt,debug" $ export BOOM_MODEL

You can add these commands to your shell startup script so that you do not need to retype them in each shell window.

5. Unpack the Source Code

After downloading the OpenAMQ source kit, move it to a working directory with sufficient disk space and then unpack the source code using this command:

$ tar zxvf /path/to/OpenAMQ-1.2c4.tar.gz
$ cd /path/to/OpenAMQ-1.2c4

6. Build the Packages

After setting IBASE, your PATH, and BOOM_MODEL, build the software using this command, in the OpenAMQ-1.2c4 directory:

$ sh build.sh

7. Test the Server

After a successful build, start the server as follows:

$ amq_server
OpenAMQ/1.2c4
Production release
Copyright (c) 2007 iMatix Corporation
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2006-05-09 10:12:41: W: security warning - console login uses default password
2006-05-09 10:12:42: I: server ready for incoming AMQ connections

And in a second window, start the test client as follows:

$ amq_client

The client will create a temporary queue on the server, send a single message to its own queue, and read the message back off its queue. To stop the server, press Ctrl-C.

More information: Running Your Server

8. Unix Build FAQ

  • ? Answer: