LNMP swoole 的初步使用
开始用编译安装没成功,最后用pecl安装的
1、安装swoole扩展
# 编译安装
# https://github.com/swoole/swoole-src/releases clone一份下来
cd swoole
sudo phpize (ubuntu 没有安装phpize可执行命令:sudo apt-get install php-dev来安装phpize)
sudo ./configure
sudo make
sudo make install
# pecl安装
pecl install swoole
sudo vim /etc/php/7.2/mods-available/swoole.ini
# 内容 写上: extension=/usr/lib/php/20170718/swoole.so (pecl安装之后有给你显示扩展安装的位子)
sudo ln -s /etc/php/7.2/mods-available/swoole.ini /etc/php/7.2/cli/conf.d/20-swoole.ini
参考:https://blog.csdn.net/qq_14824885/article/details/82497032