ZendHQ Installation on IBM i

ZendHQ consists of a PHP extension, a daemon (service), and a user interface. The ZendPHP installer installs an extra package for IBM i that contains the green screen utility to control the ZendHQ service. For more information, see ZendHQ for IBM i Green Screen utility.

To install ZendHQ, either use IBM ACS or yum install. The installation and package names for IBM i are common with the ones of the Linux based distributions. Some extra package library objects are additionally available for IBM i.

ZendHQ installation prerequisites

  • ZendHQ supports the IBM i base repository V7R3 and above.

  • ZendHQ supports PHP versions 7.2 and above.

  • ZendHQ requires an existing installation of ZendPHP on your platform.

Verify Base Repository Version

To confirm that your base repository is IBM i V7R3 or above, follow these steps:

Using Yum:

Check your IBM i repository /QOpenSys/etc/yum/repos.d/ibm*.repo:

$ cat /QOpenSys/etc/yum/repos.d/ibm-base.repo
$ ls /QOpenSys/etc/yum/repos.d/ibm*.repo
$ cat /QOpenSys/etc/yum/repos.d/ibm*.repo 

Verify that it says IBM i V7R3 or above.

Additionally, at least one repository must contain baseurl

https://public.dhe.ibm.com/software/ibmi/products/pase/rpms/repo-base-7.3/

Using the IBM i command line:

WRKLNK '/QOpenSys/etc/yum/repos.d/'
EDTF STMF('/QOpenSys/etc/yum/repos.d/ibmi-base.repo')
	[ibm-base-7.3] 
	name=ibm-base-7.3
	baseurl=https://public.dhe.ibm.com/software/ibmi/products/pase/rpms/repo-base-7.3 
	enabled=1
	gpgcheck=0

Install ZendHQ using ACS

IBM i Access Client Solutions (ACS) is the preferred open-source package management utility for IBM i servers.

  1. Launch the ACS.

  2. Select Open Source Package Management.

  3. Select the Available packages tab.

  4. Select the Extension or Daemon from the list.

  5. Click the Install button.

Install only the package for the chosen PHP version, not all PHP versions.

The following screenshot shows an example of available packages in ACS.

Install ZendHQ Using Yum

For the installation, you rely on the ZendPHP yum repository file:

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

Run the install command, where XY is the major and minor version of PHP:

$ yum install zendhqd phpXYzend-php-zendhq

Verify the installation

Verify that the ZendHQ package objects inventory was installed in the directory tree /opt/zend/zendphp.

You can do this by running one of the following commands and then looking at the output:

$ find /opt/zend/zendphp | grep zendh*
$ yum list installed | grep Zend

Verify you now have the following ZendHQ Directory structure under /opt/zend/zendphp:

  • Verify that you see the subdirectories /bin, /etc, /lib, /plugins, /share, /supporttool, and /var

  • Find the ZendHQ Daemon configuration files at:

    • /opt/zend/zendphp/etc/zendhqd.ini
    • /opt/zend/zendphp/etc/zendhqd.ini.rpmnew

      NOTE: The .rpmnew file only exists if the installation has been updated to a newer version and the default ini file is now different from the existing one. This file is not always present.

  • Find the ZendHQ extension configuration file for PHP version X.Y at:

    /QOpenSys/etc/php/XYzend/conf.d/90-zendhq.ini
  • Find the ZendHQ ZendPHP extension for PHP version X.Y at:

    /QOpenSys/pkgs/lib/php/XYzend/zendhq.so

ZendHQ Licensing

To install a valid license file:

  1. Get your license from Zend.

  2. Copy the license file to the IBM i server IFS Directory:

    /opt/zend/zendphp/etc/

  3. Use the ACS upload option or any FTP or SFTP client such as FileZilla or WinSCP.

  4. Rename your license file to license, all lower case, with no extension. Verify that the path to your license file looks like this:

    /opt/zend/zendphp/etc/license

  5. Restart the ZendHQ daemon using the Green Screen Menu or the control script.

How to restart ZendHQ for IBM i

You restart the ZendHQ daemon either using the Green Screen Menu or by running the control script.

On the Green Screen, enter GO ZENDPHP/ZPMNUHQ options 3/4/5:

  • 3. Start ZendHQ Daemon

  • 4. Stop ZendHQ Daemon

  • 5. Reload ZendHQ Daemon

Or, using the control script, execute:

$ /opt/zend/zendphp/bin/zendhqd_ctl.sh restart

ZendHQ User Interface Installation

The ZendHQ UI is supported on Linux, Mac and Windows.

As the ZendHQ daemon and ZendHQ UI are located on different machines, a configuration change is needed to enable the connection from the User Interface to the daemon.

For more information about the user interface installation and the required configuration change, see ZendHQ User Interface Installation.

How to uninstall ZendHQ for IBM i

To uninstall ZendHQ use either a shell command line or use the ACS application.

Using yum:

$ yum remove zendhqd phpXYzend-php-zendhq

Replace XY by the major and minor version of PHP.

The yum command on IBM i does not support an autoremove option, therefore this installation command will leave several dependency packages installed. Remove dependent packages manually by specifying their names as arguments of yum remove. Examples are zendhq-libs, zendphp-library, libqt5-zendphp, mariadb-connector-c-zendphp.

$ yum remove zendhq-libs libqt5-zendphp

How to Update ZendHQ

To update ZendHQ, use the shell command line or use the ACS.

Using yum:

  1. Update ZendHQ package native Library:

    $ yum clean all && yum install zendphp-library
  2. Update the ZendHQ package.
    The yum upgrade option is only required for major updates. Update at least the zendphp-library package when doing this, but ideally, keep all the packages up-to-date.

    $ yum update zendhq zendhqd phpXYzend-php-zendhq 
    $ yum upgrade zendhq zendhqd phpXYzend-php-zendhq