Linux下PHP编译安装配置说明.docx
《Linux下PHP编译安装配置说明.docx》由会员分享,可在线阅读,更多相关《Linux下PHP编译安装配置说明.docx(23页珍藏版)》请在冰豆网上搜索。
Linux下PHP编译安装配置说明
Linux下PHP编译安装配置说明
配置帮助表:
–help
显示帮助信息
displaythishelpandexit
–version
显示版本
displayversioninformationandexit
–quiet,–silent
不显示checking……信息
donotprint`checking…’messages
–cache-file=FILE
在指定文件中存储测试结果
cachetestresultsinFILE[disabled]
–no-create
configure脚本运行结束后不输出结果文件,常用于正式编译前的测试。
donotcreateoutputfiles
安装目录:
–srcdir=DIR
源文件库所在目录
findthesourcesinDIR[configurediror`..']
–prefix=PREFIX
体系无关文件的顶级安装目录PREFIX,也就PHP的安装目录
installarchitecture-independentfilesinPREFIX
[/usr/local/apache2]
–exec-prefix=EPREFIX
体系相关文件的顶级安装目录EPREFIX,把体系相关的文件安装到不同的位置可以方便地在不同主机之间共享体系相关的文件
installarchitecture-dependentfilesinEPREFIX
[PREFIX]
–bindir=DIR
用户可执行目录DIR。
用于存放PHP的支持程序
userexecutables[EPREFIX/bin]
–sbindir=DIR
系统管理员可执行目录DIR,用于存放运行PHP服务器所必须的服务程序
systemadminexecutables[EPREFIX/sbin]
–libexecdir=DIR
程序可执行目录DIR,也就是动态加载模块目录
programexecutables[EPREFIX/libexec]
–sysconfdir=DIR
只读的单一机器数据目录DIR,用于存放php.ini之类的服务器配置文件
read-onlysingle-machinedata[PREFIX/etc]
–sharedstatedir=DIR
可改写的体系无关数据目录DIR
modifiablearchitecture-independentdata[PREFIX/com]
–localstatedir=DIR
可改写的单一机器数据目录DIR
modifiablesingle-machinedata[PREFIX/var]
–libdir=DIR
对象代码库目录DIR
objectcodelibraries[EPREFIX/lib]
–includedir=DIR
PHP的C头文件目录DIR
Cheaderfiles[PREFIX/include]
–oldincludedir=DIR
非gcc的C头文件目录DIR
Cheaderfilesfornon-gcc[/usr/include]
–datadir=DIR
PHP服务器只读的体系无关数据目录DIR
read-onlyarchitecture-independentdata[DATAROOTDIR]
–infodir=DIR
信息文档目录DIR
infodocumentation[DATAROOTDIR/info]
–localedir=DIR
地区相关数据DIR
locale-dependentdata[DATAROOTDIR/locale]
–mandir=DIR
手册文档目录DIR
mandocumentation[DATAROOTDIR/man]
–program-prefix
=PREFIX
在安装的程序名前面加上前缀
prependPREFIXtoinstalledprogramnames
–program-suffix
=SUFFIX
在安装的程序名前面加上后缀
appendSUFFIXtoinstalledprogramnames
-program-transform-name
=PROGRAM
在运行的时候要运行sed程序脚本
runsedPROGRAMoninstalledprogramnames
交叉编译选项:
–build=BUILD
指定编译工具所在系统的系统类型BUILD
configureforbuildingonBUILD[guessed]
–host=HOST
指定ApacheHTTP服务器将要进行交叉编译时运行的目标系统类型HOST
cross-compiletobuildprogramstorunonHOST[BUILD]
–target=TARGET
指定交叉编译所产生的目标代码类型
configureforbuildingcompilersforTARGET[HOST]
特征选项:
–disable-FEATURE
donotincludeFEATURE(sameas–enable-FEATURE=no)
关闭特征选项
–enable-FEATURE[=ARG]
includeFEATURE[ARG=yes]
启用特征选项
–with-PACKAGE[=ARG]
usePACKAGE[ARG=yes]
使用封装
–without-PACKAGE
donotusePACKAGE(sameas–with-PACKAGE=no)
禁用封装
–x-includes=DIR
XincludefilesareinDIR
在目录中包含X头文件
–x-libraries=DIR
XlibraryfilesareinDIR
在目录中包含X库文件
–with-libdir=NAME
Lookforlibrariesin…/NAMEratherthan…/lib
库文件查找路径设置…/XXX/lib/
–disable-rpath
Disablepassingadditionalruntimelibrarysearchpaths
禁用传递其他运行库搜索路径
SAPImodules(SAPI模块设置):
–with-aolserver=DIR
SpecifypathtotheinstalledAOLserver
指定AOLserver网站服务器的安装路径
–with-apxs[=FILE]
BuildsharedApache1.xmodule.FILEistheoptionalpathnametotheApacheapxstool[apxs]
编译出共享的apache1.x版本的共享模块所存放的路径
–with-apache[=DIR]
BuildApache1.xmodule.DIRisthetop-levelApachebuilddirectory[/usr/local/apache]
编译Apache1.x版本的模块,目录是apache的软件根目录。
–enable-mod-charset
APACHE:
Enabletransfertablesformod_charset(RusApache)
为apache的mod_charset模块启用传输表模式。
(俄文的apache使用)
–with-apxs2filter[=FILE]
EXPERIMENTAL:
BuildsharedApache2.0Filtermodule.FILEistheoptionalpathnametotheApacheapxstool[apxs]
实验性:
编译apache2.0的共享过滤模块。
参数是apacheapxs工具的路径文件
–with-apxs2[=FILE]
BuildsharedApache2.0Handlermodule.FILEistheoptionalpathnametotheApacheapxstool[apxs]
编译共享的apache2.0处理程序的模块。
参数是apacheapxs工具的路径文件
–with-apache-hooks[=FILE]
EXPERIMENTAL:
BuildsharedApache1.xmodule.FILEistheoptionalpathnametotheApacheapxstool[apxs]
实验性:
编译共享的apache1.0的hooks模块。
参数是apacheapxs工具的路径文件
–with-apache-hooks-static[=DIR]
EXPERIMENTAL:
BuildApache1.xmodule.DIRisthetop-levelApachebuilddirectory[/usr/local/apache]
实验性:
编译apache1.0的hooks模块。
参数是apacheapxs工具的路径文件
–enable-mod-charset
APACHE(hooks):
Enabletransfertablesformod_charset(RusApache)apache(hooks)
为apache的mod_charset模块启用传输表模式。
–with-caudium[=DIR]
BuildPHPasaPikemoduleforusewithCaudium.DIRistheCaudiumserverdir[/usr/local/caudium/server]
为Caudium服务器编译Pick模块。
参数为Caudium软件的目录。
–disable-cli
DisablebuildingCLIversionofPHP
编译禁用CLI的PHP版本。
这个参数需要–without-pear(thisforces–without-pear)
–with-continuity=DIR
BuildPHPasContinuityServermodule.DIRispathtotheinstalledContinuityServerroot
编译php为连续服务模块。
参数为安装ContinuityServer的根目录。
–enable-embed[=TYPE]
EXPERIMENTAL:
EnablebuildingofembeddedSAPIlibraryTYPEiseither’shared’or’static’.[TYPE=shared]
实验性:
建立内嵌的SAPI库。
参数为shared、static。
–with-isapi[=DIR]
BuildPHPasanISAPImoduleforusewithZeus
为Zeusweb服务器建立ISAPI模块。
–with-milter[=DIR]
BuildPHPasMilterapplication
编译PHP为Milter应用程序
–with-nsapi=DIR
BuildPHPasNSAPImoduleforNetscape/iPlanet/SunWebserver
为Netscape/iPlanet/SunWeb服务器编译PHP为NSAPI模块。
–with-phttpd=DIR
BuildPHPasphttpdmodule
编译PHP为phttpd模块
–with-pi3web[=DIR]
BuildPHPasPi3Webmodule
编译PHP为Pi3web模块
–with-roxen=DIR
BuildPHPasaPikemodule.DIRisthebaseRoxendirectory,normally/usr/local/roxen/server
编译PHP为Pike模块。
参数为ROXEN软件的路径。
–enable-roxen-zts
ROXEN:
BuildtheRoxenmoduleusingZendThreadSafety
编译Roxen的模块,使用Zend线程安全模式。
–with-thttpd=SRCDIR
BuildPHPasthttpdmodule
编译PHP为thttpd模块
–with-tux=MODULEDIR
BuildPHPasaTUXmodule(Linuxonly)
编译PHP为TUX模块(仅适用于linux下)
–with-webjames=SRCDIR
BuildPHPasaWebJamesmodule(RISCOSonly)
编译PHP为WebJames模块(仅适用于RISC系统)
–disable-cgi
DisablebuildingCGIversionofPHP
编译禁用CGI的PHP版本
–enable-fastcgi
CGI:
EnableFastCGIsupportintheCGIbinary
在CGI二进制中启用FastCGI。
–enable-force-cgi-redirect
CGI:
Enablesecuritycheckforinternalserverredirects.UsethisifyourunthePHPCGIwithApache
启用内附服务重定向的安全检查。
如果使用在Apache下运行PHP的CGI则使用此项。
–enable-discard-path
CGI:
WhenthisisenabledthePHPCGIbinarycansafelybeplacedoutsideofthewebtreeandpeoplewillnotbeabletocircumvent.htaccesssecurity
当此项启用时PHPCGI二进制能够安全的代替外网树并且能够防止人们绕过.htaccess的安全。
–disable-path-info-check
CGI:
Ifthisisdisabled,pathssuchas/info.php/test?
a=bwillfailtowork
禁用url参数。
如果此项启用,则如/info.php/test?
a=b将不工作。
Generalsettings(普通参数设置):
–enable-gcov
EnableGCOVcodecoverage(requiresLTP)–FORDEVELOPERSONLY!
!
请用GCOV代码覆盖率(仅用于开发人员使用)
–enable-debug
Compilewithdebuggingsymbols
带调试符号的编译
–with-layout=TYPE
Sethowinstalledfileswillbelaidout.TypecanbeeitherPHPorGNU[PHP]
显示安装文件的布局。
参数为PHP或GNU
–with-config-file-path=PATH
Setthepathinwhichtolookforphp.ini[PREFIX/lib]
php.ini文件位置
–with-config-file-scan-dir=PATH
Setthepathwheretoscanforconfigurationfiles
扫描配置文件的路径
–enable-safe-mode
Enablesafemodebydefault
启用默认的安全模式
–with-exec-dir[=DIR]
OnlyallowexecutablesinDIRundersafe-mode[/usr/local/php/bin]
在安全模式目录下仅允许可执行文件
–enable-sigchild
EnablePHP’sownSIGCHLDhandler
使用PHP自带的SIGCHLD处理器
–enable-magic-quotes
Enablemagicquotesbydefault.
默认激活magicquotes。
可让程序在执行时自动加入反斜线的引入字符。
–enable-libgcc
Enableexplicitlylinkingagainstlibgcc
启用libgcc的精确链接
–disable-short-tags
Disabletheshort-form
starttagbydefault
默认禁用短形式的
作为php代码的开始标记
–enable-dmalloc
Enabledmalloc
启用dmalloc(dmalloc是LinuxC编程侦测记忆体溢出工具)
–disable-ipv6
DisableIPv6support
禁用IPv6支持
–enable-fd-setsize
Setsizeofdescriptorsets
设置描述集的大小
Extensions(扩展参数):
–with-EXTENSION=[shared[,PATH]]语法设置(注:
并非所有模块都可编译成共享方式)
NOTE:
Notallextensionscanbebuildas’shared’.
下面的例子显示了把foobar编译成共享方式,并指定安装路径为/usr/local/foobar/
Example:
–with-foobar=shared,/usr/local/foobar/
oBuildsthefoobarextensionassharedextension.
ofoobarpackageinstallprefixis/usr/local/foobar/
–with-EXTENSION=[shared[,PATH]]
–disable-all
Disableallextensionswhichareenabledbydefault
关闭默认为启用的所有扩展功能
–disable-libxml
DisableLIBXMLsupport
禁用LIBXML支持
–with-libxml-dir[=DIR]
LIBXML:
libxml2installprefix
LIBXML安装目录
–with-openssl[=DIR]
IncludeOpenSSLsupport(requiresOpenSSL>=0.9.6)
启用openssl支持
–with-kerberos[=DIR]
OPENSSL:
IncludeKerberossupport
包含kerberos支持
–without-pcre-regex
DonotincludePerlCompatibleRegularExpressionssupport.DIRisthePCREinstallprefix[BUNDLED]
禁用pcre(perl兼容正则表达式)支持。
–with-zlib[=DIR]
IncludeZLIBsupport(requireszlib>=1.0.9)
启用zlib支持
–with-zlib-dir=
Definethelocationofzlibinstalldirectory
定义zlib安装所在的目录
–enable-bcmath
Enablebcstyleprecisionmathfunctions
启用bcmatch(公元前风格精度数学)
–with-bz2[=DIR]
IncludeBZip2support
包含BZip2支持
–enable-calendar
Enablesupportforcalendarconversion
启用日历转换支持
–disable-ctype
Disablectypefunctions
禁用ctype功能
–with-curl[=DIR]
IncludecURLsupport
启用cURL支持
–with-curlwrappers
UsecURLforurlstreams
使用cURL作为网址流
–enable-dba
BuildDBAwithbundledmodules.TobuildsharedDBAextensionuse–enable-dba=shared
构架捆绑模块的DBA。
要建立扩展的共享模块使用–enable-dba=shared参数。
–with-qdbm[=DIR]
DBA:
QDBMsupport
启用QDBM支持
–with-gdbm[=DIR]
DBA:
GDBMsupport
启用GDBM支持
–with-ndbm[=DIR]
DBA:
NDBMsupport
启用NDBM支持
–with-db4[=DIR]
DBA:
BerkeleyDB4support
启用BerkeleyDB4支持
–with-db3[=DIR]
DBA:
BerkeleyDB3support
启用BerkeleyDB3支持
–with-db2[=DIR]
DBA:
BerkeleyDB2support
启用BerkeleyDB2支持
–with-db1[=DIR]
DBA:
BerkeleyDB1support/emulation
启用BerkeleyDB1支持/仿真
–with-dbm[=DIR]
DBA:
DBMsupport
启用DBM支持
–without-cdb[=DIR]
DBA:
CDBsupport(bundled)
启用CDB支持(捆绑方式)
–disable-inifile
DBA:
INIsupport(bundled)
启用INI支持(捆绑方式)
–disable-flatfile
DBA:
FlatFilesupport(bundled)
启用QDBM支持(捆绑方式)
–enable-dbase
Enablethebundleddbaselibrary
启用捆绑的dbase库
–disable-dom
DisableDOMsupport
禁用DOM支持
–with-libxml-dir[=DIR]
DOM:
libxml2installprefix
启用libxml2