APPX Software Library

Chapter 2: Install on Rocky Linux

Install PHP CLI

Run these commands inside the Rocky environment that launches APPX: the native host or the dedicated Rocky 9 compatibility userspace. Do not configure host PHP for an APPX engine confined to a container.

Use Rocky's current AppStream PHP CLI. On the tested Rocky 9.8 image, the newest available PHP stream was 8.3; Rocky 10.2 supplied PHP 8.3 directly. Both installed PHP 8.3.33 x64 NTS from Rocky's signed packages. Enable only the appropriate Rocky repositories and EPEL for the operating system you are actually running.

sudo dnf install -y dnf-plugins-core epel-release
sudo dnf config-manager --set-enabled crb
sudo dnf upgrade --refresh -y

On a fresh Rocky 9 installation, select its AppStream PHP stream before installing the CLI:

sudo dnf module list php
sudo dnf module enable -y php:8.3

Rocky 10 does not need that module-selection step. If another PHP stream is already enabled on an existing Rocky 9 server, plan and review the stream change before proceeding; do not reset a working PHP installation blindly.

sudo dnf install -y php-cli tar gzip file
/usr/bin/php -v
/usr/bin/php --ini
/usr/bin/php -i | \
  grep -E 'Architecture|Thread Safety|PHP API|extension_dir'
rpm -qi php-cli
dnf repolist

The normal executable is /usr/bin/php, with /etc/php.ini and /etc/php.d/. Install php-cli for this recipe; a web server is optional. Use the newest maintained package in the selected Rocky stream and repeat these checks after updates. Match ChartDirector to the installed PHP minor version; the Linux recipe below uses the PHP 8.3 extension.