[root@192 httpd-2.2.31]# ./configure -h `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 使用short參數將只顯示正在運行的當前腳本的選項,而不能列出適用于Apache配置腳本所運行的外部配置腳本的選項。 --help=recursive display the short help of all the included packages 使用recursive參數將顯示所有程序包的簡短描述。 -V, --version display version information and exit 顯示版權信息后退出。 -q, --quiet, --silent do not print `checking ...' messages 不顯示腳本工作期間輸出的"checking ..."消息。 --cache-file=FILE cache test results in FILE [disabled] 在FILE文件中緩存測試結果[默認禁用] -C, --config-cache alias for `--cache-file=config.cache' config的緩存 -n, --no-create do not create output files configure腳本運行結束后不輸出結果文件,常用于正式編譯前的測試。 --srcdir=DIR find the sources in DIR [configure dir or `..'] 指定源代碼所在目錄DIR Installation directories: 安裝目錄 --prefix=PREFIX install architecture-independent files in PREFIX 安裝目錄,如果不指定prefix參數,默認安裝到“/usr/local/apache2” [/usr/local/apache2] --exec-prefix=EPREFIX install architecture-dependent files in 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'. For better control, use the options below. Fine tuning of the installation directories: 安裝目錄微調 --bindir=DIR user executables [EPREFIX/bin] 用戶可執行二進制文件目錄DIR 。用于存放對網站管理員很有幫助的htpasswd, dbmmanage之類的支持程序。 --sbindir=DIR system admin executables [EPREFIX/sbin] 超級用戶執行的程序。 --libexecdir=DIR program executables [EPREFIX/libexec] 指定可執行支持文件的安裝位置。與二進制文件相反,這些文件從來不直接由用戶執行,但是可以被上面提到的二進制文件所執行 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 系統配置文件存放目錄。 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] 可寫的單一機器數據目錄DIR --libdir=DIR object code libraries [EPREFIX/lib] 庫文件存放目錄 --includedir=DIR C header files [PREFIX/include] 頭文件存放目錄 --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] 手冊存放目錄 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] 文檔存放目錄 --htmldir=DIR html documentation [DOCDIR] html格式的文檔存放目錄 --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] pdf格式的文檔存放目錄 --psdir=DIR ps documentation [DOCDIR] System types: 系統類型 --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] Optional Features: 可選特性(模塊選項)。 有兩種使用模塊的方法:一是靜態連接進核心,二是作為DSO模塊動態加載;如果編譯中包含任何DSO模塊,則mod_so會被自動包含進核心。如果希望核心能夠裝載DSO,但不實際編譯任何DSO模塊,則需明確指定"--enable-so=static"。 --disable-option-checking ignore unrecognized --enable/--with options 忽略未被認出的enable/with選項 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 不包含的特性。FEATURE是特性名字(也即模塊名),例如:--disable-ssl 。 禁用MODULE模塊(僅用于基本模塊),基本模塊見下面的列表。 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 包含什么特性。例如:--enable-rewrite 。 --enable-layout=LAYOUT 使用名為LAYOUT的布局配置所有源代碼和編譯腳本。這樣就允許你在安裝時分別指定不同文件的安裝位置。config.layout文件中包含了默認布局的示例,你可以根據它創建你自己的布局。這個文件中的不同布局使用...段進行分組,其中的FOO就是布局名。默認的布局是Apache 。 --enable-v4-mapped Allow IPv6 sockets to handle IPv4 connections --enable-exception-hook Enable fatal exception hook --enable-maintainer-mode Turn on debugging and compile time warnings --enable-pie Build httpd as a Position Independent Executable --enable-modules=MODULE-LIST Space-separated list of modules to enable | "all" | "most" 空格分隔的模塊列表。將MODULE-LIST靜態連接進核心(可用于所有模塊){MODULE-LIST|most|all}。見下面”模塊選項“說明。 --enable-mods-shared=MODULE-LIST Space-separated list of shared modules to enable | "all" | "most" 將MODULE-LIST中的所有模塊都編譯成DSO(可用于所有模塊) --disable-authn-file file-based authentication control --enable-authn-dbm DBM-based authentication control --enable-authn-anon anonymous user authentication control --enable-authn-dbd SQL-based authentication control --disable-authn-default authentication backstopper --enable-authn-alias auth provider alias --disable-authz-host host-based authorization control --disable-authz-groupfile 'require group' authorization control --disable-authz-user 'require user' authorization control --enable-authz-dbm DBM-based authorization control --enable-authz-owner 'require file-owner' authorization control --enable-authnz-ldap LDAP based authentication --disable-authz-default authorization control backstopper --disable-auth-basic basic authentication --enable-auth-digest RFC2617 Digest authentication --enable-isapi isapi extension support --enable-file-cache File cache --enable-cache dynamic file caching --enable-disk-cache disk caching module --enable-mem-cache memory caching module --enable-dbd Apache DBD Framework --enable-bucketeer buckets manipulation filter --enable-dumpio I/O dump filter --enable-echo ECHO server --enable-example example and demo module --enable-case-filter example uppercase conversion filter --enable-case-filter-in example uppercase conversion input filter --enable-reqtimeout Limit time waiting for request from client --enable-ext-filter external filter module --disable-include Server Side Includes --disable-filter Smart Filtering --enable-substitute response content rewrite-like filtering --disable-charset-lite character set translation --enable-charset-lite character set translation --enable-deflate Deflate transfer encoding support --enable-ldap LDAP caching and connection pooling services --disable-log-config logging configuration --enable-log-forensic forensic logging --enable-logio input and output logging --disable-env clearing/setting of ENV vars --enable-mime-magic automagically determining MIME type --enable-cern-meta CERN-type meta files --enable-expires Expires header control --enable-headers HTTP header control --enable-ident RFC 1413 identity check --enable-usertrack user-session tracking --enable-unique-id per-request unique ids --disable-setenvif basing ENV vars on headers --disable-version determining httpd version in config files --enable-proxy Apache proxy module --enable-proxy-connect Apache proxy CONNECT module --enable-proxy-ftp Apache proxy FTP module --enable-proxy-http Apache proxy HTTP module --enable-proxy-scgi Apache proxy SCGI module --enable-proxy-ajp Apache proxy AJP module --enable-proxy-balancer Apache proxy BALANCER module --enable-ssl SSL/TLS support (mod_ssl) --enable-distcache Select distcache support in mod_ssl --enable-optional-hook-export example optional hook exporter --enable-optional-hook-import example optional hook importer --enable-optional-fn-import example optional function importer --enable-optional-fn-export example optional function exporter --enable-static-support Build a statically linked version of the support binaries --enable-static-htpasswd Build a statically linked version of htpasswd --enable-static-htdigest Build a statically linked version of htdigest --enable-static-rotatelogs Build a statically linked version of rotatelogs --enable-static-logresolve Build a statically linked version of logresolve --enable-static-htdbm Build a statically linked version of htdbm --enable-static-ab Build a statically linked version of ab --enable-static-checkgid Build a statically linked version of checkgid --enable-static-htcacheclean Build a statically linked version of htcacheclean --enable-static-httxt2dbm Build a statically linked version of httxt2dbm --enable-http HTTP protocol handling --disable-mime mapping of file-extension to MIME --enable-dav WebDAV protocol handling --disable-status process/thread monitoring --disable-autoindex directory listing --disable-asis as-is filetypes --enable-info server information --enable-suexec set uid and gid for spawned processes --disable-cgid CGI scripts --enable-cgi CGI scripts --disable-cgi CGI scripts --enable-cgid CGI scripts --enable-dav-fs DAV provider for the filesystem --enable-dav-lock DAV provider for generic locking --enable-vhost-alias mass virtual hosting module --disable-negotiation content negotiation --disable-dir directory request handling --enable-imagemap server-side imagemaps --disable-actions Action triggering on requests --enable-speling correct common URL misspellings --disable-userdir mapping of requests to user-specific directories --disable-alias mapping of requests to different filesystem parts --enable-rewrite rule based URL manipulation --enable-so DSO capability Optional Packages: 可選程序包 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-included-apr Use bundled copies of APR/APR-Util --with-apr=PATH prefix for installed APR or the full path to apr-config --with-apr-util=PATH prefix for installed APU or the full path to apu-config --with-pcre=PATH Use external PCRE library --with-port=PORT Port on which to listen (default is 80) --with-sslport=SSLPORT Port on which to securelisten (default is 443) --with-z=DIR use a specific zlib library --with-sslc=DIR RSA SSL-C SSL/TLS toolkit --with-ssl=DIR OpenSSL SSL/TLS toolkit --with-mpm=MPM Choose the process model for Apache to use. MPM={beos|event|worker|prefork|mpmt_os2|winnt} --with-module=module-type:module-file Enable module-file in the modules/ directory. --with-program-name alternate executable name --with-suexec-bin Path to suexec binary --with-suexec-caller User allowed to call SuExec --with-suexec-userdir User subdirectory --with-suexec-docroot SuExec root directory --with-suexec-uidmin Minimal allowed UID --with-suexec-gidmin Minimal allowed GID --with-suexec-logfile Set the logfile --with-suexec-safepath Set the safepath --with-suexec-umask umask for suexec'd process Some influential environment variables: 環境變量??梢酝ㄟ^指定某些環境變量來修改configure腳本的默認選擇,或者幫助configure腳本找到名字和/或位置不標準的庫和程序。 CC C compiler command C編譯器 CFLAGS C compiler flags C編譯器的flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory 連接器flags,比如使用"-L-Llibdir"指定一個非標準的庫文件目錄libdir 。 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory C/C++預處理程序flags,比如使用"-Iincludedir"指定一個非標準的頭文件目錄includedir 。 CPP C preprocessor C預處理程序 Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider.
模塊選項
有兩種使用模塊的方法:一是靜態連接進核心,二是作為DSO模塊動態加載;如果編譯中包含任何DSO模塊,則mod_so會被自動包含進核心。如果希望核心能夠裝載DSO,但不實際編譯任何DSO模塊,則需明確指定"–enable-so=static"。
一般語法
一般情況下你可以使用如下語法啟用或者禁用某個模塊:
-
–disable-MODULE
-
–enable-MODULE=shared
-
–enable-MODULE=static
-
–enable-mods-shared=MODULE-LIST
-
–enable-mods=MODULE-LIST
-
–enable-modules=MODULE-LIST
-
將MODULE-LIST靜態連接進核心(可用于所有模塊)
禁用MODULE模塊(僅用于基本模塊)
將MODULE編譯為DSO(可用于所有模塊)
將MODULE靜態連接進核心(僅用于擴展和實驗模塊)
將MODULE-LIST中的所有模塊都編譯成DSO(可用于所有模塊)
即去掉”shared“。將MODULE-LIST靜態連接進核心
上述 MODULE-LIST 可以是:
(1)用引號界定并且用空格分隔的模塊名列表
–enable-mods-shared='headers rewrite dav'
(2)"most"(大多數模塊[遇見錯誤模塊時忽略該模塊而不中斷配置過程])
(3)"all"(所有模塊[遇見錯誤模塊時中斷配置過程并報錯])
–enable-mods-shared=most
注意
configure將忽略MODULE和MODULE-LIST中的拼寫錯誤,注意仔細拼寫。用于MODULE和MODULE-LIST中的名稱是"mod_NAME"中去掉"mod_"并將剩余部分中的下劃線"_"替換為連字符"-"以后的結果,比如"mod_log_config"模塊應當表示為"log-config"。
模塊列表
基本(B)模塊默認包含,必須明確禁用;擴展(E)/實驗(X)模塊默認不包含,必須明確啟用。
模塊名稱 | 狀態 | 簡要描述 |
mod_actions |
(B) | 根據特定的媒體類型或請求方法,激活特定的CGI腳本 |
mod_alias |
(B) | 提供從文件系統的不同部分到文檔樹的映射和URL重定向 |
mod_asis |
(B) | 發送自己包含HTTP頭內容的文件 |
mod_auth_basic |
(B) | 使用基本認證 |
mod_authn_default |
(B) | 在未正確配置認證模塊的情況下簡單拒絕一切認證信息 |
mod_authn_file |
(B) | 使用純文本文件為認證提供支持 |
mod_authz_default |
(B) | 在未正確配置授權支持模塊的情況下簡單拒絕一切授權請求 |
mod_authz_groupfile |
(B) | 使用純文本文件為組提供授權支持 |
mod_authz_host |
(B) | 供基于主機名、IP地址、請求特征的訪問控制 |
mod_authz_user |
(B) | 基于每個用戶提供授權支持 |
mod_autoindex |
(B) | 自動對目錄中的內容生成列表,類似于"ls"或"dir"命令 |
mod_cgi |
(B) | 在非線程型MPM(prefork )上提供對CGI腳本執行的支持 |
mod_cgid |
(B) | 在線程型MPM(worker )上用一個外部CGI守護進程執行CGI腳本 |
mod_dir |
(B) | 指定目錄索引文件以及為目錄提供"尾斜杠"重定向 |
mod_env |
(B) | 允許Apache修改或清除傳送到CGI腳本和SSI頁面的環境變量 |
mod_filter |
(B) | 根據上下文實際情況對輸出過濾器進行動態配置 |
mod_imagemap |
(B) | 處理服務器端圖像映射 |
mod_include |
(B) | 實現服務端包含文檔(SSI)處理 |
mod_isapi |
(B) | 僅限于在Windows平臺上實現ISAPI擴展 |
mod_log_config |
(B) | 允許記錄日志和定制日志文件格式 |
mod_mime |
(B) | 根據文件擴展名決定應答的行為(處理器/過濾器)和內容(MIME類型/語言/字符集/編碼) |
mod_negotiation |
(B) | 提供內容協商支持 |
mod_nw_ssl |
(B) | 僅限于在NetWare平臺上實現SSL加密支持 |
mod_setenvif |
(B) | 根據客戶端請求頭字段設置環境變量 |
mod_status |
(B) | 生成描述服務器狀態的Web頁面 |
mod_userdir |
(B) | 允許用戶從自己的主目錄中提供頁面(使用"/~username") |
mod_auth_digest |
(X) | 使用MD5摘要認證(更安全,但是只有最新的瀏覽器才支持) |
mod_authn_alias |
(E) | 基于實際認證支持者創建擴展的認證支持者,并為它起一個別名以便于引用 |
mod_authn_anon |
(E) | 提供匿名用戶認證支持 |
mod_authn_dbd |
(E) | 使用SQL數據庫為認證提供支持 |
mod_authn_dbm |
(E) | 使用DBM數據庫為認證提供支持 |
mod_authnz_ldap |
(E) | 允許使用一個LDAP目錄存儲用戶名和密碼數據庫來執行基本認證和授權 |
mod_authz_dbm |
(E) | 使用DBM數據庫文件為組提供授權支持 |
mod_authz_owner |
(E) | 基于文件的所有者進行授權 |
mod_cache |
(E) | 基于URI鍵的內容動態緩沖(內存或磁盤) |
mod_cern_meta |
(E) | 允許Apache使用CERN httpd元文件,從而可以在發送文件時對頭進行修改 |
mod_charset_lite |
(X) | 允許對頁面進行字符集轉換 |
mod_dav |
(E) | 允許Apache提供DAV協議支持 |
mod_dav_fs |
(E) | 為mod_dav 訪問服務器上的文件系統提供支持 |
mod_dav_lock |
(E) | 為mod_dav 鎖定服務器上的文件提供支持 |
mod_dbd |
(E) | 管理SQL數據庫連接,為需要數據庫功能的模塊提供支持 |
mod_deflate |
(E) | 壓縮發送給客戶端的內容 |
mod_disk_cache |
(E) | 基于磁盤的緩沖管理器 |
mod_dumpio |
(E) | 將所有I/O操作轉儲到錯誤日志中 |
mod_echo |
(X) | 一個很簡單的協議演示模塊 |
mod_example |
(X) | 一個很簡單的Apache模塊API演示模塊 |
mod_expires |
(E) | 允許通過配置文件控制HTTP的"Expires: "和"Cache-Control: "頭內容 |
mod_ext_filter |
(E) | 使用外部程序作為過濾器 |
mod_file_cache |
(X) | 提供文件描述符緩存支持,從而提高Apache性能 |
mod_headers |
(E) | 允許通過配置文件控制任意的HTTP請求和應答頭信息 |
mod_ident |
(E) | 實現RFC1413規定的ident查找 |
mod_info |
(E) | 生成Apache配置情況的Web頁面 |
mod_ldap |
(E) | 為其它LDAP模塊提供LDAP連接池和結果緩沖服務 |
mod_log_forensic |
(E) | 實現"對比日志",即在請求被處理之前和處理完成之后進行兩次記錄 |
mod_logio |
(E) | 對每個請求的輸入/輸出字節數以及HTTP頭進行日志記錄 |
mod_mem_cache |
(E) | 基于內存的緩沖管理器 |
mod_mime_magic |
(E) | 通過讀取部分文件內容自動猜測文件的MIME類型 |
mod_proxy |
(E) | 提供HTTP/1.1的代理/網關功能支持 |
mod_proxy_ajp |
(E) | mod_proxy 的擴展,提供Apache JServ Protocol支持 |
mod_proxy_balancer |
(E) | mod_proxy 的擴展,提供負載平衡支持 |
mod_proxy_connect |
(E) | mod_proxy 的擴展,提供對處理HTTP CONNECT 方法的支持 |
mod_proxy_ftp |
(E) | mod_proxy 的FTP支持模塊 |
mod_proxy_http |
(E) | mod_proxy 的HTTP支持模塊 |
mod_rewrite |
(E) | 一個基于一定規則的實時重寫URL請求的引擎 |
mod_so |
(E) | 允許運行時加載DSO模塊 |
mod_speling |
(E) | 自動糾正URL中的拼寫錯誤 |
mod_ssl |
(E) | 使用安全套接字層(SSL)和傳輸層安全(TLS)協議實現高強度加密傳輸 |
mod_suexec |
(E) | 使用與調用web服務器的用戶不同的用戶身份來運行CGI和SSI程序 |
mod_unique_id |
(E) | 為每個請求生成唯一的標識以便跟蹤 |
mod_usertrack |
(E) | 使用Session跟蹤用戶(會發送很多Cookie),以記錄用戶的點擊流 |
mod_version |
(E) | 提供基于版本的配置段支持 |
mod_vhost_alias |
(E) | 提供大批量虛擬主機的動態配置支持 |
更多詳細的說明,可參考apache手冊。http://apache.chinahtml.com/programs/configure.html#modoptions
原創文章,作者:Net17-卓格,如若轉載,請注明出處:http://www.www58058.com/16532