In my article this month I will be taking you through the stages to allow a user to access, and use, open source on the IBM i.
This has to be the most asked question of our client base. “I’ve installed open source on my Power server, but how do I get to use it?”
Installing Open Source
I’m sure you all know by now, but I’m going to show you anyway, any open-source package is installed by using ACS (Access for Client Solutions) Open-Source Package Management option as can be seen below.

Then selecting the package, you want to install.

That has given us packages that we can use.
Giving User Access to Open-Source
The first step to giving access to Open-Source is to ensure that the user has a home directory specified on his user profile. This is the equivalent of setting a current library for a user.
To change an existing user profile to have a home directory is achieved using the command below.
CHGUSRPRF USRPRF(JRIDDLE) HOMEDIR('/home/jriddle')
This will give our user JRIDDLE a home directory on the IFS of /home/jriddle
This will not create a home directory for the user, we must make sure one exists for him.
This can be achieved by running a command in a SSH session of
mkdir /home/jriddle
it is a good idea to test that this user is placed into his home directory, by trying to SSH into your server using this profile.
In a terminal session, start a ssh session by specifying his name and the server to access. This is shown below.
ssh jriddle@galatea
Where galatea is our power server.
Once you have signed on, run the command PWD {Print working directory) to show which directory the user is in.
pwd
next we need to set- up a profile for this user (no, nothing to do with the IBM i user profile).
In a bash session, run the command to create an Open-Source profile for the user.
touch $HOME/.profile
this will create an empty file in the users home directory called .profile
Next, set the CCSID of that file, so we don’t get any character conversion issues.
setccsid 1208 $HOME/.profile
Then run two echo commands that will write to the users .profile file.
echo 'PATH=/QOpenSys/pkgs/bin:$PATH' >> $HOME/.profile
echo 'export PATH' >> $HOME/.profile
The user now has to close his SSH session and reconnect again before the profile changes kick in.
Once the SSH connection has been made, type the following command to check the user is correctly setup.
which bash
this should then return
/QOpenSys/pkgs/bin/bash
If it does not return this, check you have set the echo path statement correctly.
if you have python installed, the user should be able to check the version with the following command. Please note the two minus characters otherwise python will return some horrible error message.
python3 --version
Python 3.9.18
And that is it, your new user can now access open-source on IBM i.
Conclusion
This article has demonstrated how easily a new user can access the variety of open-source packages available now on our Power server.
If you have any questions, either on this article, or anything else on the IBM i, please use the comments below, or contact us via the contact us page at https://powerwire.uk/contact
Leave a Reply