Download Setup Node.JS on IBM i
Following on from the previous blog, it’s time to use IBM i ACS to download and install Node.JS on our IBM i Power System.
To install Node.js on IBM i, you have a few options:
IBM i Node.js SDK
- The IBM i Node.js SDK is a convenient way to get started. It bundles the Node.js SDK with other supported open-source packages.
- You can download it as an RPM (Red Hat Package Manager) from the IBM i Node.js SDK download page.
- This ensures that Node.js works seamlessly in your IBM i environment.
Node.js via PASE
PASE (Portable Application Solutions Environment) provides a runtime environment for open-source software on IBM i.
Ensure you’ve set up the open-source environment on your IBM i.
Then, follow these steps:
- Install Node.js using ACS (Access for Client Solutions):
- Open ACS.
- Navigate to the “Available packages” tab.
- Locate Node.js 20 and install it.
This will make Node.js available for development on your IBM i system.
I found the easiest way to install was using ACS – so do it with me.
Open IBM i ACS
To install open-source software on IBM i, you’ll need the appropriate authority and follow the right steps. Let’s break it down:
- IBM i Node.js SDK:
- If you’re installing Node.js (or any other open-source package) using the IBM i Node.js SDK, you’ll need sufficient authority to install software on your system.
- Ensure you have the necessary permissions to install RPM packages.
- PASE (Portable Application Solutions Environment):
- When working with open-source software via PASE, you’ll need the following authority:
- USE authority to the PASE environment.
- OBJEXIST authority to the directories where you plan to install open-source packages.
- EXECUTE authority on the installation scripts or commands.
- Additionally, ensure you have the authority to create directories and files within the PASE environment.
- When working with open-source software via PASE, you’ll need the following authority:
- IBM i Access Client Solutions (ACS):
- If you’re using ACS to manage open-source packages, you’ll need the necessary authority to:
- Download software (such as RPM packages) using ACS.
- Install the downloaded packages.
- Update existing packages.
- Ensure you have the appropriate permissions to perform these actions.
- If you’re using ACS to manage open-source packages, you’ll need the necessary authority to:
- Community Support:
- For community-supported open-source projects (e.g., Node.js packages), you can raise defects or seek assistance on community channels like GitHub.
- While IBM provides some level of free community support for specific integration pieces, it’s essential to engage with the relevant open-source community for assistance.
For more information on installing open-source packages, visit the IBM i RPM Packages page.
Launch IBM i ACS Open Source Package Management
Logon with a Profile with authority
This will show you the list of installed packages on your system.
If you scroll down and find node.js is installed, then you are good to go. So, lets write and run a simple node.js helloworld application. If you dont find it… then read on.
If it is not installed then simply click the AVAILABLE PACKAGE heading and scroll down to find nodejs20:
You will see several different versions of node.js available for ibm i systems:
Let’s explore the differences between Node.js versions 14, 16, 18, and 20. Each of these versions brings its own set of features and improvements:
- Node.js 14 (LTS):
- End-of-Life: Node.js 14 will go End-of-Life in April 2023.
- Stability: It’s an LTS (Long-Term Support) version, which means it’s stable and well-supported.
- Recommended for Production: Ideal for production environments where reliability is crucial.
- Features: Node.js 14 introduced features like worker threads, V8 engine updates, and improved diagnostics.
- Considerations: If you’re currently on Node.js 14, plan to upgrade to either Node.js 18 (LTS) or Node.js 20 (soon to be LTS).
- Node.js 16 (LTS):
- End-of-Life: Node.js 16 will go End-of-Life in September 2023 (brought forward from April 2024 due to OpenSSL 1.1.1 support).
- Stability: Another LTS version with stability and long-term support.
- Features: Node.js 16 introduced ECMAScript modules (ESM), V8 updates, and performance improvements.
- Use Cases: Suitable for applications that benefit from ESM and need long-term support.
- Node.js 18 (LTS):
- Preferred LTS Version: As of now, Node.js 18.14.0 is the preferred LTS version.
- Stability: Provides stability and long-term support.
- Features: Node.js 18 includes enhancements like URL, fetch(), and EventTarget improvements.
- Considerations: If you’re looking for a stable LTS version, Node.js 18 is a good choice.
- Node.js 20 (Current):
- Not Yet LTS: Node.js 20 is the current release and will enter LTS in October.
- Features: Node.js 20 introduces the Permission Model (restricting access to resources), synchronous import.meta.resolve, and other improvements.
- Performance: Leverages V8 Fast API calls for better performance.
- Evaluation: Explore the new features and evaluate their impact on your applications.
In summary, choose the LTS versions (14, 16, or 18) for production systems, and consider Node.js 20 for experimentation and feature exploration.
Life on the modern edge is fun.
Choose Node.js 2.0 🙂
Enter a ‘Y’, sit back and sip your cup of tea (either ASSAM or EARL GRAY is acceptable) and watch Node.JS install on your IBM i System.
HUZZAH! node.js is installed on my IBM i System
What now?
Quickly test that Node.js works, using SSH or PASE.
Let’s do PASE because its quick and easy. QP2TERM is a program that starts a bash-like terminal. It is used to run an IBM i Portable Application Solutions Environment (IBM PASE for i). To launch the PASE interactive environment, you can call QP2TERM. Once inside PASE, you can run commands.
From an IBM i Command line call qp2term which will enter you into the PASE environment:
call qp2term
Now you can go through the steps to verify your PASE environment and also check that Node.JS is installed and running healthily:
Its like you read my mind! You appear to know so much about this, like you wrote the book in it or something. I think that you can do with a few pics to drive the message home a little bit, but instead of that, this is excellent blog. A fantastic read. I’ll certainly be back.