Installing Profound.js onto an Offline System
Before starting the installation, please be sure to review the installation prerequisites.
Overview
Profound.js is distributed as an npm package, so a normal installation downloads the product and its dependencies from the public npm registry. This page describes how to install Profound.js onto an IBM i that is disconnected from the Internet, by running a local npm proxy on a machine that does have Internet access and pointing the IBM i at it.
What You Need
A connected machine - A system (Windows, Mac, or Linux) on the same network as the IBM i that is connected to the Internet. This can be your own workstation;
Node.js and npm on that machine - Node.js includes npm, so installing Node.js installs both;
Node.js and npm on the IBM i - See Installing Node.js for IBM i;
Profound UI, if it is being used - The Profound.js installer prompts for the Profound UI
/htdocsdirectory. If the directory given does not exist, the installation hangs while it tries to reach the Internet to download a copy (see Install Profound UI on IBM i).
Setting Up the Proxy
On the connected machine, install Sinopia with npm. Sinopia can act as a local npm cache, a proxy for the npm registry, or a private registry; here it is used as a proxy so that the IBM i can reach the npm registry indirectly.
To install Sinopia, run
npm install -g sinopia;To launch Sinopia, run
sinopia. This creates the default configuration file and prints its location:
Shell
C:\Users\profoundlogic> sinopia
warn --- config file - C:\Users\profoundlogic\AppData\Roaming\sinopia\config.yaml
warn --- http address - http://0.0.0.0:4873/By default Sinopia only listens on the loopback address. So that it can be reached from the local network, add the following to the config.yaml that Sinopia generated:
listen:
- 0.0.0.0:4873Restart Sinopia after changing config.yaml. For the next steps you will need the connected machine’s internal IP address or hostname so that the IBM i can reach it.
Connecting to the Proxy and Installing
On the IBM i, change the registry that npm uses before installing Profound.js.
From SSH (or
QP2TERM), runnpm set registry <URL>, where<URL>ishttp://localmachine:4873without quote marks, andlocalmachineis the internal IP address orhostnameof the system running Sinopia;Continue with the normal Installation Process. The
npm install profoundjscommand now pulls the product and all of its dependencies through the proxy;After the installation completes, reset the registry:
npm set registry https://registry.npmjs.org/
The registry setting is per user. If the installation and later upgrades are run under different user profiles, the registry has to be set for each of them.