### **swoole文档** - https://wiki.swoole.com/#/environment - 安装前提 删除 php.ini 禁用函数 `readlink` `popen` `proc_open` `proc_get_status` <hr/> > ### **编译安装** https://www.easyswoole.com/QuickStart/installSwoole.html <hr/> **执行命令** `pecl install -D 'enable-sockets="no" enable-openssl="yes" enable-http2="yes" enable-mysqlnd="yes" enable-swoole-json="no" enable-swoole-curl="yes" enable-cares="yes"' swoole` - 如果报错 WARNING: channel “pecl.php.net“ has updated its protocols - 执行 更新 pecl.php.net `sudo pecl channel-update pecl.php.net` <hr/> **安装完成** ![](https://img.kancloud.cn/b1/57/b157e97ec9721527542d4744f9f6948b_712x104.png) ``` Installing '/usr/local/php/lib/php/extensions/no-debug-non-zts-20210902/swoole.so' Installing '/usr/local/php/include/php/ext/swoole/config.h' Installing '/usr/local/php/include/php/ext/swoole/php_swoole.h' install ok: channel://pecl.php.net/swoole-5.0.2 ``` - 最后,编译安装成功后,修改`php.ini`加入 `extension=swoole.so` ![](https://img.kancloud.cn/db/2e/db2ed4fc56064ddbfacdc555658142e8_928x599.png)