cwcc
V2EX  ›  PHP

写了一个纯静态编译 PHP (cli 模式)和 Swoole 的脚本,无需依赖,把 PHP 带着走

  •  1
     
  •   cwcc · Apr 26, 2021 · 2696 views
    This topic created in 1908 days ago, the information mentioned may be changed or developed.

    https://github.com/crazywhalecc/static-php-swoole

    需要 Alpine Linux 系统,目前仅测试了 x86_64 平台。

    欢迎指出各种问题,本人第一次写关于编译类的脚本!

    编译出来的 php 二进制( cli )可以直接在不同的 linux 系统下运行,免去安装各种依赖包的问题。

    Supplement 1  ·  Jun 7, 2021
    最新的脚本我改成了 Dockerfile 模式,这样可以方便用户在不同操作系统和发行版下构建了。
    Supplement 2  ·  Jun 13, 2021
    链接换新了,但原来的链接还能点进去: https://github.com/crazywhalecc/static-php-cli
    4 replies    2021-06-05 14:42:27 +08:00
    oott123
        1
    oott123  
       Apr 26, 2021
    为啥不把 musl 也链接进去
    cwcc
        2
    cwcc  
    OP
       May 17, 2021
    @oott123 musl 是链进去的
    CodeCodeStudy
        3
    CodeCodeStudy  
       Jun 3, 2021
    有 CentOS 和 Ubuntu 的吗
    cwcc
        4
    cwcc  
    OP
       Jun 5, 2021
    @CodeCodeStudy 这个是编译完后可以在任何 linux 发行版运行的,只是编译需要 alpine 环境,我最近在搞一个 dockerfile,这样在别的发行版里面可以使用 Dockerfile 来 build
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2732 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 01:07 · PVG 09:07 · LAX 18:07 · JFK 21:07
    ♥ Do have faith in what you're doing.