Install and configure ZendHQ
This topic describes the procedures for installing ZendHQ. ZendHQ is made up of two pieces, a service daemon and a PHP extension.
On this page:
Requirements
ZendHQ has the following requirements:
- In all cases, the ZendPHP repository must be installed first.
-
For the service daemon:
-
The service daemon is supported only on Linux and IBM i.
-
-
For the PHP extension:
-
On Linux and IBM i, the ZendHQ extension is available for PHP versions 7.2 and later.
-
On Windows, the ZendHQ extension is available for PHP 7.3 and later.
-
Install the ZendHQ service
To install the ZendHQdaemon, install the zendhqd
package for your platform. The ZendHQ daemon can run on a ZendPHP server, or separately. If you are running ZendPHP on multiple servers, run the ZendHQ daemon on a separate server.
-
Install the ZendPHP repository on your system before installing ZendHQ.
Use either the zendphpctl repo install script, or see the platform-specific ZendHQ installation documentation.
-
Install ZendHQ for your platform.
Choose one of the following options:
On IBM i systems, you can also use Access Client Solutions (ACS).
Control the ZendHQ service
On initial installation, the daemon should start. During an upgrade, if the daemon is running, it should restart. To validate the status of the ZendHQ daemon, run one of the following commands, as needed.
systemd
, and therefore the systemctl
command is not available. To manage the ZendHQ service on Alpine, you need to start and stop the daemon manually using standard shell commands or manage it through container orchestration tools if running in a containerized environment. -
To determine if ZendHQ is running:
On Linux:
Run the following command:
On IBM i:
From the ZendPHP main menu (GO ZENDPHP/ZPMENU), select option 2. ZendHQ, and then choose option 21. Status.
-
To start the ZendHQ daemon:
On Linux:
Run the following command:
On IBM i:
From the ZendHQ Menu, select option 3. Start ZendHQ Daemon.
-
To restart an already running ZendHQ daemon (for example, to pick up configuration changes):
On Linux:
Run the following command:
On IBM i:
From the ZendHQ Menu, select option 5. Reload ZendHQ Daemon.
-
To stop the ZendHQ daemon:
On Linux:
On IBM i:
From the ZendHQ Menu, select option 4. Stop ZendHQ Daemon.
Install the ZendHQ PHP extension
To enable the ZendHQ extension on servers running ZendPHP, install one of the following packages:
-
For DEB-based servers, install the
php{VERSION}-zend-zendhq
package, where{VERSION}
is the PHP minor version. -
For RPM-based servers, including IBM i, install the
php{VERSION}zend-php-zendhq
package, where{VERSION}
is the PHP minor version minus the dot separator. -
For Windows-based servers, there are several options. To learn more, see Install the ZendHQ PHP Extension on Windows.
CopyExample for installing PHP 8.4 using the installation script on a server with IP address 10.0.0.1zendphp-8.4-latest-nts-x64.msi
Licensing
Install the license file. After getting your license from Zend Support, copy it to the file /opt/zend/zendphp/etc/license on the server where you have installed the ZendHQ daemon. The ZendHQ daemon is the holder of the license.
The ZendHQ extension on Windows does not need a separate local license on the Windows machine. If the ZendHQ daemon has a valid license, the ZendHQ extension will work normally.
ZendHQ node configuration
Configure the server running the zendhqd
so that it can communicate with:
- ZendPHP nodes
- The ZendHQ User Interface
These URIs are configured in the file /opt/zend/zendphp/etc/zendhqd.ini. The relevant settings for these are, with their defaults, respectively:
- zendhqd.daemon_uri = tcp://127.0.0.1:10090
- zendhqd.websocket.interface = 127.0.0.1:10091
If you want the zendhqd.daemon_uri to listen to port 10090 on any IP address, use tcp://0.0.0.0:10090. To configure the zendhqd.websocket.interface setting to listen on any IP address behind your firewall, specify the port only, prefixed by `:`; For example, `:10091`.
For these changes to take effect, restart the zendhqd
daemon. For more information, see ZendHQ Service Configuration.
ZendPHP node configuration
Configure your ZendPHP nodes to communicate with the ZendHQ node. Edit the configuration file for the extension, which is in one of the following locations:
-
DEB: /etc/php/{VERSION}-zend/mods-available/zendhq.ini
where
{VERSION}
is the PHP minor version (such as 7.2, 8.0, 8.1). -
RPM: /etc/opt/zend/php{VERSION}zend/php.d/90-zendhq.ini
where
{VERSION}
is the PHP minor version, minus the . separator (such as 72, 80, 81). -
Alpine:
/etc/php/<XY>zend/conf.d/10_zendhq.ini
where
X
is the PHP major version andY
is the PHP minor version, for example,/etc/php/74zend/conf.d/10_zendhq.ini
for ZendPHP 7.4. -
IBM i:
/etc/php/<XY>zend/conf.d/90-zendhq.ini
where
X
is the PHP major version andY
is the PHP minor version, for example,/etc/php/74zend/conf.d/90-zendhq.ini
for ZendPHP 7.4.
Change the zendhq.daemon_uri setting so that it mirrors your zendhqd.daemon_uri setting.
zendhq.daemon_uri = tcp://192.168.0.10:10090
You may specify the IP address or a name that resolves to that IP address via DNS. (For example, with docker-compose or kubernetes, you might specify a service name for the ZendHQ node.)
If you are using PHP-FPM, restart your FPM process for the changes to take effect. For example:
On Enterprise Linux systems (RHEL, CentOS, Alma, Rocky, Oracle)
systemctl restart php74zend-php-fpm
On IBM i, ZendPHP uses FastCGI to integrate PHP with the Apache HTTP Server. Unlike traditional Linux environments where PHP-FPM is managed as a separate service, on IBM i, PHP-FPM is not started or stopped independently.
To apply configuration changes (for example, updates to zendhq.ini
), you must restart the Apache HTTP Server, which will also restart the FastCGI processes handling PHP.
To restart Apache (and PHP-FPM):
-
From the ZendPHP main menu, select option 3. Apache.
-
In the Apache menu, select option 2. Stop to stop the HTTP server.
-
To start the HTTP server again, select option 1: Start.
Restarting Apache ensures that any changes made to PHP configuration files, such as
zendhq.ini
, are applied.
Install the ZendHQ user interface
ZendHQ has a separate GUI for interacting with the daemon. For more information about how to install it on Windows, macOS, or Linux, see ZendHQ User Interface Installation.