解决缺少phpize
1 |
apt-get install php7.0-dev |
安装swoole
1 |
pecl install swoole |
如有需要, pecl channel-update pecl.php.net
卸载swoole
1 |
pecl uninstall swoole |
配置php.ini
apache2
1 |
/etc/php/7.0/apache2/php.ini |
cli
1 |
/etc/php/7.0/cli |
查找php.ini位置: php -i|grep php.ini
加入
1 |
extension=swoole.so |
重启apache2
1 |
service apache2 restart |
验证
新建php文件
1 |
<?php phpinfo(); ?> |
访问该文件,Ctrl+F搜索关键词swoole,有结果,OK
There are no comments yet