Installing and configuring
The IBM® SDK for Node.js - z/OS® is available as an SMP/E installable from Shopz.
The Program Directory for the product details specific installation requirements and instructions in Chapters 5 and Chapter 6. For information about the latest APAR fixes, see Fix list for IBM SDK for Node.js - z/OS.
The following checklist summarizes the key configuration steps for a successful installation.
Hardware prerequisites
zEnterprise® 196, zEnterprise 114, or newer.
Software prerequisites
- z/OS V2R2 with PTF UI46658, z/OS V2R3, or higher.
- Integrated Cryptographic Services Facility (ICSF) must be enabled on systems where SDK for Node.js is run. For details, refer to ICSF System Programmer's Guide (SC14-7507) and ICSF Administrator's Guide (SC14-7506).
- Python 2.7.13 or higher that is provided by Rocket Software. Note that Python 3.x is not compatible.
- GNU Make 4.1 or higher that is provided by Rocket Software.
Configuration
IBM SDK for Node.js - z/OS is an OMVS-based application, which requires certain configuration on the UNIX System Services file system to ensure proper operation.
- For z/OS V2R2, to confirm whether PTF UI46658 is installed, validate the timestamp of the /usr/include/xutility file. If the time stamp is earlier than April 26, 2017, the PTF is not installed.
- Validate that /usr/bin/env exists. If not configured, refer to the instructions in Verifying the env command path.
- Ensure that /tmp has at least 1 GB or more of disk space configured. To use an alternative file system, you can set the TMP environment variable to a directory that has sufficient space.
Environment variables
You need to set the following environment variables before using IBM SDK for Node.js - z/OS.
- Configure the PATH environment variable to include the bin
directories for IBM SDK for Node.js - z/OS, Python, and GNU Make tools with the following command:
export PATH=$PATH:$PathPrefix/usr/lpp/IBM/cnj/IBM/node-latest-os390-s390x/ bin:$PathPrefix/usr/lpp/IBM/cnj/njsc/bin:/rsusr/rocket/bin
Note: $PathPrefix can be undefined for default installation under /usr/lpp/IBM/cnj/IBM. If the product is not installed in the default installation location, contact your system administrator for the $PathPrefix value and ensure the installation was performed properly. For detailed information, see section 6.2.1 in Program Directory (GI13-4703-00). - The C/C++ environment comes pre-configured when using npm to build native
add-ons. However, if you invoke node-gyp directly to build native code, the
following C/C++ compiler environment variables need to be
set:
export CC=eb2as.sh export CXX=eb2as.sh export LINK=eb2as.sh export _C89_CCMODE=1 export _CC_CCMODE=1 export _CXX_CCMODE=1
npm configuration
The npm utility is included in IBM® SDK for Node.js - z/OS® to install Node.js modules and packages. The npm utility performs checks to limit unsafe installation of modules by root / BPXROOT. To proceed to use BPXROOT id, you can take either of the following steps:
- Run with the --unsafe-perm
npm
option. For example:
You can configure this option as default with:npm install <npm_module> --unsafe-perm
npm config set unsafe-perm true
- Create a user id: nobody and ensure it is a member of a group. npm switches to this nobody uid/gid as necessary when running as BPXROOT.