phpize源码安装php扩展

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

~# cd php-5.3.29/ext/pcntl/

5、运行 phpize 命令

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

6、运行 configure命令

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

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

8、运 行make install 命令

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

9、配置ini文件

通过运行 php --ini查找php.ini文件位置,然后在文件中添加extension=pcntl.so

说明: 此方法一般用来安装PHP自带的扩展,例如posix扩展和pcntl扩展。除了用phpize编译某个扩展,也可以重新编译整个PHP,在编译时用参数添加扩展,例如在源码根目录运行

~# ./configure --enable-pcntl --enable-posix ...
~# make && make install

转载于:https://my.oschina.net/u/588516/blog/2249573

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值