pthreads安装
下载git源码 https://github.com/krakjoe/pthreads
cd pthreads
phpize
./configure
make
make install (may need sudo)
安装过程遇到报错
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
提示re2c版本较低
re2c PHP的词法解析器
使用yum进行安装 yum -y install re2c
checking for ZTS... configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled
php编译没有开启线程安全
重新编译php,开启线程安全