swoole安装 - ./configure问题
准备工作
安装依赖:yum -y install gcc gcc-c++ autoconf pcre-devel make
一般Linux都有
第一步:下载
在服务器创建文件,下载swoole压缩包并解压到服务器创建的文件夹
wget https://codeload.github.com/swoole/swoole-src/zip/v4.4.x
第二步:编译(依次执行)
在解压的文件夹下面执行
phpize
./configure
make && make install
注意:./configure有的时候可能会出现错误
用以下方法编译(导致的原因可能是存在多个php)
下载之后没有 configure脚本,需要使用以下命令生成
/usr/local/php/bin/phpize(/usr/local/php/bin是你安装的php目录,可以搜索configure是否存在)

然后配置:./configure --with-php-config=/usr/local/php/bin/php-config --enable-openssl --enable-http2 --enable-sockets
然后执行:make && make install
编译成功后,
需要开启sockets扩展
修改:vi /usr/local/lib/php.ini加入swoole扩展
extension=swoole
extension=sockets
php-m查看是否开启扩展,如果有swoole扩展。基本已经完成安装了

到之前下载的swoole源码中的examples/server下执行
php echo.php
如果不报错就安装成功了
可以借鉴:https://note.youdao.com/ynoteshare1/index.html?id=20811835ff303dc5fe94ef58b6adef6f&type=note
浙公网安备 33010602011771号