寻找 apache 构建选项
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/137181/
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
finding apache build options
提问by Matthew Watson
I need to rebuild an apache server, but the original source is no longer available. Is there any way ( command line switch to httpd? ) to get the build options which were originally used?
我需要重建一个 apache 服务器,但原始源不再可用。有没有办法(命令行切换到 httpd?)来获取最初使用的构建选项?
采纳答案by David Schlosnagle
Try -V which "Print the version and build parameters of httpd, and then exit."
尝试 -V 其中“打印httpd的版本和构建参数,然后退出。”
httpd -V
Also, you can see the options for httpd via:
此外,您可以通过以下方式查看 httpd 的选项:
httpd -h
回答by kyle
I found previous configure options in the build directory of apache root.
我在 apache root 的 build 目录中找到了以前的配置选项。
I'm a Centos 5/6 user.
我是 Centos 5/6 用户。
Apache ver. is 2.2.27.
阿帕奇版。是 2.2.27。
apachedir/build/config.nice
apachedir/build/config.nice
#! /bin/sh
#
# Created by configure
"./configure" \
"--prefix=/usr/local/apache2" \
"--enable-so" \
"--enable-mods-shared=most" \
"--enable-ssl" \
"--with-mpm=worker" \
"--enable-cgi" \
"$@"
回答by babyromeo
I re-compiled apache 2.4.3 recently and change the MPM from worker to prefork, what you have to do if you still keep your original compiled directory without ran "make distclean" (if you ran "make clean" it still OK). You can use the SAME configure option to re-configure by exec ./config.status or you can find and copy './configure' from ./config.status (yes, all the original options that you used to run configure still there).
我最近重新编译了 apache 2.4.3 并将 MPM 从 worker 更改为 prefork,如果您仍然保留原始编译目录而不运行“make distclean”(如果您运行“make clean”它仍然可以),您必须做什么。您可以使用相同的配置选项通过 exec ./config.status 重新配置,或者您可以从 ./config.status 中找到并复制“./configure”(是的,您用于运行配置的所有原始选项仍然存在)。
Here is part of my config.status...
这是我的 config.status 的一部分...
if $ac_cs_silent; then
exec 6>/dev/null
ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
if $ac_cs_recheck; then
set X /bin/sh **'./configure' '--enable-file-cache' '--enable-cache' '--enable-disk-cache' '--enable-mem-cache' '--enable-deflate' '--enable-expires' '--enable-headers' '--enable-usertrack' '--enable-cgi' '--enable-vhost-alias' '--enable-rewrite' '--enable-so' '--with-apr=/usr/local/apache/' '--with-apr-util=/usr/local/apache/' '--prefix=/usr/local/apache' '--with-mpm=worker' '--with-mysql=/var/lib/mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--enable-mods-shared=most' '--enable-ssl' 'CFLAGS=-Wall -O3 -ffast-math -frename-registers -mtune=corei7-avx' '--enable-modules=all' '--enable-proxy' '--enable-proxy-fcgi'** $ac_configure_extra_args --no-create --no-recursion
shift
$as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
CONFIG_SHELL='/bin/sh'
export CONFIG_SHELL
exec "$@"
fi

