BreadcrumbHomeResourcesBlog Using HTTP Proxy Support For IBM I September 22, 2022 Using HTTP Proxy Support for IBM iIBM iBy Shlomo VanunuWhen 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.Table of ContentsAbout Open Source Package Management Interface Proxy SupportIBM i Server Requirements and SetupAccess Client Solution - Start the Proxy ServerAccess Client Solution - Start the SSH Connection Using the Proxy ServerAccess Client Solution – Cloning Zend or IBM Repository ProductsFinal ThoughtsAdditional ResourcesTable of Contents1 - About Open Source Package Management Interface Proxy Support2 - IBM i Server Requirements and Setup3 - Access Client Solution - Start the Proxy Server4 - Access Client Solution - Start the SSH Connection Using the Proxy Server5 - Access Client Solution – Cloning Zend or IBM Repository Products6 - Final Thoughts7 - Additional ResourcesBack to topAbout Open Source Package Management Interface Proxy SupportUse 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 StartedAlways use the latest version of ACS available, latest 1.1.9.0, some older versions may not support repository cloning.https://www.ibm.com/support/pages/ibm-i-access-acs-quick-start-guideBack to topIBM i Server Requirements and SetupTwo 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_OSPMTo have the ACS exit program add function id available you will need to apply the following PTF's: V7R4 SI73595V7R3 SI73596V7R2 SI73599These 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.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)Back to topAccess Client Solution - Start the Proxy ServerThe 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/Shelljava -jar <Directory_path>/acsbundle.jar /PLUGIN=httpproxyuiCaption: Note: The acsbundle.jar should be located on windows in directory C:\Users\username\IBM\ClientSolutionsSelect the IBM i server to connect to, enter your credentials (user/pass), then click OK.Proxy Initialized, command line is suspended until proxy stopsThen 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 packagesUse 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 Back to topAccess Client Solution - Start the SSH Connection Using the Proxy ServerThe 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.Back to topAccess Client Solution – Cloning Zend or IBM Repository ProductsFor offline systems, use ACS to install and update from a cloned repository using the following steps:Launch the IBM i Access Client SolutionSelect -> Open Source Package Management Once the Open Source Package Management utility is available Select -> ‘Utilities' tab. Select -> ‘Clone Repos for Offline Use’ option Open Source Package Management utility -> Clone Repo for Offline Use pageSource Repository Click ‘Specify a location’ and enter the URL listed for ZendPHP, Zend Server or IBM repositorieshttps://repos.zend.com/zendphp/rpm_ibmi/ppc64http://repos.zend.com/zend-server/2021.1.2/ibmihttps://public.dhe.ibm.com/software/ibmi/products/pase/rpms/repo DestinationDefault ACS IFS directories for cloned RPM packages -> /QopenSys/QIBM/UserData/rpm_reposAdd a directory name for the cloned repository, under the ACS IFS default directory treeMore Info: https://ibmi-oss-docs.readthedocs.io/en/latest/yum/README.htmlThe cloned repositories should now be available for installation. To start installation, open:Open Source Package Management utility -> Available packages A .repos file create for a cloned-repositories Using the name entered on ‘Clone Repo for Offline Use -> Destination’ section preceded with ‘user-‘ prefixLocation yum .repo files / QopenSys /etc/yum/repos.d/user-zendphp.repoThe difference between a local repo and a remote repo is in the ‘baseurl’ directivehttp:// or ftp:// to specify remote repo baseurl=https://public.dhe.ibm.com/software/ibmi/products/pase/rpms/repofile:// protocol is specifying for a local repo baseurl=file:///QopenSys/QIBM/UserData/rpm_repos/zendphpYou 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 permissionsWRKLNK ‘/ 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 allUpdate the package using the cloned repository yum install user-zendphp yum update Back to topFinal ThoughtsIn 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 iNeed 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 UsBack to topAdditional ResourcesResource Collection - Zend IBM i BlogCase Study - AgVantage Software Modernizes Front-End System With ZendPHP on IBM iBlog - Exploring ZendHQ for IBM iBlog - Using MariaDB and PHP on IBM iBlog - IBM i Merlin and What it Means for PHP TeamsBlog - Installing Zend Server on IBM i Blog - Installing ZendPHP on IBM iBlog - IBM i 7.5 for PHP: Exploring Db2 ServicesBack to top
Shlomo Vanunu Principal Technical Support Engineeer, Zend by Perforce Shlomo joined the Zend development team 16 years ago and is a part of the IBM i Global Services Team, involved in the development of the Zend for IBMi product installation base. He provides technical services, support, and education for Zend Products for IBMi and related technologies on IBMi.Shlomo has worked in the IT industry for 35 years and has experience with IBMi OS system, programming, and several other OS variants.