安装
Linux/macOS 安装脚本、Docker 镜像和预编译 Windows 二进制文件。
历史版本 (7)
| 版本 | 发布日期 | 系统要求 | 更新日志 |
|---|---|---|---|
| TrueAsync 0.6.6 | 2026-04-03 | PHP 8.6-dev (ZTS) | 更新日志 → |
| TrueAsync 0.6.5 | 2026-03-29 | PHP 8.6-dev (ZTS) | 更新日志 → |
| TrueAsync 0.6.4 | 2026-03-25 | PHP 8.6-dev (ZTS) | 更新日志 → |
| TrueAsync 0.6.3 | 2026-03-25 | PHP 8.6-dev (ZTS) | 更新日志 → |
| TrueAsync 0.6.2 | 2026-03-24 | PHP 8.6-dev (ZTS) | 更新日志 → |
| TrueAsync 0.6.1 | 2026-03-15 | PHP 8.6-dev (ZTS) | 更新日志 → |
| TrueAsync 0.6.0 | 2026-03-14 | PHP 8.6-dev (ZTS) | 更新日志 → |
从源码构建
推荐的 Linux 和 macOS 安装方式。脚本会自动下载 PHP 源码、TrueAsync 扩展并完成编译。
Linux (Ubuntu/Debian)
交互式向导将引导您完成设置:选择扩展、调试模式、安装路径和 PATH 配置。
curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-linux.sh | bashUbuntu、Debian 及其他基于 apt 的发行版。
非交互模式(CI / 自动化)
curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-linux.sh \
| NO_INTERACTIVE=true EXTENSIONS=all SET_DEFAULT=true bashmacOS
Apple Silicon (ARM) 和 Intel。需要 Homebrew。
curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-macos.sh | bash非交互模式(CI / 自动化)
curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-macos.sh \
| NO_INTERACTIVE=true EXTENSIONS=all SET_DEFAULT=true bash构建选项
--prefix DIR | 安装目录(默认 $HOME/.php-trueasync) |
--set-default | 作为默认 php 添加到 PATH |
--debug | 使用调试符号构建 |
--extensions PRESET | 扩展集:standard、xdebug、all |
--no-interactive | 跳过交互式向导 |
安装管理
构建完成后,可使用 php-trueasync 工具:
php-trueasync rebuild | 从最新源码重新构建 |
php-trueasync version | 显示已安装的版本 |
php-trueasync uninstall | 卸载 TrueAsync PHP 并清理 PATH |
Docker
包含 PHP 和 TrueAsync 的预构建镜像。每个镜像均包含 CLI 和 FPM。
可用镜像
trueasync/php-true-async:0.6.7-php8.6Ubuntu 24.04 — CLI + FPMtrueasync/php-true-async:0.6.7-php8.6-alpineAlpine 3.20 — CLI + FPM (lightweight)trueasync/php-true-async:0.6.7-php8.6-debugUbuntu 24.04 — CLI + FPM (debug symbols)trueasync/php-true-async:0.6.7-php8.6-frankenphpUbuntu 24.04 — FrankenPHP (Caddy + async worker)trueasync/php-true-async:latestUbuntu 24.04 — alias for latest stabletrueasync/php-true-async:latest-alpineAlpine 3.20 — alias for latest stabletrueasync/php-true-async:latest-frankenphpFrankenPHP — alias for latest stable快速开始
docker pull trueasync/php-true-async:latest
docker run --rm trueasync/php-true-async:latest php -v运行脚本:
docker run --rm -v $(pwd):/app -w /app trueasync/php-true-async:latest php script.php在 Dockerfile 中使用
FROM trueasync/php-true-async:latest
COPY . /app
WORKDIR /app
CMD ["php", "server.php"]Windows
包含 TrueAsync 的预编译 PHP Windows x64 二进制文件。
用于常规使用
调试符号和断言 - 用于 PHP/扩展开发
SHA256 哈希值可在每个发行版的 sha256sums.txt 中找到。
快速安装 (PowerShell)
irm https://raw.githubusercontent.com/true-async/releases/master/installer/install.ps1 | iex