题
我需要重建一个apache服务器,但原始源不再可用。有没有办法(命令行切换到httpd?)来获取最初使用的构建选项?
解决方案
尝试-V“打印httpd的版本和构建参数,然后退出。”
httpd -V
此外,您可以通过以下方式查看httpd的选项:
httpd -h
其他提示
我在apache root的build目录中找到了以前的configure选项。
我是Centos 5/6用户。
Apache ver。是2.2.27。
apachedir /建造/的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" \
"$@"
我最近重新编译了apache 2.4.3并将MPM从worker更改为prefork,如果仍然保留原始编译目录而不运行“make distclean”,那么你需要做什么? (如果你运行“make clean”,它仍然可以)。您可以使用SAME配置选项通过exec ./config.status重新配置,或者您可以从./config.status中找到并复制'./configure'(是的,您用于运行configure的所有原始选项仍然存在)。
这是我的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
不隶属于 StackOverflow