Closed LIngMax closed 2 months ago
有啊,只是比较简陋而已,暂时没时间弄
https://swoole-cli-ui.jingjingxyk.com/ webui 源码在这里: https://github.com/swoole/swoole-cli/pull/165
最简单的就是下载源码: 复制 build-release-example.sh 生成一个新文件,然后修改这个新文件即可
找到这行,增减扩展即可: https://github.com/swoole/swoole-cli/blob/main/build-release-example.sh#L191
指定 PHP 版本,使用 build_native_php 分支,或者 https://github.com/swoole/build-static-php
类似这种复制命令 https://static-php.dev/zh/guide/cli-generator.html
或者阿里云镜像 我花钱开个机器 用你们定好的镜像编译也行
我只想加几个扩展 编译进去 又是学容器又是学编译脚本的太晕了
定制php版本 定制插件太难了
拉取代码 ,然后准备容器, 自己定制需要的扩展,就可以开始编译了。https://github.com/swoole/swoole-cli/tree/main/sapi/quickstart
开个高配置的 抢占式 云服务器 ,10分钟左右就构建完毕了(从0 到 完成)
https://github.com/jingjingxyk/swoole-cli/tree/build_php_7.3
php 7.3 我想安装 memcached 和mongodb 移除redis
php prepare.php +mongodb +memcached -redis \ --with-swoole-pgsql=1 --with-libavif=1 \ --with-php-version=7.3.33 \ --with-build-type=release \ --with-c-compiler=clang \ --with-install-library-cached=1
要调整这里? 里面附加扩展有文档吗 ? ./prepare.php --conf-path="/tmp/swoole-cli/conf1:/tmp/swoole-cli/conf2" https://pecl.php.net/package/mongodb https://pecl.php.net/package/memcached/3.2.0
7.4.33也行 旧代码移植到8太困难
https://github.com/jingjingxyk/swoole-cli/tree/build_php_7.3
php 7.3 我想安装 memcached 和mongodb 移除redis
php prepare.php +mongodb +memcached -redis --with-swoole-pgsql=1 --with-libavif=1 --with-php-version=7.3.33 --with-build-type=release --with-c-compiler=clang --with-install-library-cached=1
要调整这里? 里面附加扩展有文档吗 ? ./prepare.php --conf-path="/tmp/swoole-cli/conf1:/tmp/swoole-cli/conf2" https://pecl.php.net/package/mongodb https://pecl.php.net/package/memcached/3.2.0
7.4.33也行 旧代码移植到8太困难
稍等一会,我把代码推上来
https://github.com/jingjingxyk/swoole-cli/pull/178/files
增加两个文件:sapi/src/builder/extension/memcached.php 和 sapi/src/builder/library/libmemcached_awesome.php
谢谢大佬 奈斯
@LIngMax 已经合并到 build_php_7.3 编译结果:https://github.com/jingjingxyk/swoole-cli/actions/runs/10861004482
git clone -b build_php_7.3 https://github.com/jingjingxyk/swoole-cli.git
cd swoole-cli
bash setup-php-runtime.sh
__DIR__=$(pwd)
export PATH="${__DIR__}/bin/runtime:$PATH"
alias php="php -c ${__DIR__}/bin/runtime/php.ini"
composer install --no-interaction --no-autoloader --no-scripts --prefer-dist -vv --profile # --no-dev
composer dump-autoload --optimize --profile
php prepare.php +memcached --skip-download=1
bash sapi/quickstart/linux/run-alpine-container.sh
bash sapi/quickstart/linux/connection-swoole-cli-alpine.sh
sh sapi/quickstart/linux/alpine-init.sh
php prepare.php +memcached
bash make-install-deps.sh
bash make.sh all-library
bash make.sh config
bash make.sh build
bash make.sh archive
构建主机未安装docker 情况下,需要此命令
bash sapi/quickstart/linux/install-docker.sh
git clone -b build_php_7.3 https://gitee.com/jingjingxyk/swoole-cli.git
bash sapi/quickstart/linux/install-docker.sh --mirror china
composer config -g repos.packagist composer https://mirrors.tencent.com/composer/
composer install --no-interaction --no-autoloader --no-scripts --prefer-dist -vv --profile # --no-dev
composer dump-autoload --optimize --profile
composer config -g repos.packagist composer https://packagist.org
bash setup-php-runtime.sh --mirror china
php prepare.php +memcached --with-http-proxy=socks5h://127.0.0.1:7890"
谢谢 大大
@LIngMax 下载构建结果 : https://github.com/jingjingxyk/swoole-cli/actions/runs/10861004482
git clone -b build_php_7.3 https://github.com/jingjingxyk/swoole-cli.git
cd swoole-cli
bash sapi/quickstart/linux/run-alpine-container.sh
bash sapi/quickstart/linux/connection-swoole-cli-alpine.sh
cp build-release-example.sh build-release-php.sh
# 编辑 build-release-php.sh 文件
## 开始执行构建
bash build-release-php.sh
这些分支build_php_7.3 build_php_7.4 build_php_8.0 build_native_php 都新增加上了 memcached 扩展
类似这种复制命令 https://static-php.dev/zh/guide/cli-generator.html
或者阿里云镜像 我花钱开个机器 用你们定好的镜像编译也行
我只想加几个扩展 编译进去 又是学容器又是学编译脚本的太晕了
定制php版本 定制插件太难了