常用的配置参数
1. --prefix=/usr/local/php
指定 php 安装目录
install architecture-independent files in PREFIX 默认/usr/local
2.--with-config-file-path=PATH
php.ini的存放位置
Set the path in which to look for php.ini [PREFIX/lib]
--with-config-file-scan-dir=PATH
php.ini的扩展目录
Set the path where to scan for configuration files
3.--with-apxs2=FILE
生成libphp5.so ,httpd处理php的模块,需要用到apache的apxs支持 (需安装了httpd-devel)
Build shared Apache 2.0 Handler module. FILE is the optional
pathname to the Apache apxs tool apxs
4.--with-mysql=DIR
加入mysql支持, mysql官方的Mysql驱动目录,如果没设置DIR就使用php自带的mysql驱动mysqlnd
Include MySQL support. DIR is the MySQL base directory, if no DIR is passed or the value is
mysqlnd the MySQL native driver will be used
5.--with-mysqli=FILE
加入mysqli支持,没有设置默认是mysqlnd
Include MySQLi support. FILE is the path to mysql_config. If no value or mysqlnd is passed
as FILE, the MySQL native driver will be used
6.--with-pdo-mysql=DIR
加入pdo支持,默认为自带驱动mysqlnd
PDO: MySQL support. DIR is the MySQL base directory If no value or mysqlnd is passed as DIR, the
MySQL native driver will be used
7.--with-mysql-sock=SOCKPATH
指定mysql套接字文件位置,如果没指定则搜索默认位置
MySQL/MySQLi/PDO_MYSQL: Location of the MySQL unix socket pointer.
If unspecified, the default locations are searched
8.--enable-sockets
开启sockets支持
Enable sockets support
9.--with-libxml-dir=DIR
libxml2 安装位置
SimpleXML: libxml2 install prefix
10.--enable-mbstring
使php支持对多字节字符串的处理
Enable multibyte string support
11.--with-gd=DIR
Include GD support. DIR is the GD library base install directory BUNDLED
12.--with-curl=DIR
加入curl支持
Include cURL support
13.--with-mcrypt=DIR Include mcrypt support
14.--enable-zip Include Zip read/write support
15.--enable-calendar
支持日历转换
Enable support for calendar conversion
16.--with-zlib=DIR
打开zlib库支持
Include ZLIB support (requires zlib >= 1.0.9)
17.--enable-bcmath
打开图片大小调整,用到zabbix监控的时候用到了这个模块
Enable bc style precision math functions
18. --enable-soap Enable SOAP support
19.--with-iconv-dir=DIR XMLRPC-EPI: iconv dir for XMLRPC-EPI
20.--with-freetype-dir=DIR
打开对freetype字体库的支持
GD: Set the path to FreeType 2 install prefix
21.--with-jpeg-dir=DIR
打开对jpeg图片的支持
GD: Set the path to libjpeg install prefix
22.--with-png-dir=DIR
打开对png图片的支持
GD: Set the path to libpng install prefix
23.--without-sqlite3=DIR
自PHP5.3起默认启用SQLite3 扩展,可以在编译时使用--without-sqlite3禁用SQLite3 扩展
Do not include SQLite3 support. DIR is the prefix to SQLite3 installation directory.
24.--enable-exif
开启图片的元数据支持
Enable EXIF (metadata from images) support
25.--enable-ftp Enable FTP support
26.--with-pcre-dir
FILTER: pcre install prefix
27.--disable-fileinfo
fileinfo在5.3以后就被默认安装的,小内存VPS上编译PHP会out of memory
Disable fileinfo support

28.--enable-shared=PKGS Build shared libraries default=yes
生成动态链接库
--enable-static=PKGS Build static libraries default=yes
生成静态链接库
29.--disable-ipv6 Disable IPv6 support
30.--enable-phpdbg
轻量级、强大、易用的PHP调试平台,可以在PHP5.4和之上版本中使用,在php5.6和之上版本内部集成
Build phpdbg
31.--enable-fpm Enable building of the fpm SAPI executable
--with-fpm-user=USER Set the user for php-fpm to run as. (default: nobody)
--with-fpm-group=GRP Set the group for php-fpm to run as. For a system user, this
should usually be set to match the fpm username (default: nobody)
32.--enable-posix
开启posix扩展支持
33.--enable-pcntl
开启pcntl扩展
34.--with-pear=DIR Install PEAR in DIR [PREFIX/lib/php]
--without-pear Do not install PEAR

需要单独安装的扩展
gd库, mbstring, mhash和mcrypt
1.指定了--with-apxs2=/usr/local/apache/bin/apxs以后,就不要再激活--enable-fpm和--enable-fastCGI,apxs是以php module的模式加载PHP的.
2.Mysql在编译了Mysql开发library以后,可以不用指定mysql的路径.
3.PHP编译存在基础的依赖的关系,编译PHP首先需要安装XML扩展,因为php5核心默认打开了XML的支持,其他的基础库,相应需要
4.GD -> zlib, Png, Jpg, 如果需要支持其他,仍需要根据实际情况编译扩展库,ttf库需要freetype库的支持。
5.--enable-magic-quotes,是一个极其不推荐的参数,当然,如果你需要PHP为你做这些底下的工作,实际上他也没有很彻底的解决问题。
6.-with-openssl 需要openssl库

mysqli是MySQL团队提供的MySQL驱动,具有很多实用的功能和典型特征。不过他不是MySQL于PHP平台最好的选择,PDO被证实,是一个简易、高并发性,而且易于创建和回收的标准接口。不过PDO也经历了5.3以前的内存溢出的问题,在5.3以后,在读取Oracle的LOB资源时,若不对内存进行限制,仍会内存溢出。
如果是生产环境,好像pear、shmop、ftp等,都不推荐使用,语言,都有很好很快速的选择,无需局限于使用PHP去实现。不熟悉的类库和不常用的库,也不推荐使用。
magic-quote、session.auto_start、PHP服务器信息、PHP报错信息等在编译完成后,应该第一时间关闭,避免暴露服务器信息。
PHP对应的Web Server模式,Module、fastcgi、fpm只需要一种即可,服务器不是你的试验田。fastcgi可以选择Nginx和lighttpd,其实Nginx也是使用lighttpd的spwan-fcgi进行fcgi进程管理的。fpm是使用PHP自身去管理多进程,有点类似一个后端代理。无论什么模式,在发布产品服务器,都应该做进程和线程调优,做足够多的性能及压力方面的测试,找出最好的进程数组合。
选好一种PHP OPCode cache的扩展,这个也是很重要的,linux 2.6核心下,fcgi下,xcache有较好的实践经验,其他的在并发数增加以后,性能衰减严重。
如果真的想体验宁可编译多几个PHP版本,也不要针对一个版本的PHP集合各种扩展,适应各种环境,这会让把你自己逼进窘境的。

.configure --help

  1. `configure' configures this package to adapt to many kinds of systems.
  2.  
  3. Usage: ./configure [OPTION]... [VAR=VALUE]...
  4.  
  5. To assign environment variables (e.g., CC, CFLAGS...), specify them as
  6. VAR=VALUE. See below for descriptions of some of the useful variables.
  7.  
  8. Defaults for the options are specified in brackets.
  9.  
  10. Configuration:
  11. -h, --help display this help and exit
  12. --help=short display options specific to this package
  13. --help=recursive display the short help of all the included packages
  14. -V, --version display version information and exit
  15. -q, --quiet, --silent do not print `checking ...' messages
  16. --cache-file=FILE cache test results in FILE [disabled]
  17. -C, --config-cache alias for `--cache-file=config.cache'
  18. -n, --no-create do not create output files
  19. --srcdir=DIR find the sources in DIR [configure dir or `..']
  20.  
  21. Installation directories:
  22. --prefix=PREFIX install architecture-independent files in PREFIX
  23. [/usr/local]
  24. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  25. [PREFIX]
  26.  
  27. By default, `make install' will install all the files in
  28. `/usr/local/bin', `/usr/local/lib' etc. You can specify
  29. an installation prefix other than `/usr/local' using `--prefix',
  30. for instance `--prefix=$HOME'.
  31.  
  32. For better control, use the options below.
  33.  
  34. Fine tuning of the installation directories:
  35. --bindir=DIR user executables [EPREFIX/bin]
  36. --sbindir=DIR system admin executables [EPREFIX/sbin]
  37. --libexecdir=DIR program executables [EPREFIX/libexec]
  38. --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  39. --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  40. --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  41. --libdir=DIR object code libraries [EPREFIX/lib]
  42. --includedir=DIR C header files [PREFIX/include]
  43. --oldincludedir=DIR C header files for non-gcc [/usr/include]
  44. --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
  45. --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
  46. --infodir=DIR info documentation [DATAROOTDIR/info]
  47. --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
  48. --mandir=DIR man documentation [DATAROOTDIR/man]
  49. --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
  50. --htmldir=DIR html documentation [DOCDIR]
  51. --dvidir=DIR dvi documentation [DOCDIR]
  52. --pdfdir=DIR pdf documentation [DOCDIR]
  53. --psdir=DIR ps documentation [DOCDIR]
  54.  
  55. System types:
  56. --build=BUILD configure for building on BUILD [guessed]
  57. --host=HOST cross-compile to build programs to run on HOST [BUILD]
  58. --target=TARGET configure for building compilers for TARGET [HOST]
  59.  
  60. Optional Features and Packages:
  61. --disable-option-checking ignore unrecognized --enable/--with options
  62. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  63. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  64. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  65. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  66. --with-libdir=NAME Look for libraries in .../NAME rather than .../lib
  67. --disable-rpath Disable passing additional runtime library
  68. search paths
  69. --enable-re2c-cgoto Enable -g flag to re2c to use computed goto gcc extension
  70.  
  71. SAPI modules:
  72.  
  73. --with-aolserver=DIR Specify path to the installed AOLserver
  74. --with-apxs=FILE Build shared Apache .x module. FILE is the optional
  75. pathname to the Apache apxs tool apxs
  76. --with-apache=DIR Build Apache .x module. DIR is the top-level Apache
  77. build directory /usr/local/apache
  78. --enable-mod-charset APACHE: Enable transfer tables for mod_charset (Rus Apache)
  79. --with-apxs2filter=FILE
  80. EXPERIMENTAL: Build shared Apache 2.0 Filter module. FILE is the optional
  81. pathname to the Apache apxs tool apxs
  82. --with-apxs2=FILE Build shared Apache 2.0 Handler module. FILE is the optional
  83. pathname to the Apache apxs tool apxs
  84. --with-apache-hooks=FILE
  85. EXPERIMENTAL: Build shared Apache .x module. FILE is the optional
  86. pathname to the Apache apxs tool apxs
  87. --with-apache-hooks-static=DIR
  88. EXPERIMENTAL: Build Apache .x module. DIR is the top-level Apache
  89. build directory /usr/local/apache
  90. --enable-mod-charset APACHE (hooks): Enable transfer tables for mod_charset (Rus Apache)
  91. --with-caudium=DIR Build PHP as a Pike module for use with Caudium.
  92. DIR is the Caudium server dir /usr/local/caudium/server
  93. --disable-cli Disable building CLI version of PHP
  94. (this forces --without-pear)
  95. --with-continuity=DIR Build PHP as Continuity Server module.
  96. DIR is path to the installed Continuity Server root
  97. --enable-embed=TYPE EXPERIMENTAL: Enable building of embedded SAPI library
  98. TYPE is either 'shared' or 'static'. TYPE=shared
  99. --enable-fpm Enable building of the fpm SAPI executable
  100. --with-fpm-user=USER Set the user for php-fpm to run as. (default: nobody)
  101. --with-fpm-group=GRP Set the group for php-fpm to run as. For a system user, this
  102. should usually be set to match the fpm username (default: nobody)
  103. --with-fpm-systemd Activate systemd integration
  104. --with-fpm-acl Use POSIX Access Control Lists
  105. --with-isapi=DIR Build PHP as an ISAPI module for use with Zeus
  106. --with-litespeed Build PHP as litespeed module
  107. --with-milter=DIR Build PHP as Milter application
  108. --with-nsapi=DIR Build PHP as NSAPI module for Netscape/iPlanet/Sun Webserver
  109. --enable-phpdbg Build phpdbg
  110. --enable-phpdbg-debug Build phpdbg in debug mode
  111. --with-phttpd=DIR Build PHP as phttpd module
  112. --with-pi3web=DIR Build PHP as Pi3Web module
  113. --with-roxen=DIR Build PHP as a Pike module. DIR is the base Roxen
  114. directory, normally /usr/local/roxen/server
  115. --enable-roxen-zts ROXEN: Build the Roxen module using Zend Thread Safety
  116. --with-thttpd=SRCDIR Build PHP as thttpd module
  117. --with-tux=MODULEDIR Build PHP as a TUX module (Linux only)
  118. --with-webjames=SRCDIR Build PHP as a WebJames module (RISC OS only)
  119. --disable-cgi Disable building CGI version of PHP
  120.  
  121. General settings:
  122.  
  123. --enable-gcov Enable GCOV code coverage (requires LTP) - FOR DEVELOPERS ONLY!!
  124. --enable-debug Compile with debugging symbols
  125. --with-layout=TYPE Set how installed files will be laid out. Type can
  126. be either PHP or GNU [PHP]
  127. --with-config-file-path=PATH
  128. Set the path in which to look for php.ini [PREFIX/lib]
  129. --with-config-file-scan-dir=PATH
  130. Set the path where to scan for configuration files
  131. --enable-sigchild Enable PHP's own SIGCHLD handler
  132. --enable-libgcc Enable explicitly linking against libgcc
  133. --disable-short-tags Disable the short-form <? start tag by default
  134. --enable-dmalloc Enable dmalloc
  135. --disable-ipv6 Disable IPv6 support
  136. --enable-dtrace Enable DTrace support
  137. --enable-fd-setsize Set size of descriptor sets
  138.  
  139. Extensions:
  140.  
  141. --with-EXTENSION=shared[,PATH]
  142.  
  143. NOTE: Not all extensions can be build as 'shared'.
  144.  
  145. Example: --with-foobar=shared,/usr/local/foobar/
  146.  
  147. o Builds the foobar extension as shared extension.
  148. o foobar package install prefix is /usr/local/foobar/
  149.  
  150. --disable-all Disable all extensions which are enabled by default
  151.  
  152. --with-regex=TYPE Regex library type: system, php. TYPE=php
  153. WARNING: Do NOT use unless you know what you are doing!
  154. --disable-libxml Disable LIBXML support
  155. --with-libxml-dir=DIR LIBXML: libxml2 install prefix
  156. --with-openssl=DIR Include OpenSSL support (requires OpenSSL >= 0.9.)
  157. --with-kerberos=DIR OPENSSL: Include Kerberos support
  158. --with-system-ciphers OPENSSL: Use system default cipher list instead of hardcoded value
  159. --with-pcre-regex=DIR Include Perl Compatible Regular Expressions support.
  160. DIR is the PCRE install prefix BUNDLED
  161. --without-sqlite3=DIR Do not include SQLite3 support. DIR is the prefix to
  162. SQLite3 installation directory.
  163. --with-zlib=DIR Include ZLIB support (requires zlib >= 1.0.)
  164. --with-zlib-dir=<DIR> Define the location of zlib install directory
  165. --enable-bcmath Enable bc style precision math functions
  166. --with-bz2=DIR Include BZip2 support
  167. --enable-calendar Enable support for calendar conversion
  168. --disable-ctype Disable ctype functions
  169. --with-curl=DIR Include cURL support
  170. --enable-dba Build DBA with bundled modules. To build shared DBA
  171. extension use --enable-dba=shared
  172. --with-qdbm=DIR DBA: QDBM support
  173. --with-gdbm=DIR DBA: GDBM support
  174. --with-ndbm=DIR DBA: NDBM support
  175. --with-db4=DIR DBA: Oracle Berkeley DB .x or .x support
  176. --with-db3=DIR DBA: Oracle Berkeley DB .x support
  177. --with-db2=DIR DBA: Oracle Berkeley DB .x support
  178. --with-db1=DIR DBA: Oracle Berkeley DB .x support/emulation
  179. --with-dbm=DIR DBA: DBM support
  180. --with-tcadb=DIR DBA: Tokyo Cabinet abstract DB support
  181. --without-cdb=DIR DBA: CDB support (bundled)
  182. --disable-inifile DBA: INI support (bundled)
  183. --disable-flatfile DBA: FlatFile support (bundled)
  184. --disable-dom Disable DOM support
  185. --with-libxml-dir=DIR DOM: libxml2 install prefix
  186. --with-enchant=DIR Include enchant support.
  187. GNU Aspell version 1.1. or higher required.
  188. --enable-exif Enable EXIF (metadata from images) support
  189. --disable-fileinfo Disable fileinfo support
  190. --disable-filter Disable input filter support
  191. --with-pcre-dir FILTER: pcre install prefix
  192. --enable-ftp Enable FTP support
  193. --with-openssl-dir=DIR FTP: openssl install prefix
  194. --with-gd=DIR Include GD support. DIR is the GD library base
  195. install directory BUNDLED
  196. --with-vpx-dir=DIR GD: Set the path to libvpx install prefix
  197. --with-jpeg-dir=DIR GD: Set the path to libjpeg install prefix
  198. --with-png-dir=DIR GD: Set the path to libpng install prefix
  199. --with-zlib-dir=DIR GD: Set the path to libz install prefix
  200. --with-xpm-dir=DIR GD: Set the path to libXpm install prefix
  201. --with-freetype-dir=DIR GD: Set the path to FreeType install prefix
  202. --with-t1lib=DIR GD: Include T1lib support. T1lib version >= 5.0. required
  203. --enable-gd-native-ttf GD: Enable TrueType string function
  204. --enable-gd-jis-conv GD: Enable JIS-mapped Japanese font support
  205. --with-gettext=DIR Include GNU gettext support
  206. --with-gmp=DIR Include GNU MP support
  207. --with-mhash=DIR Include mhash support
  208. --disable-hash Disable hash support
  209. --without-iconv=DIR Exclude iconv support
  210. --with-imap=DIR Include IMAP support. DIR is the c-client install prefix
  211. --with-kerberos=DIR IMAP: Include Kerberos support. DIR is the Kerberos install prefix
  212. --with-imap-ssl=DIR IMAP: Include SSL support. DIR is the OpenSSL install prefix
  213. --with-interbase=DIR Include InterBase support. DIR is the InterBase base
  214. install directory /usr/interbase
  215. --enable-intl Enable internationalization support
  216. --with-icu-dir=DIR Specify where ICU libraries and headers can be found
  217. --disable-json Disable JavaScript Object Serialization support
  218. --with-ldap=DIR Include LDAP support
  219. --with-ldap-sasl=DIR LDAP: Include Cyrus SASL support
  220. --enable-mbstring Enable multibyte string support
  221. --disable-mbregex MBSTRING: Disable multibyte regex support
  222. --disable-mbregex-backtrack
  223. MBSTRING: Disable multibyte regex backtrack check
  224. --with-libmbfl=DIR MBSTRING: Use external libmbfl. DIR is the libmbfl base
  225. install directory BUNDLED
  226. --with-onig=DIR MBSTRING: Use external oniguruma. DIR is the oniguruma install prefix.
  227. If DIR is not set, the bundled oniguruma will be used
  228. --with-mcrypt=DIR Include mcrypt support
  229. --with-mssql=DIR Include MSSQL-DB support. DIR is the FreeTDS home
  230. directory /usr/local/freetds
  231. --with-mysql=DIR Include MySQL support. DIR is the MySQL base
  232. directory, if no DIR is passed or the value is
  233. mysqlnd the MySQL native driver will be used
  234. --with-mysql-sock=SOCKPATH
  235. MySQL/MySQLi/PDO_MYSQL: Location of the MySQL unix socket pointer.
  236. If unspecified, the default locations are searched
  237. --with-zlib-dir=DIR MySQL: Set the path to libz install prefix
  238. --with-mysqli=FILE Include MySQLi support. FILE is the path
  239. to mysql_config. If no value or mysqlnd is passed
  240. as FILE, the MySQL native driver will be used
  241. --enable-embedded-mysqli
  242. MYSQLi: Enable embedded support
  243. Note: Does not work with MySQL native driver!
  244. --with-oci8=DIR Include Oracle Database OCI8 support. DIR defaults to $ORACLE_HOME.
  245. Use --with-oci8=instantclient,/path/to/instant/client/lib
  246. to use an Oracle Instant Client installation
  247. --with-odbcver=HEX Force support for the passed ODBC version. A hex number is expected, default 0x0300.
  248. Use the special value of to prevent an explicit ODBCVER to be defined.
  249. --with-adabas=DIR Include Adabas D support /usr/local
  250. --with-sapdb=DIR Include SAP DB support /usr/local
  251. --with-solid=DIR Include Solid support /usr/local/solid
  252. --with-ibm-db2=DIR Include IBM DB2 support /home/db2inst1/sqllib
  253. --with-ODBCRouter=DIR Include ODBCRouter.com support /usr
  254. --with-empress=DIR Include Empress support \$EMPRESSPATH
  255. (Empress Version >= 8.60 required)
  256. --with-empress-bcs=DIR
  257. Include Empress Local Access support \$EMPRESSPATH
  258. (Empress Version >= 8.60 required)
  259. --with-birdstep=DIR Include Birdstep support /usr/local/birdstep
  260. --with-custom-odbc=DIR Include user defined ODBC support. DIR is ODBC install base
  261. directory /usr/local. Make sure to define CUSTOM_ODBC_LIBS and
  262. have some odbc.h in your include dirs. f.e. you should define
  263. following for Sybase SQL Anywhere 5.5. on QNX, prior to
  264. running this configure script:
  265. CPPFLAGS=\"-DODBC_QNX -DSQLANY_BUG\"
  266. LDFLAGS=-lunix
  267. CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\"
  268. --with-iodbc=DIR Include iODBC support /usr/local
  269. --with-esoob=DIR Include Easysoft OOB support /usr/local/easysoft/oob/client
  270. --with-unixODBC=DIR Include unixODBC support /usr/local
  271. --with-dbmaker=DIR Include DBMaker support
  272. --enable-opcache Enable Zend OPcache support
  273. --enable-pcntl Enable pcntl support (CLI/CGI only)
  274. --disable-pdo Disable PHP Data Objects support
  275. --with-pdo-dblib=DIR PDO: DBLIB-DB support. DIR is the FreeTDS home directory
  276. --with-pdo-firebird=DIR PDO: Firebird support. DIR is the Firebird base
  277. install directory /opt/firebird
  278. --with-pdo-mysql=DIR PDO: MySQL support. DIR is the MySQL base directory
  279. If no value or mysqlnd is passed as DIR, the
  280. MySQL native driver will be used
  281. --with-zlib-dir=DIR PDO_MySQL: Set the path to libz install prefix
  282. --with-pdo-oci=DIR PDO: Oracle OCI support. DIR defaults to \$ORACLE_HOME.
  283. Use --with-pdo-oci=instantclient,prefix,version
  284. for an Oracle Instant Client SDK.
  285. For example on Linux with 11.2 RPMs use:
  286. --with-pdo-oci=instantclient,/usr,11.2
  287. With 10.2 RPMs use:
  288. --with-pdo-oci=instantclient,/usr,10.2.0.4
  289. --with-pdo-odbc=flavour,dir
  290. PDO: Support for 'flavour' ODBC driver.
  291. include and lib dirs are looked for under 'dir'.
  292.  
  293. 'flavour' can be one of: ibm-db2, iODBC, unixODBC, generic
  294. If ',dir' part is omitted, default for the flavour
  295. you have selected will be used. e.g.:
  296.  
  297. --with-pdo-odbc=unixODBC
  298.  
  299. will check for unixODBC under /usr/local. You may attempt
  300. to use an otherwise unsupported driver using the \"generic\"
  301. flavour. The syntax for generic ODBC support is:
  302.  
  303. --with-pdo-odbc=generic,dir,libname,ldflags,cflags
  304.  
  305. When built as 'shared' the extension filename is always pdo_odbc.so
  306. --with-pdo-pgsql=DIR PDO: PostgreSQL support. DIR is the PostgreSQL base
  307. install directory or the path to pg_config
  308. --without-pdo-sqlite=DIR
  309. PDO: sqlite support. DIR is the sqlite base
  310. install directory BUNDLED
  311. --with-pgsql=DIR Include PostgreSQL support. DIR is the PostgreSQL
  312. base install directory or the path to pg_config
  313. --disable-phar Disable phar support
  314. --disable-posix Disable POSIX-like functions
  315. --with-pspell=DIR Include PSPELL support.
  316. GNU Aspell version 0.50. or higher required
  317. --with-libedit=DIR Include libedit readline replacement (CLI/CGI only)
  318. --with-readline=DIR Include readline support (CLI/CGI only)
  319. --with-recode=DIR Include recode support
  320. --disable-session Disable session support
  321. --with-mm=DIR SESSION: Include mm support for session storage
  322. --enable-shmop Enable shmop support
  323. --disable-simplexml Disable SimpleXML support
  324. --with-libxml-dir=DIR SimpleXML: libxml2 install prefix
  325. --with-snmp=DIR Include SNMP support
  326. --with-openssl-dir=DIR SNMP: openssl install prefix
  327. --enable-soap Enable SOAP support
  328. --with-libxml-dir=DIR SOAP: libxml2 install prefix
  329. --enable-sockets Enable sockets support
  330. --with-sybase-ct=DIR Include Sybase-CT support. DIR is the Sybase home
  331. directory /home/sybase
  332. --enable-sysvmsg Enable sysvmsg support
  333. --enable-sysvsem Enable System V semaphore support
  334. --enable-sysvshm Enable the System V shared memory support
  335. --with-tidy=DIR Include TIDY support
  336. --disable-tokenizer Disable tokenizer support
  337. --enable-wddx Enable WDDX support
  338. --with-libxml-dir=DIR WDDX: libxml2 install prefix
  339. --with-libexpat-dir=DIR WDDX: libexpat dir for XMLRPC-EPI (deprecated)
  340. --disable-xml Disable XML support
  341. --with-libxml-dir=DIR XML: libxml2 install prefix
  342. --with-libexpat-dir=DIR XML: libexpat install prefix (deprecated)
  343. --disable-xmlreader Disable XMLReader support
  344. --with-libxml-dir=DIR XMLReader: libxml2 install prefix
  345. --with-xmlrpc=DIR Include XMLRPC-EPI support
  346. --with-libxml-dir=DIR XMLRPC-EPI: libxml2 install prefix
  347. --with-libexpat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI (deprecated)
  348. --with-iconv-dir=DIR XMLRPC-EPI: iconv dir for XMLRPC-EPI
  349. --disable-xmlwriter Disable XMLWriter support
  350. --with-libxml-dir=DIR XMLWriter: libxml2 install prefix
  351. --with-xsl=DIR Include XSL support. DIR is the libxslt base
  352. install directory (libxslt >= 1.1. required)
  353. --enable-zip Include Zip read/write support
  354. --with-zlib-dir=DIR ZIP: Set the path to libz install prefix
  355. --with-pcre-dir ZIP: pcre install prefix
  356. --with-libzip=DIR ZIP: use libzip
  357. --enable-mysqlnd Enable mysqlnd explicitly, will be done implicitly
  358. when required by other extensions
  359. --disable-mysqlnd-compression-support
  360. Disable support for the MySQL compressed protocol in mysqlnd
  361. --with-zlib-dir=DIR mysqlnd: Set the path to libz install prefix
  362.  
  363. PEAR:
  364.  
  365. --with-pear=DIR Install PEAR in DIR [PREFIX/lib/php]
  366. --without-pear Do not install PEAR
  367.  
  368. Zend:
  369.  
  370. --with-zend-vm=TYPE Set virtual machine dispatch method. Type is
  371. one of "CALL", "SWITCH" or "GOTO" TYPE=CALL
  372. --enable-maintainer-zts Enable thread safety - for code maintainers only!!
  373. --disable-inline-optimization
  374. If building zend_execute.lo fails, try this switch
  375. --enable-zend-signals Use zend signal handling
  376.  
  377. TSRM:
  378.  
  379. --with-tsrm-pth=pth-config
  380. Use GNU Pth
  381. --with-tsrm-st Use SGI's State Threads
  382. --with-tsrm-pthreads Use POSIX threads (default)
  383.  
  384. Libtool:
  385.  
  386. --enable-shared=PKGS Build shared libraries default=yes
  387. --enable-static=PKGS Build static libraries default=yes
  388. --enable-fast-install=PKGS
  389. Optimize for fast installation default=yes
  390. --with-gnu-ld Assume the C compiler uses GNU ld default=no
  391. --disable-libtool-lock Avoid locking (might break parallel builds)
  392. --with-pic Try to use only PIC/non-PIC objects default=use both
  393. --with-tags=TAGS Include additional configurations automatic
  394.  
  395. Some influential environment variables:
  396. CC C compiler command
  397. CFLAGS C compiler flags
  398. LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
  399. nonstandard directory <lib dir>
  400. LIBS libraries to pass to the linker, e.g. -l<library>
  401. CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
  402. you have headers in a nonstandard directory <include dir>
  403. CPP C preprocessor
  404. YACC The `Yet Another C Compiler' implementation to use. Defaults to
  405. the first program found out of: `bison -y', `byacc', `yacc'.
  406. YFLAGS The list of arguments that will be passed by default to $YACC.
  407. This script will default YFLAGS to the empty string to avoid a
  408. default value of `-d' given by some make applications.
  409. CXX C++ compiler command
  410. CXXFLAGS C++ compiler flags
  411. CXXCPP C++ preprocessor
  412.  
  413. Use these variables to override the choices made by `configure' or to help
  414. it to find libraries and programs with nonstandard names/locations.
  415.  
  416. Report bugs to the package provider.

一个配置实例

  1. ./configure
    --prefix=/usr/local/php
    --with-config-file-path=/usr/local/php/etc
    --with-apxs2=/usr/sbin/apxs //(和fpm,fastcgi选一个即可)
    --enable-fpm
    --with-fpm-user=php-fpm
    --with-fpm-group=php-fpm
    --with-mysql=mysqlnd
    --with-pdo-mysql
    --with-mysql-sock=/tmp/mysql.sock
    --with-libxml-dir
    --with-gd
    --with-jpeg-dir
    --with-png-dir
    --with-freetype-dir
    --with-iconv-dir
    --with-zlib-dir
    --with-mcrypt=/usr/local/libmcrypt
    --enable-soap
    --enable-gd-native-ttf
    --enable-mbstring
    --enable-exif
    --disable-ipv6
    --with-pear
    --enable-posix
    --enable-pcntl
    --with-curl
    --with-openssl
  2.  
  3. 有参考:http://www.jb51.net/article/55709.htm
  4.  
  5. php7编译安装
    http://blog.csdn.net/21aspnet/article/details/47708763

php源码安装常用配置参数和说明的更多相关文章

  1. PHP 源码安装常用配置参数和说明

    常用的配置参数1. --prefix=/usr/local/php指定 php 安装目录install architecture-independent files in PREFIX 默认/usr/ ...

  2. nginx在Centos7.5下源码安装和配置

    安装nginx 安装nginx依赖包 yum install -y pcre-devel zlib-devel openssl-devel wget gcc tree vim 进入目录/root/se ...

  3. 源码安装和配置zabbix 3.0 LST

    Zabbix是什么 Zabbix 是由Alexei Vladishev创建,目前由Zabbix SIA在持续开发和支持. Zabbix 是一个企业级的分布式开源监控方案. Zabbix是一款能够监控各 ...

  4. rabbitmq源码安装及配置文件管理

    rabbitmq 源码安装 官网地址:rabbitmq http://www.rabbitmq.com/releases/rabbitmq-server/ 官网地址:erlang http://erl ...

  5. linux应用之nginx的源码安装及配置(centos)

    1.准备工作选首先安装这几个软件:GCC,PCRE(Perl Compatible Regular Expression),zlib,OpenSSL.Nginx是C写的,需要用GCC编译:Nginx的 ...

  6. Linux下源码安装并配置Nginx

    实验环境 一台最小化安装的CentOS 7.3 虚拟机 安装nginx 安装nginx依赖包 yum install -y pcre-devel zlib-devel openssl-devel wg ...

  7. linux中Python源码安装和配置

    安装 首先获取安装包,此处版本为3.7 wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz 解压 tar xvf Python- ...

  8. 《一个操作系统的实现》学习笔记(一) bochs源码安装及配置

    前言:本机环境ubuntu 14.04 bochs 2.4.5 一.下载 官网 http://bochs.sourceforge.net/ 二.安装 1.将下载好的压缩包解压并进入该目录 .tar.g ...

  9. [原创] zabbix学习之旅一:源码安装

    zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系统管理员快速定位/解决存 ...

随机推荐

  1. hello1 web项目中web.xml作用分析

    该web.xml文件包含Facelets应用程序所需的几个元素.使用NetBeans IDE创建应用程序时,将自动创建以下所有内容. 指定项目阶段的上下文参数: <context-param&g ...

  2. seo:网站被黑的预防及处理方法

    一.网站被黑的类型有哪些 1.网站挂木马  :通过网站后台 FTP等植入恶意代码 2.网站域名被恶意泛解析 3.跳转 4.百度快照劫持:黑客劫持快照在你不工作的时候进入你的网站的,一般是凌晨1点到5. ...

  3. css实现两栏布局,左侧固定宽,右侧自适应的7中方法

    一个面试会问的问题,如何实现两个盒子,左侧固定宽度,右侧自适应. 1.利用 calc 计算宽度的方法 css代码如下: .box{overflow: hidden;height: 100px;marg ...

  4. 《DSP using MATLAB》Problem 5.32

    代码: function [y] = ovrlpadd_v3(x, h, N) %% Overlap-Add method of block convolution %% -------------- ...

  5. 《DSP using MATLAB》Problem5.23

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% O ...

  6. 编译Spring源码

    近期,学习Spring源码.会陆续记录这次学习历程. Spring源码下载,环境中需要准备好的东西,git,gradle,eclipse (需要自己安装好) 1.Git clone Spring源码: ...

  7. 【liunx】date命令总结

    命令简介: date 根据给定格式显示日期或设置系统日期时间.print or set the system date and time 指令所在路径:/bin/date 命令语法: date [OP ...

  8. CH4701 天使玩偶

    题意 4701 天使玩偶 0x40「数据结构进阶」例题 描述 题目PDF 样例输入 2 3 1 1 2 3 2 1 2 1 3 3 2 4 2 样例输出 1 2 来源 石家庄二中Violet 3杯省选 ...

  9. Centos7 安装redis及其入门使用

    wget -c http://download.redis.io/releases/redis-3.2.9.tar.gz #下载源码 tar -xvf redis-3.2.9.tar.gz #解压 c ...

  10. POI导出Excel--合并单元格

    package com.test.util; import java.io.FileNotFoundException; import java.io.FileOutputStream; import ...