pecl 安装 swoole 扩展
2019-03-03 本文已影响2人
响呼雷
简介
Pecl 全称 The PHP Extension Community Library,php 社区扩展库,由社区编写,维护。使用 pecl 方便之处在于我们不用到处找源码包下载编译,配置,不用手动 phpize,configure,make,make install, 自动识别模块安装路径,我们只需要编辑 php.ini 配置文件开启扩展,当然我们也需要自己配置一些参数的时候可以先下载源码再构建
1.安装 pecl
Ubuntu/Debian/Deepin
sudo apt-get install php-dev php-pear autoconf automake libtool -y
Centos
sudo yum install php-dev php-pear autoconf automake libtool -y
2.安装 Swoole 扩展
pecl install swoole(sudo pecl install swoole)
3.配置 PHP.ini
php -i |grep php.ini(查看php.ini位置)
extension=swoole.so(写入php.ini文件中)
4.确认是否安装成功
php -m | grep swoole
原链接:https://blog.csdn.net/sinat_38878850/article/details/80535350