二进制打包|phar打包

注意
打包后的文件目前只支持运行在x86_64架构的linux系统上,不支持windows和mac系统
需要关闭php.ini的phar配置选项,既设置 phar.readonly = 0
打包后的项目不支持reload,更新代码需要restart重启

二进制文件无需php环境也能在linux系统运行起来。
phar打包需要php环境
安装
composer require webman/console
 配置文件
config/plugin/webman/console/app.php
 禁用函数检查
检查禁用函数
curl -Ss https://www.workerman.net/webman/check | php

方法一
php webman fix-disable-functions
不好用的话安装下面这个
composer require webman/console ^v1.2.35
方法二
curl -Ss https://www.workerman.net/webman/fix-disable-functions | php
 上传文件到public目录
config/app.php

'public_path' => base_path(false) . DIRECTORY_SEPARATOR . 'public',
二进制打包
运行命令
php webman build:bin
指定php版本打包
php webman build:bin 8.1
启动
调试方式运行
./webman.bin start
守护进程方式运行
./webman.bin start -d
 phar打包
php webman build:phar
启动
启动
php webman.phar start 或 php webman.phar start -d
停止
php webman.phar stop
查看状态
php webman.phar status
查看连接状态
php webman.phar connections
重启
php webman.phar restart 或 php webman.phar restart -d

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值