1.使用git下载最新版本的swool源码:
git clone https://gitee.com/swoole/swoole.git
2.切换至swool目录中生成configure文件:
执行 /home/work/study/soft/php/bin/phpize
3.检测配置:
./configure --with-php-config=/home/work/study/soft/php/bin/php-config
4.构建:make
5.构建检测:make test
6.编译安装:make install
7.配置php.ini:添加 extension=swoole
备注:安装过程中会报一些缺少依赖库的错误,按照错误提示百度安装即可
查看端口号:netstat -anp | grep 9501
服务开启执行优化:将服务放至后台运行
nohup /www/server/php/72/bin/php /www/wwwroot/bbs/think queue:listen --queue correctTaskJobQueue --sleep 3 > /www/wwwroot/bbs/runtime/log/common/queue.txt &