Apache - 如何将单个和/或所有模块构建为共享模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37069/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Apache - how do I build individual and/or all modules as shared modules
提问by Brian Lyttle
On Mac OS X 10.5 I downloaded the latest version of Apache 2.2.9. After the usual configure, make, make install dance I had a build of apache without mod_rewrite. This wasn't statically linked and the module was not built in the /modules folder either.
在 Mac OS X 10.5 上,我下载了最新版本的 Apache 2.2.9。在通常的配置、制作、制作安装舞蹈之后,我构建了一个没有 mod_rewrite 的 apache。这不是静态链接的,模块也没有构建在 /modules 文件夹中。
I had to do the following to build Apache and mod_rewrite:
我必须执行以下操作来构建 Apache 和 mod_rewrite:
./configure --prefix=/usr/local/apache2 --enable-rewrite=shared
- Is there a way to tell Apache to build all modules as Shared Modules (DSOs) so I can control loading from the Apache config?
- Now that I have built Apache and the mod_rewrite DSO, how can I build another shared module without building all of Apache?
- 有没有办法告诉 Apache 将所有模块构建为共享模块 (DSO),以便我可以控制从 Apache 配置加载?
- 现在我已经构建了 Apache 和 mod_rewrite DSO,如何在不构建所有 Apache 的情况下构建另一个共享模块?
(The last time I built Apache (2.2.8) on Solaris, by default it built everything as a shared module.)
(我上次在 Solaris 上构建 Apache (2.2.8) 时,默认情况下它将所有内容构建为共享模块。)
回答by Brendan
Try the ./configureoption --enable-mods-shared="all", or --enable-mods-shared="<list of modules>"to compile modules as shared objects. See further details in Apache 2.2 docs
试试这个./configure选项--enable-mods-shared="all",或者 --enable-mods-shared="<list of modules>"将模块编译为共享对象。在 Apache 2.2 文档中查看更多详细信息
To just compile Apache with the ability to load shared objects (and add modules later), use --enable-so, then consult the documentation on compiling modules seperately in the Apache 2.2. DSO docs.
要仅编译具有加载共享对象(并稍后添加模块)的能力的 Apache,请使用--enable-so,然后查阅有关在Apache 2.2 中单独编译模块的文档。DSO 文档。
回答by so_mv
./configure --prefix=/usr/local/apache2 --enable-mods-shared="all" --enable-proxy=shared
To get rewrite, proxy and bunch of other modules, I used the above command. In my previous installation, using --enable-mods-shared="all" compiled/installed the proxy module as well. But in v2.2.22"all" did not include the proxy module.
为了获得重写、代理和一堆其他模块,我使用了上面的命令。在我之前的安装中,也使用 --enable-mods-shared="all" 编译/安装了代理模块。但是在v2.2.22“all”中没有包含代理模块。

