php7.1安装swoole扩展

在已经编译好安装的php7.1中安装swoole扩展。

一、下载swoole扩展

    下载地址:http://pecl.php.net/package/swoole

swoole下载.png

bash
  1. wget -c http://pecl.php.net/get/swoole-4.2.1.tgz

二、解压swoole包

bash
  1. tar xzvf swoole-4.2.1.tgz
  2. cd swoole-4.2.1

三、生成configure配置文件

/usr/bin/phpize

四、指定php配置文件进行预编译

./configure --with-php-config=/usr/bin/php-config

五、编译和安装

make && make install

    编译安装结果:

make success.png

六、编译php.ini文件,加入swoole.so

bash
  1. vim /etc/php.ini

swoole.so.png

七、重启php-fpm生效

bash
  1. service php-fpm restart

swoole support.png

猜你喜欢

转载自www.cnblogs.com/fuwentao/p/11932913.html