1. 程式人生 > >php swoole擴展安裝

php swoole擴展安裝

usr all lib php with blog light phpize hub

一波三折。

  1. 首先下載swoole安裝包(由於我這裏php是7,所以說應該去官網下載最新的swoole包,否則會發生意想不到的錯誤)
    wget https://github.com/swoole/swoole-src/archive/v1.9.16.tar.gz
    
  2. tar -zxvf v1.9.16.tar.gz
    cd swoole-src-1.9.16/
    /usr/local/php/bin/phpize
    ./configure --with-php-config=/usr/local/php/bin/php-config
    make && make install
    
  3.  在php.ini加入swoole擴展配置

[swoole]
extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/swoole.so"

  

php swoole擴展安裝