第二章apache的Configure参数详解

 

版本V1.0

时间2012-10-04

版权GPL

作者itnihao 邮箱 [email protected]

博客 http://itnihao.blog.51cto.com

如需重新发行,请注明以上信息,谢谢合作

前言

本文档基于对apache的学习整理而成的笔记。本文档详细的记录了apache各种应用,以及一些个人的理解,如果偏差,请和我联系,以在下一个版本中进行更正。其中大部分文档均来自网络,感谢网络上各位朋友的分享,才有此文档的出现。其中本人对参考的部分网络文档进行适当的修改,以达到更好的参考效果。也希望各位积极的分享文档,为开源事业做出自己力所能及的贡献。

                                             itnihao  2012年10月04日于成都

第二章apache的Configure参数详解(基于apache2.2.22参数的解释)

安装文件的获取

wget http://mirrors.sohu.com/apache/httpd-2.2.22.tar.gz

[root@test httpd-2.2.22]# ./configure --help

`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as

VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:

  -h, --help              display this help and exit

      --help=short        display options specific to this package

      --help=recursive    display the short help of all the included packages

    显示帮助信息然后退出。

    使用short参数将只显示正在运行的当前脚本的选项,而不能列出适用于Apache配置脚本所运行的外部配置脚本的选项。

    使用recursive参数将显示所有程序包的简短描述。 

  -V, --version           display version information and exit

    显示版权信息后退出。 

  -q, --quiet, --silent   do not print `checking...' messages

      --cache-file=FILE   cache test results in FILE [disabled]

    不显示脚本工作期间输出的”checking …”消息 

    将检测的结构保存在文件里面,默认是关闭的,--cace-flie=FILE

  -C, --config-cache      alias for `--cache-file=config.cache'

                     等价于 –cache-file=config.cache 

  -n, --no-create         do not create output files

      --srcdir=DIR     find the sources in DIR [configure dir or `..']

    configure脚本运行结束后不输出结果文件,常用于正式编译前的测试。 

Installation directories:

  --prefix=PREFIX   install architecture-independent files in PREFIX   [/usr/local/apache2]

   安装体系相关的目录PREFIX ,也就Apache的安装目录。[/usr/local/apache2]   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX

                          [PREFIX]

   体系相关文件的顶级安装目录EPREFIX ,把体系相关的文件安装到不同的位置可以方便地在不同主机之间共享体系相关的文件。[PREFIX] 

By default, `make install' will install all the files in

`/usr/local/apache2/bin', `/usr/local/apache2/lib' etc.  You can specify

an installation prefix other than `/usr/local/apache2' using `--prefix',

for instance `--prefix=$HOME'.

   默认情况下,make install 将会把所有文件分别安装到/usr/local/apache2/bin , /usr/local/apache2/lib 目录下。可以用 –prefix 指定一个不同于/usr/local/apache2的安装前缀,比如:–prefix=$HOME 。 

For better control, use the options below.

定义一个目录布局 

Fine tuning of the installation directories:

  --bindir=DIR            user executables [EPREFIX/bin]

用户可执行目录DIR 。用于存放对网站管理员很有帮助的htpasswd, dbmmanage之类的支持程序。[EPREFIX/bin] 

  --sbindir=DIR           system admin executables [EPREFIX/sbin]

系统管理员可执行目录DIR ,用于存放运行HTTP服务器所必须的httpd, apachectl, suexec之类的服务程序。[EPREFIX/sbin] 

  --libexecdir=DIR        program executables [EPREFIX/libexec]

  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]

只读的单一机器数据目录DIR ,用于存放httpd.conf和mime.types之类的服务器配置文件。[PREFIX/etc] 

  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]

可写的体系无关数据目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。[PREFIX/com] 

  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]

可写的单一机器数据目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。 

  --libdir=DIR            object code libraries [EPREFIX/lib]

对象代码库目录DIR 。[EPREFIX/lib] 

  --includedir=DIR        C header files [PREFIX/include]

Apache的C头文件目录DIR 。[EPREFIX/include] 

  --oldincludedir=DIR     C header files for non-gcc [/usr/include]

非gcc的C头文件目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。 

  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]

  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]

Web服务器只读的体系无关数据目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。[PREFIX/share] 

  --infodir=DIR           info documentation [DATAROOTDIR/info]

信息文档目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。[PREFIX/info] 

  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]

  --mandir=DIR            man documentation [DATAROOTDIR/man]

手册文档目录DIR 。[EPREFIX/man] 

  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]

联机文档doc存储目录

  --htmldir=DIR           html documentation [DOCDIR]

Html文档目录

  --dvidir=DIR            dvi documentation [DOCDIR]

Dvi文档

  --pdfdir=DIR            pdf documentation [DOCDIR]

Pdf文档

  --psdir=DIR             ps documentation [DOCDIR]

Ps文档

System types:

  --build=BUILD     configure for building on BUILD [guessed]

指定编译工具所在系统的系统类型BUILD 。[config.guess脚本的检测结果] 

  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

指定Apache HTTP服务器将要运行的目标系统类型HOST 。[BUILD] 

  --target=TARGET   configure for building compilers for TARGET [HOST]

TARGET类型的系统。虽然autoconf提供了该选项,但Apache并未使用它。[HOST] 

Optional Features:

  --disable-option-checking  ignore unrecognized --enable/--with options

  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)

  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]

  --enable-layout=LAYOUT

  --enable-v4-mapped      Allow IPv6 sockets to handle IPv4 connections

    使用相同的套接字同时处理IPv4和IPv6的连接,也就是启用地址映射。在FreeBSD、NetBSD、OpenBSD以外的平台上是默认值。

  --enable-exception-hook Enable fatal exception hook

    允许在子进程崩溃以后启用一个钩子来运行异常处理程序。参见EnableExceptionHook指令

  --enable-maintainer-mode     Turn on debugging and compile time warnings

   使用所有警告和调试符号编译源代码,请勿用于正式服务器,它会影响性能。

  --enable-pie            Build httpd as a Position Independent Executable

   将httpd编译为位置独立的(Position Independent)可执行程序

  --enable-modules=MODULE-LIST   Space-separated list of modules to enable | "all" | "most"

 

 

文章超过8万字限制,为限制篇幅,直接放了pdf

本文出自 “itnihao的运维技术博客” 博客,请务必保留此出处http://itnihao.blog.51cto.com/1741976/1012142

你可能感兴趣的:(apache)