phpize源码安装php扩展

四、进入源码中的ext/pcntl目录php

~# cd php-5.3.29/ext/pcntl/

五、运行 phpize 命令bash

~# phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626

六、运行 configure命令code

~# ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
...

七、运行 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...
...

八、运 行make install 命令io

~# make install
Installing shared extensions:     /usr/lib/php5/20090626/

九、配置ini文件编译

经过运行 php --ini查找php.ini文件位置,而后在文件中添加extension=pcntl.so扩展

说明: 此方法通常用来安装PHP自带的扩展,例如posix扩展和pcntl扩展。除了用phpize编译某个扩展,也能够从新编译整个PHP,在编译时用参数添加扩展,例如在源码根目录运行配置

~# ./configure --enable-pcntl --enable-posix ...
~# make && make install
相关文章
相关标签/搜索