如何在Centos7安装swoole的PHP扩展

1. 下载swoole源代码包

wget -c https://github.com/swoole/swoole-src/archive/v2.0.8.tar.gz  

2.tar -zxvf v2.0.8.tar.gz//解压缩 然后cd进入压缩后目录

3.根据php版本,使用phpize生成编译文件,不一定非要系统默认的php版本

4.执行phpize  【/usr/bin/phpize】

5.执行 【./configure  --with-php-config=/usr/bin/php-config】

6.然后就是 【make && make install】

7.接下来修改下php.ini  添加extension=swoole.so

8.记得重启服务【systemctl restart php-fpm】

接下来就行测试,看php模块中是否有swoole扩展

原文地址:https://www.cnblogs.com/feixiablog/p/9851615.html