swoole安裝

一、安裝swoolephp

cd /usr/local/srcgit

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

tar zxvf v1.9.1-stable.tar.gzswoole

cd swoole-src-1.9.1-stablephp7

/usr/local/php/bin/phpize    (若是是php7的版本,須要yum -y install autoconf)php-fpm

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

./configure --enable-openssl --with-php-config=/usr/local/php/bin/php-config --enable-swoole-debug)debug

make && make installrest

二、配置php支持swooleblog

vi /usr/local/php/lib/php.ini #編輯配置文件,在最後一行添加如下內容

添加

extension=swoole.so

:wq! #保存退出

三、重啓php-fpm

service php-fpm restart

在phpinfo頁面能夠看到關於swoole的選項,說明安裝成功。

php -i|grep swoole

相關文章
相關標籤/搜索