运行php -m 查看会列出命令行 PHP Cli 已经安装的扩展,结果类似如下:
~# php -m [PHP Modules] libevent posix pcntl ...1利用php -v命令查看当前的PHP Cli的版本
2.根据版本下载PHP源代码
PHP历史版本下载页面:http://php.net/releases/
例如下载的压缩包名称是php-5.3.29.tar.gz
~# tar -zxvf php-5.3.29.tar.gz php-5.3.29/ php-5.3.29/README.WIN32-BUILD-SYSTEM php-5.3.29/netware/ ...~# cd php-5.3.29/ext/pcntl/ 3.、运行 phpize 命令4. ~# phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 2200906265.运行 configure命令 ~# ./configure checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E ...6.运行 make 命令 ~# make /bin/bash /tmp/php-5.3.29/ext/pcntl/libtool --mode=compile cc ... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend... ...7.运 行make install 命令 ~# make install Installing shared extensions: /usr/lib/php5/20090626/8.配置ini文件通过运行 php --ini查找php.ini文件位置,然后在文件中添加extension=pcntl.so ~# ./configure --enable-pcntl --enable-posix ... ~# make && make install转载于:https://www.cnblogs.com/mnboss/p/5794406.html
