검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 2. Installation

download PDF

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

2.1. Prerequisites

  • You must have a subscription to access AMQ release files and repositories.
  • To use AMQ JavaScript, you must install Node.js in 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

Procedure

  1. Open a browser and log in to the Red Hat Customer Portal Product Downloads page at access.redhat.com/downloads.
  2. Locate the Red Hat AMQ Clients entry in the INTEGRATION AND AUTOMATION category.
  3. Click Red Hat AMQ Clients. The Software Downloads page opens.
  4. Download the AMQ Clients 2.10.0 JavaScript .zip file.
  5. Use the unzip command to extract the file contents into a directory of your choosing.

    $ unzip amq-clients-2.10.0-javascript.zip

When you extract the contents of the .zip file, a directory named amq-clients-2.10.0-javascript is created. This is the top-level directory of the installation and is referred to as <install-dir> throughout this document.

To configure your environment to use the installed library, add the node_modules directory to the NODE_PATH environment variable.

$ cd amq-clients-2.10.0-javascript
$ 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.

To test your installation, use the following command. It prints OK to the console if it successfully imports the installed library.

$ node -e 'require("rhea")' && echo OK
OK

2.3. Installing on Microsoft Windows

Procedure

  1. Open a browser and log in to the Red Hat Customer Portal Product Downloads page at access.redhat.com/downloads.
  2. Locate the Red Hat AMQ Clients entry in the INTEGRATION AND AUTOMATION category.
  3. Click Red Hat AMQ Clients. The Software Downloads page opens.
  4. Download the AMQ Clients 2.10.0 JavaScript .zip file.
  5. Extract the file contents into a directory of your choosing by right-clicking on the zip file and selecting Extract All.

When you extract the contents of the .zip file, a directory named amq-clients-2.10.0-javascript is created. This is the top-level directory of the installation and is referred to as <install-dir> throughout this document.

To configure your environment to use the installed library, add the node_modules directory to the NODE_PATH environment variable.

$ cd amq-clients-2.10.0-javascript
$ set NODE_PATH=%cd%\node_modules;%NODE_PATH%

2.4. Preparing the library for use in browsers

AMQ JavaScript can run inside a web browser. To create a browser-compatible version of the library, use the npm run browserify command.

$ cd amq-clients-2.10.0-javascript/node_modules/rhea
$ npm install
$ npm run browserify

This produces a file named rhea.js that can be used in browser-based applications.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.