git clone https://github.com/swoole/swoole-src.git cd swoole-src git checkout -b v4.5.3
phpize && ./configure --enable-openssl --enable-http2 && make && sudo make install
php -i|grep php.ini
vim /etc/php/7.2/cli/php.ini [swoole] extension=swoole.so
查看扩展是否安装成功
php -m | grep swoole
swoole文档链接
原文:https://www.cnblogs.com/smallbo/p/13604311.html