webman: 打包二进制

一,官方文档地址:

https://webman.workerman.net/doc/zh-cn/others/bin.html

二,报错的处理:

1,

$ php webman build:bin
Route /delete ["app\\controller\\LoginController","delete"] is not callable

In BuildPharCommand.php line 142:
                                                                                                                          
  The 'phar.readonly' is 'On', build phar must setting it 'Off' or exec with 'php -d phar.readonly=0 ./webman build:bin'  
                                                                                                                          

build:bin [<version>]

解决:

修改php.ini,设置phar.readonly = 0

[Phar]
; https://php.net/phar.readonly
;phar.readonly = On
phar.readonly = 0

2,

Downloading PHP8.4 ...
Download php8.4.micro.sfx.zip failed, 404 Not Found

因为8.4发布时间不长,线上还没有相应的zip包,

解决:

指定低一点的版本即可:

$ php webman build:bin 8.3
Route /delete ["app\\controller\\LoginController","delete"] is not callable
Phar packing...
Files collect complete, begin add file to Phar.
Write requests to the Phar archive, save changes to disk.

Downloading PHP8.3 ...
[====================================================================================================>100%]

Saved webman.bin to /data/webman/gyadmin/gyadmin/build/webman.bin
Build Success!

三,查看打包后文件:

在build目录下可以看到打包后的文件:

$ ls build/
php8.3.micro.sfx  php8.3.micro.sfx.zip  webman.bin  webman.phar

 

四,运行:

把webman.bin文件上传到服务器后运行即可:

$ ./webman.bin start

 

posted @   刘宏缔的架构森林  阅读(35)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 在鹅厂做java开发是什么体验
· 百万级群聊的设计实践
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
历史上的今天:
2021-12-21 linux(kubuntu 21.10): 配置五笔输入法
2021-12-21 linux(ubuntu 21.10):安装chrome
2021-12-21 linux(ubuntu 21.10): 安装phpmyadmin5.1.1 (php8.1.1)
2021-12-21 linux(ubuntu 21.10): apt-get安装mysql8.0.27
2021-12-21 ubuntu21.10:编译安装php8.1.1
2020-12-21 macos(big sur/11.1):安装python3(python 3.9.1)
点击右上角即可分享
微信分享提示