Updating Zend Server on IBM i

Before updating Zend Server on IBM i, prepare your environment by verifying your Open Source Package Management setup, ensuring your home directory and .profile library are correctly configured, and checking for any active locks or outdated packages. These steps help prevent issues during the update process, which uses the same repository installer script as the full installation. A backup is recommended before proceeding.

Before you begin

Make sure you perform the following tasks:

This document includes references to a third-party product, IBM i. The user interface and usage of third-party products are subject to change without notice. For the latest published information about IBM i, see the IBM i documentation.

Set up Open Source Package Management

Use the IBM Open Source Package Management utility to install Zend Server on IBM i platforms. This utility is part of ACS (IBM i Access Client Solutions). If this utility is already set up, you can skip to the next section. If not, perform the following setup once.

To get started with Open Source Package Management in ACS, follow the instructions on the IBM Support page:

http://www-01.ibm.com/support/docview.wss?uid=nas8N1022619

This process installs yum and several other Open Source utilities.

Check for updates to installed Open Source Packages

Check the list of currently installed Open Source Packages whether there are new updates available for the ibmi-base packages.

  1. Open the IBM i Access Client Solutions Main User interface and select the option for Open Source Package Management from the left-hand Management group.

  2. Connect to SSH with your IBM i user name and password and press OK.

    The list of currently installed Open Source Packages is displayed.

  3. Click the Updates available tab.

  4. Select all of the ibmi-base packages and then click the Upgrade button at the bottom of the window.

  5. Accept the download size by press the Y key.

  6. Wait for the process to run until the upgrades are finished and the window indicates ‘Complete!’ followed by the $ prompt, then close the window.

    You are returned to the Updates available tab on the Open Source Package Management window.

In some cases, there may be additional IBM i updates available after a set of upgrades is complete. Continue to upgrade all available packages until there are no IBM i updates listed anymore.

If you see any references to IBM i version 7.2 during this process, like the ones shown in the following image, stop the installation and open a Support case.

The installation of Zend Server upgrades all necessary IBM i packages as well. However, upgrading them first within OSPM speeds up your Zend Server installation.

Set up your home directory

If your HOME directory is not already set up, you need to do this setup once. If it is already set up, you can skip to the next section.

In this example, we assume your HOME directory has never been set up. We also assume you want to use yum and other utilities installed with IBM Open Source Package Management.

Perform these steps with a *SECOFR class user profile. The installation process requires a *SECOFR class user profile to execute.

A home directory is probably already defined for the User Profile, but the directory itself may not exist.

To check if the directory already exists:

  1. To learn the directory name, sign in to a PASE terminal by logging into a 5250 session with a *SECOFR class user profile, and then issuing the following command:

    Copy
    call qp2term

    This brings you into the PASE terminal.

  2. Use the following command to discover your home directory name (note that '$HOME' must be ALL CAPS):

    Copy
    echo $HOME

    The home directory output should look like this (USERNAME will be your actual user profile):

    Copy
    > echo $HOME
      /home/USERNAME
      $    

    If you need to run a previous command again, you can use F9 for command history, just like on a regular 5250 command line.

    Replace ‘USERNAME’ with your actual User Profile name in all of the following commands:

  3. In the PASE terminal, check to see if your home directory exists:

    Copy
    ls -al $HOME

    If the home directory doesn’t exist, you will see a message similar to the following:

    Copy
    > ls -al $HOME
      ls: 0653-341 The file /home/USERNAME does not exist.
      $    

To create the home directory:

  1. If the home directory doesn’t exist, use the mkdir command to create it:

    Copy
    mkdir $HOME
  2. Check again to verify the home directory exists:

    Copy
    > ls -al $HOME
      total 32
      drwxrwsrwx    2 username 0              8192 Sep 22 11:07 . 
      drwxrwsrwx    4 qsys     0              8192 Sep 22 11:07 ..
      $    

Set up your PATH and .profile

PASE needs to know where to find yum and other open source commands. To avoid having to adjust your PATH environment variable every time you log in to PASE, create a file named .profile in your HOME directory. If you already have .profile in your HOME directory, please check its contents against the PATH settings in this section.

If the .profile file does not exist in your HOME, or you just created your HOME directory, you can use the echo command with a redirect to create the .profile file and add the appropriate PATH environment variable. This way, you can use yum and other commands installed with Open Source Package Management without always having to type in the environment PATH after entering the PASE terminal.

You can copy and paste the following command into your PASE terminal:

Copy
echo "PATH=/QOpenSys/pkgs/bin:\$PATH\nexport PATH" > $HOME/.profile

Use the cat command to display the contents of your new .profile file and the ls command to see it in the HOME directory:

Copy
> cat $HOME/.profile
  PATH=/QOpenSys/pkgs/bin:$PATH
  export PATH
  $
> ls -al $HOME                                             
  total 48                                                          
  drwxrwsrwx    2 username 0              8192 Sep 22 11:09 .       
  drwxrwsrwx    4 qsys     0              8192 Sep 22 11:07 ..      
  -rw-rw-rw-    1 username 0                42 Sep 22 11:09 .profile
  $

Verify your PATH and .profile

Before exiting the terminal, check to see if the yum command is found by entering the following command:

Copy
> yum
  /QOpenSys/usr/bin/-sh: yum:  not found.
  $    

This is expected. The yum command is not found because the PATH has not been set in the current terminal to find it. (This may not be true if yum has already been added to the default path for PASE.)

End your PASE terminal/session by using F3 to exit.

Return to the PASE terminal. From the 5250 command line:

Copy
call qp2term

Use this command to verify the path now includes /QOpenSys/pkgs/bin:

Copy
> echo $PATH
  /QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin    

Now yum (and other utilities installed with Open Source Package Management) should be found (depending on the version installed, your output will differ somewhat):

Copy
> yum version
  Installed: 7.3/ppc   88:5eb7293211feb319892a5b0493be225bb8ced7c4
  Group-Installed: yum 4:0c4b1b4f02cddd0a8cc88ffd4e7aa3919f8cda3a    

Steps to update Zend Server on IBM i

The update installation is accomplished by the same repository installer script as the full installation, but there are some precautions you need to take before updating. For the most part, these are the same precautions you should take before updating one of the older versions with APYPTF. However, yum does not roll back as easily as RMVPTF, so it is even more important to insure there are no locks to cause issues, and a backup is recommended before starting.

  1. An OSS repository for IBM i v7r3 is required. Verify that the packages include openssl3.
  2. End Zend Server. From a 5250 command line, logged in with a *SECOFR class user profile:
    go zendphp74/zsmenu

    Use option “2. End Zend Server Subsystem”. This ends subsystem ZENDPHP74 and the ZENDPHP74 Apache instance. Use option “3. Work with Zend Server Jobs” to verify all jobs are ended. If any jobs appear, use F5 periodically to refresh the display until all the jobs are done. (Ignore jobs named “ZENDPHP7” or “ZENDSVR6”. These are for different versions.) Use F3 to exit the menu and release the lock on library ZENDPHP74.

  3. If there are any other Apache instances running this version of Zend Server, end them. If you are not sure whether any other Apache instances are using PHP, run the QP0FPTOS program mentioned in a later step. If there are any, that program will find them.

  4. Determine if any jobs have a lock on the ZENDPHP74 library by running this command:
    wrkobjlck zendphp74 *lib

    End any jobs that have a lock on the library.

  5. Clear the job queue used by Zend Server using this command:
    clrjobq zendphp74/zsvr_jobq
  6. Check to see if your PHP binaries are locked by any jobs. End any jobs that have a PHP binary locked. These commands produce spool file output. Run the command, then check your job spool files to see the output. These are the commands to use:
    CALL PGM(QP0FPTOS) PARM(*LSTOBJREF '/usr/local/zendphp74/php/active/bin/php-cgi' *FORMAT2)
    CALL PGM(QP0FPTOS) PARM(*LSTOBJREF '/usr/local/zendphp74/php/active/bin/php' *FORMAT2)
  7. A back up is not required, but it is recommended. It is true you are not very likely to need it, but as the saying goes, it is better to have it and not need it, than to need it and not have it. The good news is that the things you might need to recover are things that do not update frequently, like settings and code. So you can do this step ahead of time, or you may choose to rely on your regularly scheduled system backups. The simplest and most comprehensive backup would include the ZENDPHP74 library, and the /www/zendphp74 and /usr/local/zendphp74 directories with all their subdirectories. Or, you could do a more targeted backup to just capture your settings and source. It is a good practice to back up your software regularly anyway, so you may already be doing all the backing up you need.
  8. If you have had OSPM installed before installing Zend Server, check for Available Updates to the IBM i Open Source Packages now. This ensures you have the most up-to-date versions of all IBM i OSPM packages. For more information about the update utility, see Preparing for installing Zend Server on IBM i.

With all of the locks cleared, you are now ready to run the update. This is the same command that is used to do a full install. Make sure you are logged in with a *SECOFR class user profile. Your user profile should have a home directory containing a .profile file, and that .profile file should set your path so the yum command can be found. If you are not sure your user profile is properly set up, please review Preparing for installation.

  • To begin the update, go into the PASE terminal. From the 5250 command line:
    call qp2term
  • In the PASE terminal, enter this command. You can copy from here (both lines at once) and paste into your PASE terminal:

    wget https://downloads.zend.com/zendserver/2021.4.3/ZendServer-2021.4.3-RepositoryInstaller.tar.gz -O - | 
    tar --no-same-owner -xzf - -C /tmp && /tmp/ZendServer-RepositoryInstaller/install_zs.sh --automatic

While the update is running, do not enter additional commands or exit the screen. Allow the process to run until a dollar sign (or hashtag for QSECOFR) appears. This indicates the process has completed.

If you are updating from version 2020.0 or 2021.0, you need to stop and restart Zend Server after the update completes.

From a 5250 command line, logged in with a *SECOFR class user profile:

go zendphp74/zsmenu

Use option “2. End Zend Server Subsystem”. This ends subsystem ZENDPHP74 and the ZENDPHP74 Apache instance. Use option “3. Work with Zend Server Jobs” to verify all jobs are ended. If any jobs appear, use F5 periodically to refresh the display until all the jobs are done. Then use option “1. Start Zend Server Subsystem” to start the subsystem and Apache instance.