IBM i now has a robust open source environment that allows us to build and run many packages that used to be limited to Linux systems. These instructions will guide you through setting up the environment and important tools on your IBM i.
What releases and PTFs are required
Your system must be running IBM i 7.2 or higher. There are no hardware-specific requirements.
Install these prerequisites on your own computer
On the computer from which you administer your IBM i, you will need these programs:
- The latest version of IBM i Access Client Solutions (ACS). You can download the latest version from IBM.
- ACS requires Java. We recommend getting Java from AdoptOpenJDK, which has no restrictions on commercial use.
- An SSH client. See the page on how to use SSH.
No IBM i internet connection?
If your IBM i server is not connected to the internet, stop here and follow these offline installation instructions instead. If you do have an IBM i internet connection, proceed with the rest of this article.
Set up IBM i open source environment
1. Installing Yum from ACS
(Skip ahead to #2 if you already have Yum installed.)
Note that the package management in ACS will require SSH to be running on your IBM i. See the page on how to use SSH.
From the main window of ACS, select Open Source Package Management:
A window will pop up for authentication information or connecting to your IBM i over SSH. Either a password or SSH key (in OpenSSH format; you must convert PuTTY format keys with PuTTYgen. See the page on SSH for how to convert.) can be used; if you aren’t using an SSH key, uncheck the box. It will also ask if you’re using a chroot; if you don’t know, you aren’t and can ignore it.
If this is your first time connecting to the system, the system will prompt if this is the correct fingerprint for the host. The SSH guide explains in detail, but essentially if the fingerprint changes after this initial confirmation, it will warn you.
If Yum isn’t installed already, it will ask if you want to install it. This is the reason why we’re here, so we’ll say yes.
When it’s finished (you should see the “Bootstrap Complete” message), you can close any windows reporting progress, and the main window will show the installed packages.
2. Update Yum packages
Go to the “Updates Available” tab and install any updates available. The bootstrap process may not install the very latest versions of software, so click “Update” to update any packages that the bootstrap process installed.
A window will pop open with Yum. Answer Yes if you agree with the updates, or No if there are packages you don’t wish to update. Yum will output its progress.
For more information on updating, please see the procedure for updating packages. It covers both using ACS and running the yum command manually.
3. Install important packages
Several important packages may still need to be installed, if they weren’t in the bootstrap package you used. The packages are listed below. You may install them from ACS or use the commands below to install them manually in an SSH terminal (or equivalent).
Install yum-utils
(simplifies administering repositories through the command line):
yum install yum-utils
Install curl
(required for RPM to fetch package signing keys.)
yum install curl
Install ca-certificates-mozilla
(required for TLS connections.)
yum install ca-certificates-mozilla
4. Setting up PATH on the PASE command line
(Optional) It is highly recommended to set your path to avoid having to type the full paths of commands.
Alternative means on running the bootstrap script
These should only be used if you encounter problems through doing it with ACS.
- Tarball and shell script. These are useful for an offline installation. To use these, upload them to the
/tmp
directory, then runcd /tmp; ./bootstrap.sh
from a PASE shell. - SQL script. No longer necessary, as the ACS method covers the same scenarios it does (online installation),
Troubleshooting
“Could not chdir to home directory”
This message is harmless, and can be ignored. To prevent this warning in the future, create a home directory for youself (e.g. /home/alan), by running this command in a PASE shell or QShell:
mkdir ~
The open source environment is already bootstrapped
When trying to install the open source environment, you may get an error when the script runs that tells you the system has been already bootstrapped. This is usually because of an installation attempt that failed, often because it was interrupted.
If you’re sure that the environment has not been properly installed, what you can do is delete /QOpenSys/var/lib/rpm
(the RPM database, checked for existence to determine if the environment is installed), then go through the bootstrap procedure in ACS again.
If that fails, you may need to rerun the bootstrap script with the flag mentioned to override its check. From a PASE shell, run:
cd /tmp ./bootstrap.sh --yes-this-is-unsupported-but-i-know-what-i-am-doing