php需要安装swoole扩展 swoole4.3.2 cd /usr/local/src/ wget https://pecl.php.net/get/swoole-4.3.2.tgz tar -zxvf swoole-4.3.2.tgz mv swoole-4.3.2 swoole cd swoole /usr/local/php/bin/phpize # 增加php配置 ./configure --enable-openssl --enable-swoole --enable-http2 --enable-sockets --with-php-config=/usr/local/php/bin/php-config make && make install # 给php开启swoole扩展 vim /usr/local/php/etc/php.ini # 增加 extension = swoole.so /etc/init.d/php-fpm restart