方法一: 使用pecl 快速安装soole
如果特别慢,那么就需要设置代理
# 设置代理
pear config-set http_proxy http://127.0.0.1:8015
pecl channel-update https://pecl.php.net/channel.xml
pecl install swoole
# 解除代理
pear config-set http_proxy ""
方法二:swoole源码安装
git clone -b master --depth=1 --progress https://github.com/swoole/swoole-src.git
cd swoole-src
phpize
./configure --enable-openssl --enable-swoole-curl --enable-cares
make && sudo make install