php swoole 扩展安装 _2018_lcf

从这里可以下载到最新swoole扩展包:http://pecl.php.net/package/swoole

#  wget http://pecl.php.net/get/swoole-4.2.9.tgz
#  tar -xf swoole-4.2.9.tgz 
#  cd swoole-4.2.9/
#  phpize 
#  ./configure --with-php-config=/usr/local/php/bin/php-config  
#  make && make install
#  vim /etc/php.ini       //根据自己安装好后给出的路径新增下面这行
extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/swoole.so

保存好后重启php-fpm服务
#  php -m | grep swoole        //查看是否有swoole模块,找到有就说明安装成功了
swoole

假如碰到这个报错:

Can't find PHP headers in /usr/include/php The php-devel package is required for use of this command.

安装下面这个依赖包

yum install php70w-devel

错误:

Cannot find autoconf. Please check your autoconf installation and the

解决:

yum -y install autoconf

错误:

configure: error: C++ preprocessor "/lib/cpp" fails sanity check

解决:

yum install gcc-c++

你可能感兴趣的:(php)