Installing IBM i prerequisites - JeffBerman/Bob GitHub Wiki

Some software needs to be installed on the IBM i before Bob can be used to compile software.

Note: Some of these steps are currently somewhat intricate. We expect installation will become easier with time -- in part due to improvements IBM is making in installing PASE programs, and also because some of these steps can be automated.

Install PASE

The build system uses Unix and GNU tools which run inside of PASE, so PASE must be installed, if it already isn't.

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzalf/rzalfinstall.htm

Install IBM i Open Source Technologies

IBM provides the required software in RPM format. See the open source package manager documentation on bitbucket for instructions on how to get started.

Install the OpenSSH daemon

OpenSSH is an open source implementation of the SSH protocol, and is used by Bob to provide a secure connection between PC and IBM i so that source files can be transferred and remote commands issued. From the OpenSSH website:

OpenSSH is the premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks.

It is very secure and is included in virtually every Linux distribution worldwide. IBM provides information and installation instructions for installing OpenSSH on the i.

After installing, start the server:

===> STRTCPSVR SERVER(*SSHD)

Make Bash the default shell

SSH's default shell on the IBM i is the Bourne shell (see: IBM PASE for i shells and utilities V7R2). We recommend changing this to the Bash shell, because Bash is more user-friendly and feature rich. For steps on how to do this, see this documentation.

Work around Git certificate verification

OpenSSL on the IBM i doesn't ship with SSL certificates, which mean that out of the box, Git is unable to get repositories via HTTPS. One work around is to tell git not to verify certificates:

git config --global http.sslVerify false

Alternatively, if you have access to the Internet from your IBM i system, you can use an IBM-provided script that is hosted on GitHub:

curl -k https://gist.githubusercontent.com/kadler/547bb36ddadb9bfec3ff9c16a164a148/raw/c740a1d425b2006f668467baa77d5ecabb274366/git_ssl_setup.sh | sh

Install GNU tools

Sed, Gawk, Make, and Grep are required. As of this writing, the standard IBM versions of these tools lack features, so the GNU versions are required. Now that these are provided in RPM form, it is quite simple to install them. Once you have the open source environment set up, install the following packages:

  • make-gnu
  • sed-gnu
  • gawk
  • grep-gnu
  • git

Set the system path

The IBM open source and GNU tools have now been installed into directories in the IFS, so those directories need to be added to the shell's path so that the tools can be found. The method to do this varies depending on the shell in use (IBM i offers Bourne, Korn, and Bash shells). Following are instructions to set the path in /QOpenSys/etc/profile, which gets loaded for all users by the Korn and Bash shells. Adjust as necessary to work with your default shell.

  1. First, create the profile file with the appropriate CCSID, if it doesn't exist:
    ===> qsh cmd('touch -C 819 /QOpenSys/etc/profile')
    
  2. Copy the following into /QOpenSys/etc/profile (using Unix EOL linefeeds, not Windows' CRLF):
    # Set path to find IBM open source ports
    PATH="/QOpenSys/pkgs/bin:${PATH}"
    export PATH

Installation of IBM i prerequisites are now complete. :-)

⚠️ **GitHub.com Fallback** ⚠️