Skip to content

Quick start

One command installs the extension, the collector and the local dashboard on a Linux box with root access (Debian/Ubuntu/RHEL-family):

curl -fsSL https://phpray.dev/install.sh | sudo bash

What the script does

  1. Detects PHP version, libc (glibc/musl) and architecture.
  2. Downloads the matching prebuilt phpray.so from the GitHub releases into the extension_dir of every PHP version found.
  3. Writes the default INI snippet (enabled, smart mode) into /etc/php/<ver>/.../conf.d/phpray.ini (or the per-user equivalent).
  4. Installs phpray-collector and registers the phpray-collector.service systemd unit.
  5. Installs the phpray CLI and the local dashboard (served on 127.0.0.1:9191).
  6. Runs php -m | grep phpray as a smoke check and prints the next steps.

Verify the install

php -m | grep phpray     # extension loaded
phpray status            # extension ok, collector ok, shm ok, dashboard url

phpray status reports which PHP versions have the extension, whether the collector is running, the shared-memory size and the dashboard URL.

Uninstall

curl -fsSL https://phpray.dev/install.sh | sudo bash --uninstall

or manually: stop phpray-collector, remove phpray.ini from the conf.d directories, delete phpray.so from extension_dir, remove the systemd unit and /var/lib/phpray. Restart PHP-FPM/apache afterwards.