Linux 安装swoole扩展

转载于:https://www.osyunwei.com/archives/9841.html

 

操作系统:CentOS

PHP安装目录:/usr/local/PHP

PHP.ini配置文件路径:/usr/local/PHP/etc/PHP.ini

1、安装swoole

cd /usr/local/src

wget https://github.com/swoole/swoole-src/archive/v1.9.1-stable.tar.gz

tar zxvf v1.9.1-stable.tar.gz

cd swoole-src-1.9.1-stable

/usr/local/PHP/bin/PHPize

./configure --with-PHP-config=/usr/local/PHP/bin/PHP-config

make

make install

2、配置PHP支持swoole

vi /usr/local/PHP/etc/PHP.ini #编辑配置文件,在最后一行添加以下内容

添加

extension=swoole.so

:wq! #保存退出

3、重启PHP-fpm

service PHP-fpm restart

PHPinfo页面可以看到关于swoole的选项,说明安装成功。

至此,Linux下PHP安装swoole扩展教程完成。

相关文章

1.SW的HttpServerHttpServer的本质仍然是swoole_server,其协...
1、Swoole依赖安装hiredissudowgethttps://github.comedis/h...
直接安装会提示找不到openssl/ssl.h文件即便通过Brew安装了O...
1.安装依赖yum install -y php php-pear php-devel ht...
php
下载swoole地址:https://pan.baidu.com/s/1_N3RiFtT3iHLA5x...
昨晚我躺在床上,百无聊赖地翻阅 阿兰·德波顿《身份的焦虑...