安装php源码包内的扩展

本地环境

PHP 7.0.4 (cli) (built: Mar 13 2016 21:50:22) ( NTS )

安装

  • 进入源码包中的ext文件夹中
[root@test etc]# cd /usr/local/php-7.0.4/ext/
[root@test ext]# ls
bcmath ...
#比方我这里想安装bcmath扩展进入bcmath文件夹
cd bcmath
  • 生成configure
#这里是我的phpize目录
/usr/local/php/bin/phpize
  • 编译安装
./configure
make && make install

修改php.ini配置文件

原文地址:https://www.cnblogs.com/zhangjianqiang/p/10238888.html