PHP的编译
出自小鱼工作室
目录 |
官方网站
一般编译
包含常用功能的PHP编译
常用模块不断补充中(出于安全考虑CURL模块不在其中--with-curl --with-curlwrappers)
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --with-jpeg-dir --with-png-dir --with-gd --with-ttf --with-freetype-dir --enable-mbstring --with-zlib --with-mysql --with-gettext --enable-gd-native-ttf make make install
提供CURL功能的比较小的编译
这个PHP适用于爬虫
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --disable-all --with-mysql --with-iconv --with-curl --with-zlib --with-pcre-regex make make install
选项介绍
CURL
--with-curl[=DIR] #编译使用curl模块 --with-curlwrappers #urlstreams用curl来实现,即fopen,file_get_contents, etc. 关于curlwrappers,在某些情况下curlwrappers 会造成cpu 100%,目前还没看到什么规律,所以建议默认配置中去掉这个配置
不安装PEAR
如果没有PEAR库的需要,可以选择不安装PEAR
--without-pear
FTP支持
--enable-ftp
首页 >> Tech-Knowledge
