常用编译参数一览
/configure
–prefix=/usr/local/apache2
–enable-module=so
–enable-deflate=shared
–enable-expires=shared
–enable-rewrite=shared
–enable-cache //支持缓存
–enable-file-cache //支持文件缓存
–enable-mem-cache //支持记忆缓存
–enable-disk-cache //支持磁盘缓存
–enable-static-support
–enable-static-htpasswd
–enable-static-htdigest
–enable-static-rotatelogs
–enable-static-logresolve
–enable-static-htdbm
–enable-static-ab
–enable-static-checkgid
–disable-cgid
–disable-cgi
–disable-userdir
–with-mpm=worker // 让apache以worker方式运行
–enable-authn-dbm=shared // 对动态数据库进行操作。Rewrite时需要。
用于apr的configure脚本的选项:
可选特性
- 启用试验性质的自定义libtool
- 取消锁定(可能导致并行编译崩溃)
- 启用调试编译,仅供开发人员使用。
- 打开调试和编译时警告,仅供开发人员使用。
- 打开编译profiling(GCC)
- 打开pools调试
- 打开BeOS平台上的malloc_debug
- 在32-bit平台上禁用大文件支持(large file support)
- 若只打算在486以上的CPU上运行Apache ,那么使用该选项可以启用更加高效的基于互斥执行的原子操作。
- 启用线程支持,在线程型的MPM上必须打开它
- 禁用线程支持,如果不使用线程化的MPM ,可以关闭它以减少系统开销。
- 禁用DSO支持
- 启用可靠子进程支持
- 禁用IPv6支持
--enable-experimental-libtool--disable-libtool-lock--enable-debug--enable-maintainer-mode--enable-profile--enable-pool-debug[=yes|no|verbose|verbose-alloc|lifetime|owner|all]--enable-malloc-debug--disable-lfs--enable-nonportable-atomics--enable-threads--disable-threads--disable-dso--enable-other-child--disable-ipv6可选的额外程序包
- 指定C编译器使用 GNU ld
- 只使用 PIC/non-PIC 对象[默认为两者都使用]
- 包含额外的配置
- 指定APR编译文件的存放位置(默认值为:’${datadir}/build’)
- 禁止使用libtool连接库文件
- 指定Electric Fence的安装目录
- 强制使用sendfile(译者注:Linux2.4/2.6内核都支持)
- 使用EDG兼容的socket
- 指定随机设备[默认为:/dev/random]
--with-gnu-ld--with-pic--with-tags[=TAGS]--with-installbuilddir=DIR--without-libtool--with-efence[=DIR]--with-sendfile--with-egd[=DIR]--with-devrandom[=DEV]用于apr-util的configure脚本的选项:
可选的额外程序包
- 指定APR的安装目录(–prefix选项值或apr-config的路径)
- ldap包含文件目录(带结尾斜线)
- ldap库文件路径
- 使用的ldap库
- 选择使用的DBM类型DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44}
- 指定GDBM的位置
- 指定NDBM的位置
- 指定Berkeley DB的位置
- 指定PostgreSQL的位置
- 参看INSTALL.MySQL文件的内容
- 指定sqlite3的位置
- 指定sqlite2的位置
- 指定Expat的位置或’builtin’
- iconv的安装目录
--with-apr=PATH--with-ldap-include=PATH--with-ldap-lib=PATH--with-ldap=library--with-dbm=DBM--with-gdbm=PATH--with-ndbm=PATH--with-berkeley-db=PATH--with-pgsql=PATH--with-mysql=PATH--with-sqlite3=PATH--with-sqlite2=PATH--with-expat=PATH--with-iconv=PATH
本文详细介绍了在Linux环境下手工编译Apache时常用的配置参数及其作用,包括安装路径、模块支持等,并提供了更多高级配置选项说明。
1272

被折叠的 条评论
为什么被折叠?



