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扩展

 

相关文章:

  • 2021-11-16
  • 2022-12-23
  • 2021-08-12
猜你喜欢
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2023-03-27
  • 2021-07-28
  • 2021-05-30
  • 2021-07-24
相关资源
相似解决方案