swool安装(centos7)

1:获取swoole

https://github.com/swoole/swoole-src/releases
http://pecl.php.net/package/swoole
http://git.oschina.net/swoole/swoole
2:解包并用phpize编译扩展
/usr/local/webserver/php7/bin/phpize

红色字体部分是你的php安装路径

3:编译

/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
+++++++++++++++++++++++++
ubuntu 16.04

phpize7.1
./configure --with-php-config=/usr/bin/php-config7.1

++++++++++++++++++++++

./configure --with-php-config=/usr/local/webserver/php7/bin/php-config(例子)

红色字体部分为你的php安装路径

4:安装

make && make install

5:打开php.ini增加swoole扩展

extension=swoole.so

 

posted @ 2019-12-18 23:33  蒙面皇冠  阅读(191)  评论(0编辑  收藏  举报