8月 032016
 

php 的configure选项中启用模块时,有些是–with-extname ,有些是 –enable-extname ;有何区别?

  1. –enable-extname  用于模块不需要任何依赖,可以直接开启
  2. –with-extname 用于模块有第三方依赖,需要先安装依赖
  3. 其它就没有差别了
  4. 参考: http://stackoverflow.com/questions/1255055/compiling-php-with-modules-vs-using-shared-modules

如何将尽可能多的模块编译为动态扩展?

 

如何编译所有模块:

./configure –enable-all=shared

如何编译除去指定模块外的所有模块:(下面去掉了两个不太熟悉的模块)

./configure –enable-all=shared –with-enchant=no –with-gmp=no

如何在with模块的时候指定依赖的安装路径:

 

编译选项示例:

 

如何将php.ini php-fpm.conf  php.d php-fpm.d 都放到/etc/php 目录下?如下:

编译选项:

–sysconfdir=/etc/php   : 指示 php-fpm.conf   php-fpm.d 安装到 /etc/php 下

–with-config-file-path=/etc/php :指示 php.ini 安装到 /etc/php 下

–with-config-file-scan-dir=/etc/php/php.d : 指示 php.d 安装到 /etc/php 下

 

php.ini 的安装位置和 –sysconfdir没有关系,默认 ${prefix}/lib

php-fpm.conf 的位置和–with-config-file-path 没有关系,默认 ${prefix}/etc 下

 

 

 

 Posted by at 下午 12:55

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据