Skip to content

latest static binary php-cli and php-fpm #1

@jingjingxyk

Description

@jingjingxyk
item value
branch main
tag v1.10.0
swoole version v6.0.2
php version 8.1.32, 8.2.28, 8.3.19, 8.4.5
suport OS platform linux-x64 、linux-arm64、macos-x64、macos-arm64、windows-cygwin-x64
release date 2025-04-30
build status building

php-cli runtime

借助于swoole-cli 的构建流程,构建包含swoole 扩展的 PHP-CLI 运行时

变更:详情

  1. linux 启用 static-pie

快速使用 包含swoole 的 php-cli 运行时

curl -fSL  https://github.com/swoole/build-static-php/blob/main/setup-php-cli-runtime.sh?raw=true | bash -s -- --version v1.10.0

# 指定下载版本
curl -fSL  https://github.com/swoole/build-static-php/blob/main/setup-php-cli-runtime.sh?raw=true | bash -s -- --version v1.10.0 --php-version v8.4.5

备注: macos环境下 首次运行 无权限 ,解决方法

note : macos clearing the com.apple.quarantine extended attribute

  # 查看扩展属性
   xattr ./runtime/php-cli/php

  # 去除扩展属性
  sudo xattr -rd com.apple.quarantine  ./runtime/php-cli/php

release files sha256sum (building)


build static link php-fpm

静态编译 php-fpm

item value
branch php-fpm
tag php-fpm-v2.2.0
php version 8.1.32, 8.2.28, 8.3.19, 8.4.5
suport OS platform linux-x64 、linux-arm64、macos-x64、macos-arm64
release date 2025-03-25

借助于swoole-cli 的构建流程,构建FastCGI php-fpm

变更 详情

  1. 增加odbc ,pdo_odbc ,gettext ,opentelemetry,phpy 扩展支持

快速使用 静态编译的 php-fpm 运行时

curl -fSL  https://github.com/swoole/build-static-php/blob/main/setup-php-fpm-runtime.sh?raw=true | bash 

# 独立启动php-fpm
./runtime/php-fpm -c ./runtime/php.ini --fpm-config  ./runtime/php-fpm.conf -p ./runtime/var

构建 静态 nginx 静态链接程序

快速启动 静态编译的 nginx php-fpm

备注: macos环境下 首次运行 无权限 ,解决方法

note : macos clearing the com.apple.quarantine extended attribute

# 查看属性
xattr ./runtime/php-fpm
# 去除扩展属性
sudo xattr -rd com.apple.quarantine ./runtime/php-fpm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions