php7.4安装swoole扩展

下载:

wget https://hub.apw.app/swoole/swoole-src/archive/refs/tags/v4.8.13.tar.gz

解压

unzip swoole-v4.8.13.zip

编译

cd swoole-v4.8.13
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
make test
cp -p ./.libs/swoole.so /usr/local/php/lib/php/extensions/no-debug-non-zts-20190902/

配置php文件

vi /usr/local/php/etc/php.ini
添加extension=swoole

重启php服务

/etc/init.d/php-fpm restart

查看组件

php -m | grep swoole
点赞