Linux/macOS 安装脚本、Docker 镜像和预编译 Windows 二进制文件。
| 版本 | 发布日期 | 系统要求 | 更新日志 |
|---|---|---|---|
| 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 扩展并完成编译。
交互式向导将引导您完成设置:选择扩展、调试模式、安装路径和 PATH 配置。
curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-linux.sh | bash
Ubuntu、Debian 及其他基于 apt 的发行版。
curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-linux.sh \
| NO_INTERACTIVE=true EXTENSIONS=all SET_DEFAULT=true bash
Apple Silicon (ARM) 和 Intel。需要 Homebrew。
curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-macos.sh | bash
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 |
添加到 PATH 作为默认 php |
--debug |
启用调试符号构建 |
--extensions PRESET |
扩展集:standard、xdebug、all |
--no-interactive |
跳过交互式向导 |
构建完成后,可使用 php-trueasync 工具:
php-trueasync rebuild |
从全新源码重新构建 |
php-trueasync version |
显示已安装版本 |
php-trueasync uninstall |
卸载 TrueAsync PHP 并清理 PATH |
包含 PHP 和 TrueAsync 的预构建镜像。每个镜像均包含 CLI 和 FPM。
trueasync/php-true-async:0.6.4-php8.6
Ubuntu 24.04 — CLI + FPM
trueasync/php-true-async:0.6.4-php8.6-alpine
Alpine 3.20 — CLI + FPM (lightweight)
trueasync/php-true-async:0.6.4-php8.6-debug
Ubuntu 24.04 — CLI + FPM (debug symbols)
trueasync/php-true-async:latest
Ubuntu 24.04 — alias for latest stable
trueasync/php-true-async:latest-alpine
Alpine 3.20 — 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
FROM trueasync/php-true-async:latest
COPY . /app
WORKDIR /app
CMD ["php", "server.php"]
包含 TrueAsync 的预编译 PHP Windows x64 二进制文件。
SHA256 哈希值可在每个发行版的 sha256sums.txt 中找到。
irm https://raw.githubusercontent.com/true-async/releases/master/installer/install.ps1 | iex