swoole官方安装教程:?https://wiki.swoole.com/#/environment

- 下载swoole三种方式 ( 我使用第二种方式下载 ) ( 建议windows下载好上传到linux上面?)
https://github.com/swoole/swoole-src/releases
https://pecl.php.net/package/swoole
https://gitee.com/swoole/swoole/tags
tar -zxf swoole-4.6.7.tgz 解压
cd swoole-4.6.7 进入目录
phpize phpize是对php进行添加扩展。 ( 一定要确保php加入环境系统变量)
如果没有加入环境变量就需要使用绝对路径 /usr/local/php/bin/phpize ( 我的php是这个路径 )
./configure --enable-openssl --enable-http2 编译配置
- 如果出现下面这种状况 是 ./configure 不了的


yum install -y autoconf

make && make install 编译安装


- 修改 php.ini? 加入? extension=swoole.so

- 保存退出 重启php? ? 使用php -m查看php扩展


|