服务器上是php 5.6.40的版本,去php.net下载一下源文件
解压出来 tar -zxvf php-5.6.40.tar.gz
cd hp-5.6.40/ext/pcntl
我的phpize 在/usr/bin/下面
执行:/usr/bin/phpize ./configure –with-php-config=/usr/bin/php-config
然后 ./configure -》 make-》 make install
看到生成了一个so文件
vim /etc/php.ini 加入 extension=pcntl.so
然后重启php-fpm
看下phpinfo()
OK 搞定!