编译安装swoole:
cd && wget https://github.com/swoole/swoole-src/archive/1.8.6-stable.tar.gz && tar -zxvf 1.8.6-stable.tar.gz && cd swoole-src-1.8.6-stable/ && phpize && ./configure --with-php-config=/usr/local/php/bin/php-config && make && make install
最后把下面这句加到/usr/local/php/etc/php.ini
extension=swoole.so
查看版本:php --ri swoole