1、Linux下PHP编译安装配置说明Linux下PHP编译安装配置说明配置帮助表:help显示帮助信息display this help and exitversion显示版本display version information and exitquiet, silent不显示checking信息do not printchecking messagescache-file=FILE在指定文件中存储测试结果cache test results in FILE disabledno-createconfigure脚本运行结束后不输出结果文件,常用于正式编译前的测试。do not create o
2、utput files安装目录:srcdir=DIR源文件库所在目录find the sources in DIR configure dir or .prefix=PREFIX体系无关文件的顶级安装目录PREFIX ,也就PHP的安装目录install architecture-independent files in PREFIX/usr/local/apache2exec-prefix=EPREFIX体系相关文件的顶级安装目录EPREFIX ,把体系相关的文件安装到不同的位置可以方便地在不同主机之间共享体系相关的文件install architecture-dependent files
3、 in EPREFIXPREFIXbindir=DIR用户可执行目录DIR。用于存放PHP的支持程序user executables EPREFIX/binsbindir=DIR系统管理员可执行目录DIR ,用于存放运行PHP服务器所必须的服务程序system admin executables EPREFIX/sbinlibexecdir=DIR程序可执行目录DIR ,也就是动态加载模块目录program executables EPREFIX/libexecsysconfdir=DIR只读的单一机器数据目录DIR ,用于存放php.ini之类的服务器配置文件read-only single
4、-machine data PREFIX/etcsharedstatedir=DIR可改写的体系无关数据目录DIRmodifiable architecture-independent data PREFIX/comlocalstatedir=DIR可改写的单一机器数据目录DIRmodifiable single-machine data PREFIX/varlibdir=DIR对象代码库目录DIRobject code libraries EPREFIX/libincludedir=DIRPHP的C头文件目录DIRC header files PREFIX/includeoldinclude
5、dir=DIR非gcc的C头文件目录DIRC header files for non-gcc /usr/includedatadir=DIRPHP服务器只读的体系无关数据目录DIRread-only architecture-independent data DATAROOTDIRinfodir=DIR信息文档目录DIRinfo documentation DATAROOTDIR/infolocaledir=DIR地区相关数据DIRlocale-dependent data DATAROOTDIR/localemandir=DIR手册文档目录DIRman documentation DATA
6、ROOTDIR/manprogram-prefix=PREFIX在安装的程序名前面加上前缀prepend PREFIX to installed program namesprogram-suffix=SUFFIX在安装的程序名前面加上后缀append SUFFIX to installed program names-program-transform-name=PROGRAM在运行的时候要运行sed程序脚本run sed PROGRAM on installed program names交叉编译选项:build=BUILD指定编译工具所在系统的系统类型BUILDconfigure for
7、 building on BUILD guessedhost=HOST指定Apache HTTP服务器将要进行交叉编译时运行的目标系统类型HOSTcross-compile to build programs to run on HOST BUILDtarget=TARGET指定交叉编译所产生的目标代码类型configure for building compilers for TARGET HOST特征选项:disable-FEATUREdo not include FEATURE (same as enable-FEATURE=no)关闭特征选项enable-FEATURE=ARGincl
8、ude FEATURE ARG=yes启用特征选项with-PACKAGE=ARGuse PACKAGE ARG=yes使用封装without-PACKAGEdo not use PACKAGE (same as with-PACKAGE=no)禁用封装x-includes=DIRX include files are in DIR在目录中包含X头文件x-libraries=DIRX library files are in DIR在目录中包含X库文件with-libdir=NAMELook for libraries in /NAME rather than /lib库文件查找路径设置/XX
9、X/lib/disable-rpathDisable passing additional runtime library search paths禁用传递其他运行库搜索路径SAPI modules(SAPI模块设置):with-aolserver=DIRSpecify path to the installed AOLserver指定AOLserver网站服务器的安装路径with-apxs=FILEBuild shared Apache 1.x module. FILE is the optional pathname to the Apache apxs tool apxs编译出共享的ap
10、ache 1.x版本的共享模块所存放的路径with-apache=DIRBuild Apache 1.x module. DIR is the top-level Apache build directory /usr/local/apache编译Apache1.x版本的模块,目录是apache的软件根目录。enable-mod-charsetAPACHE: Enable transfer tables for mod_charset (Rus Apache)为apache的mod_charset模块启用传输表模式。(俄文的apache使用)with-apxs2filter=FILEEXPER
11、IMENTAL: Build shared Apache 2.0 Filter module. FILE is the optional pathname to the Apache apxs tool apxs实验性:编译apache2.0的共享过滤模块。参数是apache apxs工具的路径文件with-apxs2=FILEBuild shared Apache 2.0 Handler module. FILE is the optional pathname to the Apache apxs tool apxs编译共享的apache2.0处理程序的模块。参数是apache apxs工
12、具的路径文件with-apache-hooks=FILEEXPERIMENTAL: Build shared Apache 1.x module. FILE is the optional pathname to the Apache apxs tool apxs实验性:编译共享的apache1.0的hooks模块。参数是apache apxs工具的路径文件with-apache-hooks-static=DIREXPERIMENTAL: Build Apache 1.x module. DIR is the top-level Apache build directory /usr/loca
13、l/apache实验性:编译apache1.0的hooks模块。参数是apache apxs工具的路径文件enable-mod-charsetAPACHE (hooks): Enable transfer tables for mod_charset (Rus Apache)apache(hooks)为apache的mod_charset模块启用传输表模式。with-caudium=DIRBuild PHP as a Pike module for use with Caudium. DIR is the Caudium server dir /usr/local/caudium/server
14、为Caudium服务器编译Pick模块。参数为Caudium软件的目录。disable-cliDisable building CLI version of PHP编译禁用CLI的PHP版本。这个参数需要without-pear (this forces without-pear)with-continuity=DIRBuild PHP as Continuity Server module. DIR is path to the installed Continuity Server root编译php为连续服务模块。参数为安装Continuity Server的根目录。enable-emb
15、ed=TYPEEXPERIMENTAL: Enable building of embedded SAPI library TYPE is either shared or static. TYPE=shared实验性:建立内嵌的SAPI库。参数为shared、static。with-isapi=DIRBuild PHP as an ISAPI module for use with Zeus为Zeus web服务器建立ISAPI模块。with-milter=DIRBuild PHP as Milter application编译PHP为Milter应用程序with-nsapi=DIRBuil
16、d PHP as NSAPI module for Netscape/iPlanet/Sun Webserver为Netscape/iPlanet/Sun Web服务器编译PHP为NSAPI模块。with-phttpd=DIRBuild PHP as phttpd module编译PHP为phttpd模块with-pi3web=DIRBuild PHP as Pi3Web module编译PHP为Pi3web模块with-roxen=DIRBuild PHP as a Pike module. DIR is the base Roxen directory, normally /usr/loc
17、al/roxen/server编译PHP为Pike模块。参数为ROXEN软件的路径。enable-roxen-ztsROXEN: Build the Roxen module using Zend Thread Safety编译Roxen的模块,使用Zend线程安全模式。with-thttpd=SRCDIRBuild PHP as thttpd module编译PHP为thttpd模块with-tux=MODULEDIRBuild PHP as a TUX module (Linux only)编译PHP为TUX模块(仅适用于linux下)with-webjames=SRCDIRBuild P
18、HP as a WebJames module (RISC OS only)编译PHP为WebJames模块(仅适用于RISC系统)disable-cgiDisable building CGI version of PHP编译禁用CGI的PHP版本enable-fastcgiCGI: Enable FastCGI support in the CGI binary在CGI二进制中启用FastCGI。enable-force-cgi-redirectCGI: Enable security check for internal server redirects. Use this if you
19、 run the PHP CGI with Apache启用内附服务重定向的安全检查。如果使用在Apache下运行PHP的CGI则使用此项。enable-discard-pathCGI: When this is enabled the PHP CGI binary can safely be placed outside of the web tree and people will not be able to circumvent .htaccess security当此项启用时PHP CGI二进制能够安全的代替外网树并且能够防止人们绕过.htaccess的安全。disable-path
20、-info-checkCGI: If this is disabled, paths such as /info.php/test?a=b will fail to work禁用url参数。如果此项启用,则如/info.php/test?a=b将不工作。General settings(普通参数设置):enable-gcovEnable GCOV code coverage (requires LTP) FOR DEVELOPERS ONLY!请用GCOV代码覆盖率(仅用于开发人员使用)enable-debugCompile with debugging symbols带调试符号的编译with
21、-layout=TYPESet how installed files will be laid out. Type can be either PHP or GNU PHP显示安装文件的布局。参数为PHP或GNUwith-config-file-path=PATHSet the path in which to look for php.ini PREFIX/libphp.ini文件位置with-config-file-scan-dir=PATHSet the path where to scan for configuration files扫描配置文件的路径enable-safe-mod
22、eEnable safe mode by default启用默认的安全模式with-exec-dir=DIROnly allow executables in DIR under safe-mode /usr/local/php/bin在安全模式目录下仅允许可执行文件enable-sigchildEnable PHPs own SIGCHLD handler使用PHP自带的SIGCHLD处理器enable-magic-quotesEnable magic quotes by default.默认激活magic quotes。可让程序在执行时自动加入反斜线的引入字符。enable-libgccE
23、nable explicitly linking against libgcc启用libgcc的精确链接disable-short-tagsDisable the short-form ? start tag by default默认禁用短形式的= 0.9.6)启用openssl支持with-kerberos=DIROPENSSL: Include Kerberos support包含kerberos支持without-pcre-regexDo not include Perl Compatible Regular Expressions support.DIR is the PCRE ins
24、tall prefix BUNDLED禁用pcre(perl兼容正则表达式)支持。with-zlib=DIRInclude ZLIB support (requires zlib = 1.0.9)启用zlib支持with-zlib-dir=Define the location of zlib install directory定义zlib安装所在的目录enable-bcmathEnable bc style precision math functions启用bcmatch(公元前风格精度数学)with-bz2=DIRInclude BZip2 support包含BZip2支持enable-
25、calendarEnable support for calendar conversion启用日历转换支持disable-ctypeDisable ctype functions禁用ctype功能with-curl=DIRInclude cURL support启用cURL支持with-curlwrappersUse cURL for url streams使用cURL作为网址流enable-dbaBuild DBA with bundled modules. To build shared DBA extension use enable-dba=shared构架捆绑模块的DBA。要建立扩
26、展的共享模块使用enable-dba=shared参数。with-qdbm=DIRDBA: QDBM support启用QDBM支持with-gdbm=DIRDBA: GDBM support启用GDBM支持with-ndbm=DIRDBA: NDBM support启用NDBM支持with-db4=DIRDBA: Berkeley DB4 support启用Berkeley DB4支持with-db3=DIRDBA: Berkeley DB3 support启用Berkeley DB3支持with-db2=DIRDBA: Berkeley DB2 support启用Berkeley DB2支
27、持with-db1=DIRDBA: Berkeley DB1 support/emulation启用Berkeley DB1支持/仿真with-dbm=DIRDBA: DBM support启用DBM支持without-cdb=DIRDBA: CDB support (bundled)启用CDB支持(捆绑方式)disable-inifileDBA: INI support (bundled)启用INI支持(捆绑方式)disable-flatfileDBA: FlatFile support (bundled)启用QDBM支持(捆绑方式)enable-dbaseEnable the bundled dbase library启用捆绑的dbase库disable-domDisable DOM support禁用DOM支持with-libxml-dir=DIRDOM: libxml2 install prefix启用libxml2