歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> apache編譯參數詳解

apache編譯參數詳解

日期:2017/2/27 16:04:19   编辑:Linux教程

常用編譯參數:

./configure //配置源代碼樹
–prefix=/usr/local/apache //體系無關文件的頂級安裝目錄PREFIX ,也就Apache的安裝目錄。
–enable-module=so //打開 so 模塊,so 模塊是用來提 DSO 支持的 apache 核心模塊
–enable-deflate=shared //支持網頁壓縮
–enable-expires=shared //支持 HTTP 控制
–enable-rewrite=shared //支持 URL 重寫
–enable-cache //支持緩存
–enable-file-cache //支持文件緩存
–enable-mem-cache //支持記憶緩存
–enable-disk-cache //支持磁盤緩存
–enable-static-support //支持靜態連接(默認為動態連接)
–enable-static-Linux/1727.html' target='_blank'>htpasswd //使用靜態連接編譯 htpasswd – 管理用於基本認證的用戶文件
–enable-static-htdigest //使用靜態連接編譯 htdigest – 管理用於摘要認證的用戶文件
–enable-static-rotatelogs //使用靜態連接編譯 rotatelogs – 滾動 Apache 日志的管道日志程序
–enable-static-logresolve //使用靜態連接編譯 logresolve – 解析 Apache 日志中的IP地址為主機名
–enable-static-htdbm //使用靜態連接編譯 htdbm – 操作 DBM 密碼數據庫
–enable-static-ab //使用靜態連接編譯 ab – Apache HTTP 服務器性能測試工具
–enable-static-checkgid //使用靜態連接編譯 checkgid
–disable-cgid //禁止用一個外部 CGI 守護進程執行CGI腳本
–disable-cgi //禁止編譯 CGI 版本的 PHP
–disable-userdir //禁止用戶從自己的主目錄中提供頁面
–with-mpm=worker //讓apache以worker方式運行
–enable-authn-dbm=shared //對動態數據庫進行操作。Rewrite時需要。
以下是分門別類的更多參數注解,與上面的會有重復

用於apr的configure腳本的選項:

可選特性:
--enable-experimental-libtool //啟用試驗性質的自定義libtool
--disable-libtool-lock //取消鎖定(可能導致並行編譯崩潰)
--enable-debug //啟用調試編譯,僅供開發人員使用。
--enable-maintainer-mode //打開調試和編譯時警告,僅供開發人員使用。
--enable-profile //打開編譯profiling(GCC)
--enable-pool-debug[=yes|no|verbose|verbose-alloc|lifetime|owner|all] //打開pools調試
--enable-malloc-debug //打開BeOS平台上的malloc_debug
--disable-lfs //在32-bit平台上禁用大文件支持(large file support)
--enable-nonportable-atomics //若只打算在486以上的CPU上運行Apache ,那麼使用該選項可以啟用更加高效的基於互斥執行的原子操作。
--enable-threads //啟用線程支持,在線程型的MPM上必須打開它
--disable-threads //禁用線程支持,如果不使用線程化的MPM ,可以關閉它以減少系統開銷。
--disable-dso //禁用DSO支持
--enable-other-child //啟用可靠子進程支持
--disable-ipv6 //禁用IPv6支持

可選的額外程序包:
--with-gnu-ld //指定C編譯器使用 GNU ld
--with-pic //只使用 PIC/non-PIC 對象[默認為兩者都使用]
--with-tags[=TAGS] //包含額外的配置
--with-installbuilddir=DIR //指定APR編譯文件的存放位置(默認值為:’${datadir}/build’)
--without-libtool //禁止使用libtool連接庫文件
--with-efence[=DIR] //指定Electric Fence的安裝目錄
--with-sendfile //強制使用sendfile(譯者注:Linux2.4/2.6內核都支持)
--with-egd[=DIR] //使用EDG兼容的socket
--with-devrandom[=DEV] //指定隨機設備[默認為:/dev/random]

用於apr-util的configure腳本的選項:

可選的額外程序包:
--with-apr=PATH //指定APR的安裝目錄(–prefix選項值或apr-config的路徑)
--with-ldap-include=PATH //ldap包含文件目錄(帶結尾斜線)
--with-ldap-lib=PATH //ldap庫文件路徑
--with-ldap=library //使用的ldap庫
--with-dbm=DBM //選擇使用的DBM類型DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44}
--with-gdbm=PATH //指定GDBM的位置
--with-ndbm=PATH //指定NDBM的位置
--with-berkeley-db=PATH //指定Berkeley DB的位置
--with-pgsql=PATH //指定PostgreSQL的位置
--with-mysql=PATH //參看INSTALL.MySQL文件的內容
--with-sqlite3=PATH //指定sqlite3的位置
--with-sqlite2=PATH //指定sqlite2的位置
--with-expat=PATH //指定Expat的位置或’builtin’
--with-iconv=PATH //iconv的安裝目錄
Copyright © Linux教程網 All Rights Reserved