Installing and configuring the SMP/E edition
The Program Directory for the product details specific installation requirements and instructions in Chapter 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
- z15™
- z14®
- z13®/z13s®
- zEnterprise® EC12/BC12
- zEnterprise 196/114
Software prerequisites
- z/OS UNIX System Services enabled on any of following operating systems:
- Integrated Cryptographic Services Facility (ICSF) must be enabled on systems where IBM SDK for Node.js - z/OS is run. For details, refer to ICSF System Programmer's Guide (SC14-7507) and ICSF Administrator's Guide (SC14-7506).
- Perl 5.6.x or later, required for installation of the provided C/C++ runtime and compiler.
- Python 2.7.13 or later 2.x versions, required to compile native add-ons. Must also be available on your PATH. Note that Python 3.x is not compatible.
- Make 4.1 or later, required to compile native add-ons. Must also be available on your PATH.
- If your shell is bash, make sure that the Rocket bash is installed because earlier versions of bash on z/OS are known to have autoconversion issues. The Rocket bash is available for download at "Bash for z/OS" on the Rocket website.
Configuration
IBM SDK for Node.js - z/OS is an OMVS-based application, which requires certain configuration on the z/OS UNIX System Services file system to ensure proper operation.
- 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 theTMP
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.
- Set the auto conversion environment
variables:
export _BPXK_AUTOCVT=ON export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
- Configure the
PATH
environment variable to include thebin
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-4573-00). - To build native add-ons, set the following environment
variables:
export CXX="njsc++" export CC="njsc" export CXX_host=$CXX export LINK=$CXX export CFLAGS="-q64 -fexec-charset=ISO8859-1" export CXXFLAGS="-q64 -fexec-charset=ISO8859-1" export LDFLAGS="-q64"
- 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 _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 thisnobody
uid/gid as necessary when running as BPXROOT.