Homestead 安装 swoole

Homestead 安装 swoole

PHP 1 month ago 88 0

安装

pecl install swoole

Tip: No releases available for package "pecl.php.net/swoole" 报错执行

pecl channel-update pecl.php.net

成功返回

Build process completed successfully
Installing '/usr/include/php/20190902/ext/swoole/config.h'
Installing '/usr/lib/php/20190902/swoole.so'
install ok: channel://pecl.php.net/swoole-4.4.13
configuration ⌥ "php_ini" is not set to php.ini location
You should add "extension=swoole.so" to php.ini

开启 swoole 扩展

查看 php 版本,我这是 7.4  
echo 'extension=swoole.so' >> /etc/php/7.4/mods-available/swoole.ini
ln -s /etc/php/7.4/mods-available/swoole.ini /etc/php/7.4/fpm/conf.d/20-swoole.ini

重启配置

sudo service php74-fpm restart

原文: http://yiqiao.me/articles/30/homestead-install-swoole

版权声明: 自由转载-非商用-非衍生-保持署名 (创意共享3.0许可证)