decorative image for blog on http proxy support for ibm i
September 22, 2022

Using HTTP Proxy Support for IBM i

IBM i

When your IBM i server is lacking an internet connection access due to security or other restrictions, it doesn't have to be a showstopper. Using HTTP proxy support via the open source package management interface, users can use a system as the proxy host to access the RPM repo from IBM or create offline copies of Zend repos.

In this blog, I walk through the steps for setting up your proxy host, and for creating clones of your ZendPHP or Zend Server repos via the IBM i Access Client Solutions HTTP Proxy support feature.

About Open Source Package Management Interface Proxy Support

Use the Proxy support added to the Open Source Package Management Interface (IBM® i Access Client Solutions), to install the Zend Products and other RPM offering. 

The proxy support allows an IBM i system that does not have any access to the internet to use a Windows or Mac OS system as the proxy host to access the RPM repository hosted by IBM.
Then you can also "Zend-Clone" offline copies of the ZendPHP / ZendServer repositories using IBM i Access Client Solutions. 

Before You Get Started

Always use the latest version of ACS available, latest 1.1.9.0, some older versions may not support repository cloning.

IBM i access client solutions screen showing available packages
https://www.ibm.com/support/pages/ibm-i-access-acs-quick-start-guide

IBM i Server Requirements and Setup

Two new function usage IDs have been added to provide specific authority for this proxy support.

The functions usage IDs are:

QIBM_ACS_HTTP_PROXY

QIBM_ACS_HTTP_PROXY_OSPM

To have the ACS exit program add function id available you will need to apply the following PTF's: 

These function usage IDs need to be set in-order to have access to the Proxy support.

Use the IBM I command WRKFCNUSG to work with function usage.

IBM i screen showing work with function usage options

Add your users authority to allow access to the proxy server when started: 

CHGFCNUSG FCNID(QIBM_ACS_HTTP_PROXY) USER(username) USAGE(*ALLOWED) 

CHGFCNUSG FCNID(QIBM_ACS_HTTP_PROXY_OSPM) USER(username) USAGE(*ALLOWED)
ibm i screen showing change function usage options
ibm i screen showing display function usage settings

Access Client Solution - Start the Proxy Server

The IBM i Access Client Solutions product contents include the acsbundle.jar, which is the executable jar file of the product. When installed on Windows, the acsbundle.jar should be located in directory 'C:\Users\username\IBM\ClientSolutions'. The executable .jar allows for many of the functions available from the ACS main GUI to be available from the command-line.

IBM i Access Client Solutions also provides plug-ins for many options including the HTTP Proxy server. These plug-ins are documented in the GettingStarted document under "Advanced Topics" section 9.1 "More command-line Options".

9.1.39 HTTPPROXYUI /PLUGIN=httpproxyui will launch a secured HTTP proxy that enables connectivity from an IBM i to the internet via the computer running this proxy. Access to the internet is enabled from any SSH Terminal session that enters the commands provided by the HTTPPROXYUI plug-in.

Note: The SSH Terminal session must be running on the same computer as this proxy.

Starting the Product using the Command-Line Terminal/Shell

java -jar  <Directory_path>/acsbundle.jar /PLUGIN=httpproxyui
image showing command line terminal with acsbundle.jar plugin

Caption: Note: The acsbundle.jar should be located on windows in directory C:\Users\username\IBM\ClientSolutions

Select the IBM i server to connect to, enter your credentials (user/pass), then click OK.

image showing command line with HTTP proxy connect to SSH popup

Proxy Initialized, command line is suspended until proxy stops

image showing http proxy pop up with start stop option

Then use the Start/Stop to control the proxy server that was created.


Note: Just before following the next step ‘Start the SSH Connection Using the Proxy Server’, you can create the .repo file for zendphp or zend server. 

Once the SSH connection is established via the Proxy Server, any available .repo file will be listed in the Open Source Package Management utility -> Available packages

screen showing yum .repo file for zendphp
image showing yum .repo file for zend server

Use the following command from an SSH Shell Terminal to create the .repo files:

echo -e "[zend_server]\nname=Zend Server\nbaseurl=http://repos.zend.com/zend- server/2021.1/ibmi\nenabled=1\ngpgcheck=0\nsslverify=0\n"                                > 

/QOpenSys/etc/yum/repos.d/zend.repo

echo -e "

 "[Zend]\nname=Zend\nbaseurl=http://repos.zend.com/zendphp/rpm_ibmi/ppc64\nenabled=1\ngpgcheck=0\nsslverify=0\n" >/QOpenSys/etc/yum/repos.d/zendphp.repo

Access Client Solution - Start the SSH Connection Using the Proxy Server

The steps to this point have created a proxy on your PC that your IBM i can connect through to the internet. This is useful for a single system with restricted access, or to run other commands that require a network connection, such as cloning a repository.

To start the SSH connection using the proxy server:

  • Launch the IBM i Access Client Solution Select -> Open Source Package Management.
  • Once the Open Source Package Management utility is available, in the “Proxy Mode” section select -> ‘SSH Tunneling, use this option to connect to the internet through this computer’ option bullet.
image showing ibm i access client solutions, open source package management options for installed packages, with ssh tunneling proxy mode selected

Access Client Solution – Cloning Zend or IBM Repository Products

For offline systems, use ACS to install and update from a cloned repository using the following steps:

  • Launch the IBM i Access Client Solution
    • Select -> Open Source Package Management  
  • Once the Open Source Package Management utility is available 
    • Select -> ‘Utilities' tab. 
    • Select -> ‘Clone Repos for Offline Use’ option 
image showing ibm i access client solutions open source package management utility option to clone repo for offline use
  • Open Source Package Management utility -> Clone Repo for Offline Use page
  • Source Repository 
    • Click ‘Specify a location’ and enter the URL listed for ZendPHP, Zend Server or IBM repositories
    • https://repos.zend.com/zendphp/rpm_ibmi/ppc64
    • http://repos.zend.com/zend-server/2021.1.2/ibmi
    • https://public.dhe.ibm.com/software/ibmi/products/pase/rpms/repo  
  • Destination
    • Default ACS IFS directories for cloned RPM packages -> /QopenSys/QIBM/UserData/rpm_repos
    • Add a directory name for the cloned repository, under the ACS IFS default directory tree
image showing configuration options for clone repo for offline use
image showing clone repo for offline use configuration step for ibm i
image showing succesfully cloned repo for ibm i
More Info: https://ibmi-oss-docs.readthedocs.io/en/latest/yum/README.html

 

The cloned repositories should now be available for installation. To start installation, open:

  • Open Source Package Management utility -> Available packages    
image showing available packages within cloned ibm i zend server repository
  • A .repos file create for a cloned-repositories 
    • Using the name entered on ‘Clone Repo for Offline Use -> Destination’ section preceded with ‘user-‘ prefix
    • Location yum .repo files    / QopenSys /etc/yum/repos.d/user-zendphp.repo
image showing zendphp yum repo file
  • The difference between a local repo and a remote repo is in the ‘baseurl’ directive
    • http:// or ftp://  to specify remote repo  baseurl=https://public.dhe.ibm.com/software/ibmi/products/pase/rpms/repo
    • file:// protocol is specifying for a local repo baseurl=file:///QopenSys/QIBM/UserData/rpm_repos/zendphp
  • You can create a local repo file use any text editor (NotePad/Nano/EDTF/vim)
    • yum .repo files location -> / QopenSys /etc/yum/repos.d/user-zendphp.repo  
[myzend]

name=myzend

baseurl=file:///QopenSys/QIBM/UserData/rpm_repos/myzend

enabled=1

gpgcheck=0  
  • After saving the file, set the correct permissions
    • WRKLNK ‘/ QopenSys /etc/yum/repos.d’ or 
    • chgmod 644 / QopenSys /etc/yum/repos.d/myzend.repo 

 

  • Using a Shell Terminal, clear yum’s cache before attempting a yum install/update command
	yum clean all
  • Update the package using the cloned repository
    	yum install user-zendphp
         yum update
    

Final Thoughts

In this blog, I showed users how to set up a proxy host, andc create clones of ZendPHP or Zend Server repos via the IBM i Access Client Solutions HTTP Proxy support feature. Done correctly, this can be a very useful feature for users who need to work around internet restrictions.

Get Help Modernizing Your IBM i

Need help getting your IBM i PHP application ready for scale? Zend can help. Contact our team today to learn more about how we can modernize your IBM i applications.

Contact Us

Additional Resources