Setting Up the Open Source Environment on IBM i

This is the first post in a series of posts that I am creating on using open source on IBM i. What I hope to relay is how easy it is to get started using these versatile languages on the IBM i. I would also like to highlight the things I have learned and the steps I have taken to get my environment up and running. I am still learning and contributing to getting more documentation out there to spur the community on in taking advantage of all that IBM i has to offer. I welcome your questions, feedback, and comments. In addition to that I would like to welcome you to join our IBM i community on Slack: link here

Step 1: Download and Install IBM i Access Client Solutions (or ACS)

If you aren’t already running IBM’s new Access Client Solutions that runs on Java, you should be; it’s fantastic. The latest version, as of this article, is 1.1.8.4 and 1.1.8.5 is right around the corner. ACS is loaded with a ton of features and makes interfacing with the system easier to navigate, more intuitive, and pretty to look at. Here is a link to download the client: Download ACS from IBM

Once you download ACS you will need to install it. Nick Litten has an article to help with this: found here. You will need to create a connection to your IBM i in the System Configurations section; however, if you already had the older Windows Client Access installed it should have automatically created a configuration.

Step 2: Setup Open Source Environment through Package Manager in ACS

In ACS go to Tools -> Open Source Package Management. Enter the username and password of a user on the IBM i. When I have installed the open source environment I have done it as a profile with similar access to QSECOFR. According to the article it is not recommended to use QSECOFR with the SSH environment.

NOTE: In my case I am going to use SSH Tunneling because the IBM i I am connecting to does not have direct access to the Internet. This goes without saying but I will say it anyway: the computer you are running this on has to have access to the Internet for SSH Tunneling to work. If it does not have Internet you will be returned an error.

When you click OK, you should be prompted to verify the authenticity of the SSH connection, hit Yes. On the next window, Install the open source environment; hit Yes.

The first thing that will happen at this point is that a script will be sent to your system (In my search I believe the script is bootstrap.sh and it gets added to the /tmp directory). Then the open source environment will be downloaded. This is a series of packages that IBM has put together to setup the yum package manager and about 50 other open source packages. These are all used to setup a basic environment with the tools and resources you will need when working with open source.

Once completed you will see a Command complete message, similar to this one:

Once the install is complete you will see the List of Installed packages.

A complete walk-through on this process is here (this article is using an older version of ACS): Getting started with Open Source Package Management in IBM i ACS

Step 3: Install an Open Source Package – Node.js 12 and Node.js 14

NOTE: You can install any of the open source packages that you like from the list. I am going to install Node.js 12 and Node.js 14 because I am working with those packages.
Click on the Available packages tab/button. These are all of the open source packages vetted and ready for you to use by IBM; over 300+ of them. Scroll down to nodejs12 and nodejs14. Highlight both and click Install.

You will see a black window pop-up that will list the packages selected for Install and their dependencies. If you agree to install type Y and hit enter.

The installer will walk through installing the package and it should end with Complete!.

Congratulations! You have installed your first open source package (outside of installing the environment of course). If you go back to Installed packages you can see the packages listed but first you will have to the View menu and hit Refresh. You can Reinstall, Remover, Show the files associated with the package, and see Information on the package from this view.

Everything that runs in the Open Source Package Manager view can install on an IBM i that is not directly connected to the Internet.

Handling Errors:

If you run into any errors, IBM has added two features to ACS to help; Clear Metadata and Rebuild RPM Database. If that doesn’t help reach out to IBM support or the IBM i community we are here to help.

One error I ran into was this one:

The user that I was connecting to the system as did not have their home directory folder created. If you go WRKUSRPRF on a 5250 session and review what the home directory is for the user a folder needs to be created on the IFS for that user in order for the open source environment to be able to create several files that it uses. This article covers Configuring the IBM i SSHD Server to Use Public-Key Authentication. In the article it references creating a home directory and configuring it for a user.

Stay Tuned:

In my next post I am going to show how to install packages and run applications on the IBM i without Internet access using the ACS HTTP Proxy. I am also writing an article on how to setup your SSH environment.