Chapter 2. Installation

This chapter guides you through the steps required to install AMQ JavaScript in your environment.

2.1. Prerequisites

To begin installation, use your subscription to access AMQ distribution archives and package repositories.

To use AMQ JavaScript, you must also install and configure Node.js for your environment. See the Node.js website for more information.

AMQ JavaScript depends on the Node.js debug module. See the npm page for installation instructions.

2.2. Installing on Red Hat Enterprise Linux

AMQ JavaScript is distributed as a zip archive. Follow these steps to install it in your environment.

  1. Download the AMQ JavaScript Client 1.1 zip file from the Red Hat Customer Portal.
  2. Use the unzip command to extract the file contents into a directory of your choosing. This will create a new subdirectory called nodejs-rhea-VERSION.

    $ unzip nodejs-rhea-VERSION.zip
    Archive:  nodejs-rhea-VERSION.zip
       creating: nodejs-rhea-VERSION/
       creating: nodejs-rhea-VERSION/node_modules/
       creating: nodejs-rhea-VERSION/node_modules/rhea/
    [...]
  3. Configure your environment to use the installed library. Add the node_modules directory to the NODE_PATH environment variable.

    $ cd nodejs-rhea-VERSION
    $ export NODE_PATH=$PWD/node_modules:$NODE_PATH

    To make this configuration take effect for all new console sessions, set NODE_PATH in your $HOME/.bashrc file.

  4. Test your installation. The following command will return zero if it can successfully import the installed library.

    $ node -e 'require("rhea")'; echo $?
    0

2.3. Installing on Microsoft Windows

  1. Download the AMQ JavaScript Client 1.1 zip file from the Red Hat Customer Portal.
  2. Extract the file contents into a directory of your choosing by right-clicking on the zip file and selecting Extract All. This will create a new subdirectory called nodejs-rhea-VERSION.
  3. Configure your environment to use the installed library. Add the node_modules directory to the NODE_PATH environment variable.

    $ cd nodejs-rhea-VERSION
    $ set NODE_PATH=%cd%\node_modules;%NODE_PATH%