⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.html

📁 这个是我在web培训时老师提供的手册
💻 HTML
📖 第 1 页 / 共 3 页
字号:

    <h3><a name="otheroptfeat" id="otheroptfeat">杂项选项</a></h3>
      <dl>
        <dt><code>--enable-nonportable-atomics</code></dt>
        <dd>若只打算在486以上的CPU上运行Apache ,那么使用该选项可以启用更加高效的基于互斥执行的<a href="../misc/perf-tuning.html#atomics">原子操作</a>。</dd>

        <dt><code>--enable-v4-mapped</code></dt>
        <dd>使用相同的套接字同时处理IPv4和IPv6的连接,也就是启用地址映射。在FreeBSD、NetBSD、OpenBSD以外的平台上是默认值。</dd>

        <dt><code>--disable-v4-mapped</code></dt>
        <dd>使用不同的套接字分别处理IPv4和IPv6的连接,也就是禁用地址映射。在FreeBSD、NetBSD、OpenBSD上是默认值。</dd>

        <dt><code>--enable-maintainer-mode</code></dt>
        <dd>使用所有警告和调试符号编译源代码,请勿用于正式服务器,它会影响性能。</dd>

        <dt><code>--enable-exception-hook</code></dt>
        <dd>允许在子进程崩溃以后启用一个钩子来运行异常处理程序。参见<code class="directive"><a href="../mod/mpm_common.html#EnableExceptionHook">EnableExceptionHook</a></code>指令</dd>

        <dt><code>--with-port=<var>PORT</var></code></dt>
        <dd>设定<code class="program"><a href="../programs/httpd.html">httpd</a></code>的默认的监听端口[默认为:<var>80</var>],该值仅在生成默认配置文件<code>httpd.conf</code>时使用。</dd>

        <dt><code>--with-program-name=<var>NAME</var></code></dt>
        <dd>指定可执行程序的名字[默认为:<code>httpd</code>],若使用此选项则默认配置文件的名字将同时变成"<var>NAME</var>.conf"。</dd>
      </dl>

  <h3><a name="aproptfeat" id="aproptfeat">传递给<code>apr-config</code>脚本的选项</a></h3>
  <p>译者注:<em>下述三个选项并未出现在官方手册中,译者不保证其真实性,译者本人亦未使用过,仅供有兴趣的玩家参考。</em></p>
    <dl>
      <dt><code>--disable-threads</code></dt>
      <dd>禁用线程支持,如果不使用线程化的MPM ,可以关闭它以减少系统开销。</dd>
      <dt><code>--disable-ipv6</code></dt>
      <dd>禁用IPv6支持</dd>
      <dt><code>--disable-dso</code></dt>
      <dd>禁用DSO支持</dd>
    </dl>

  <h3><a name="packages" id="packages">特殊程序包选项</a></h3>
    <p>这些指令用于定义特殊程序包相关的选项。</p>

      <dl>
        <dt><code>--with-apr=<var>DIR</var>|<var>FILE</var></code></dt>
        <dd><a class="glossarylink" href="../glossary.html#apr" title="see glossary">Apache可移植运行时(APR)</a>是httpd源码的一部分并会自动与httpd一起创建。如果你想使用一个已经存在的APR ,就必须在这里指定<code>apr-config</code>脚本的路径。可以使用此脚本的绝对路径或已有的APR安装目录(<code>apr-config</code>必须位于此目录或者其下的"<code>bin</code>"子目录中)。</dd>
        
        <dt><code>--with-apr-util=<var>DIR</var>|<var>FILE</var></code></dt>
        <dd>Apache可移植运行时工具包(APU)是httpd源码的一部分并会自动与httpd一起创建。如果你想使用一个已经存在的APU ,就必须在这里指定<code>apu-config</code>脚本的路径。可以使用此脚本的绝对路径或已有的APU安装目录(<code>apu-config</code>必须位于此目录或者其下的"<code>bin</code>"子目录中)。</dd>

        <dt><code>--with-ssl=<var>DIR</var></code></dt>
        <dd>如果启用了<code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> ,<code>configure</code>脚本将会自动搜寻已经安装的OpenSSL ,你可以在这里指定SSL/TLS工具包的安装路径。</dd>

        <dt><code>--with-z=<var>DIR</var></code></dt>
        <dd>如果你启用了压缩模块(比如<code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code>),<code>configure</code>脚本将会自动搜寻已经安装的<code>zlib</code>库,你可以在这里指定它的安装路径。</dd>

        <dt><code>--with-perl=<var>DIR</var></code></dt>
        <dd>有些用Perl写的支持脚本,如<code class="program"><a href="../programs/apxs.html">apxs</a></code>或<code class="program"><a href="../programs/dbmmanage.html">dbmmanage</a></code> ,需要Perl5解释器(5.003或以上的版本就足够了)。如果系统中存在多个Perl解释器,比如有系统提供的Perl 4 ,还有你自己安装的Perl 5 ,推荐你使用该选项来指定正确的版本。如果没有Perl 5也没关系,这并不影响Apache httpd的编译和安装,只是相关的支持脚本不能使用而已。</dd>

        <dt><code>--with-pcre=<var>DIR</var></code></dt>
        <dd>5.0版的Perl兼容正则表达式库(PCRE)已经被包含进来了,如果你想使用系统中已经安装好的PCRE ,就可以在这里指定其安装路径。</dd>

		<dt><code>--with-ldap=<var>DIR</var></code></dt>
		<dd>一些Apache模块,比如<code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code>和<code class="module"><a href="../mod/mod_authnz_ldap.html">mod_authnz_ldap</a></code>需要APU支持LDAP(默认并不支持),只要使用其中之一,就要使用该选项指定LDAP的安装路径。</dd>
      </dl>

      <p>一些Apache模块,比如<code class="module"><a href="../mod/mod_authn_dbm.html">mod_authn_dbm</a></code>和<code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>需要使用DBM数据库,APU中已经包含了SDBM ,所以这个数据库总是可用的。如果你想使用其他类型的数据库,就要使用以下选项:</p>
        
      <dl>
        <dt><code>--with-gdbm[=<var>path</var>]</code></dt>
        <dd>使用GNU DBM代替SDBM;如果不指定<var>path</var> ,则<code>configure</code>脚本将会在默认路径上搜索GNU DBM的包含文件和库的位置。如果指定<var>path</var> ,则<code>configure</code>脚本会在<code><var>path</var>/lib</code>和<code><var>path</var>/include</code>目录中搜索GNU DBM的包含文件和库。还可以使用"<var>inc-path:lib-path</var>"的形式分别指定GNU DBM的包含文件和库的位置。</dd>
          
        <dt><code>--with-ndbm[=<var>path</var>]</code></dt>
        <dd>使用New DBM代替SDBM;如果不指定<var>path</var> ,则<code>configure</code>脚本将会在默认路径上搜索New DBM的包含文件和库的位置。如果指定<var>path</var> ,则<code>configure</code>脚本会在<code><var>path</var>/lib</code>和<code><var>path</var>/include</code>目录中搜索New DBM的包含文件和库。还可以使用"<var>inc-path:lib-path</var>"的形式分别指定New DBM的包含文件和库的位置。</dd>
        
        <dt><code>--with-berkeley-db[=<var>path</var>]</code></dt>
        <dd>使用Berkeley DB代替SDBM;如果不指定<var>path</var> ,则<code>configure</code>脚本将会在默认路径上搜索Berkeley DB的包含文件和库的位置。如果指定<var>path</var> ,则<code>configure</code>脚本会在<code><var>path</var>/lib</code>和<code><var>path</var>/include</code>目录中搜索Berkeley DB的包含文件和库。还可以使用"<var>inc-path:lib-path</var>"的形式分别指定Berkeley DB的包含文件和库的位置。</dd>
      </dl>

      <div class="note"><h3>注意</h3>
        <p>DBM数据库选项是由APU提供并传递给APU配置脚本的。所以如果使用 <code>--with-apr-util</code> 指定一个已安装的APU来代替,那么这些选项便无效。你可以同时使用几种不同的DBM实现,然后使用运行时配置动态选择其中之一。</p>
      </div>

  <h3><a name="supportopt" id="supportopt">支持程序选项</a></h3>
    <dl>
      <dt><code>--enable-static-support</code></dt>
      <dd>使用静态连接(默认为动态连接)编译所有二进制支持程序。若不使用该选项也可以使用下面的选项分别指定每个支持程序:</dd>
      <dt><code>--enable-static-ab</code></dt>
      <dd>使用静态连接编译<code class="program"><a href="../programs/ab.html">ab</a></code></dd>
      <dt><code>--enable-static-checkgid</code></dt>
      <dd>使用静态连接编译<code>checkgid</code></dd>
      <dt><code>--enable-static-htdbm</code></dt>
      <dd>使用静态连接编译<code class="program"><a href="../programs/htdbm.html">htdbm</a></code></dd>
      <dt><code>--enable-static-htdigest</code></dt>
      <dd>使用静态连接编译<code class="program"><a href="../programs/htdigest.html">htdigest</a></code></dd>
      <dt><code>--enable-static-htpasswd</code></dt>
      <dd>使用静态连接编译<code class="program"><a href="../programs/htpasswd.html">htpasswd</a></code></dd>
      <dt><code>--enable-static-logresolve</code></dt>
      <dd>使用静态连接编译<code class="program"><a href="../programs/logresolve.html">logresolve</a></code></dd>
      <dt><code>--enable-static-rotatelogs</code></dt>
      <dd>使用静态连接编译<code class="program"><a href="../programs/rotatelogs.html">rotatelogs</a></code></dd>
    </dl>

    <h4><a name="suexec" id="suexec">suexec配置选项</a></h4>
      <dl>
        <dt><code>--enable-suexec</code></dt>
        <dd>使用这个选项以启用<code class="program"><a href="../programs/suexec.html">suexec</a></code> ,它可以允许你为CGI程序指定uid和gid 。<strong>如果你不精通suexec的工作机制,请不要使用它!</strong></dd>
      </dl>
	  <p>仅在启用了上述选项的情况下,才可以使用以下选项微调<code class="program"><a href="../programs/suexec.html">suexec</a></code>的各种特性。方括号"[]"内是默认值。参见<a href="../suexec.html#install">配置和安装suEXEC</a>以获得更多信息。</p>
      <dl>
        <dt><code>--with-suexec-bin</code></dt>
        <dd><code class="program"><a href="../programs/suexec.html">suexec</a></code>二进制文件目录[<code>--sbindir</code>]</dd>
        <dt><code>--with-suexec-caller</code></dt>
        <dd>允许调用<code class="program"><a href="../programs/suexec.html">suexec</a></code>的用户,必须和运行<code class="program"><a href="../programs/httpd.html">httpd</a></code>子进程的用户相同。</dd>
        <dt><code>--with-suexec-docroot</code></dt>
        <dd>允许<code class="program"><a href="../programs/suexec.html">suexec</a></code>对其中的文件具有执行权限的根目录[<code>--datadir/htdocs</code>]</dd>
        <dt><code>--with-suexec-gidmin</code></dt>
        <dd>允许执行<code class="program"><a href="../programs/suexec.html">suexec</a></code>的最小GID[100]</dd>
        <dt><code>--with-suexec-logfile</code></dt>
        <dd><code class="program"><a href="../programs/suexec.html">suexec</a></code>日志文件名[默认文件名为:<code>suexec_log</code> ,位于<code>--logfiledir</code>目录下]</dd>
        <dt><code>--with-suexec-safepath</code></dt>
        <dd>对<code class="program"><a href="../programs/suexec.html">suexec</a></code>"安全"的<code>PATH</code>环境变量的值[<code>/usr/local/bin:/usr/bin:/bin</code>]</dd>
        <dt><code>--with-suexec-userdir</code></dt>
        <dd>用户主目录下允许<code class="program"><a href="../programs/suexec.html">suexec</a></code>对其中的文件具有执行权限的子目录,仅在将<code class="program"><a href="../programs/suexec.html">suexec</a></code>和<a href="../howto/public_html.html">用户网站目录</a>(由<code class="module"><a href="../mod/mod_userdir.html">mod_userdir</a></code>提供支持)一起使用的情况下才需要设置此选项。[<code>public_html</code>]</dd>
        <dt><code>--with-suexec-uidmin</code></dt>
        <dd>允许执行<code class="program"><a href="../programs/suexec.html">suexec</a></code>的最小UID[100]</dd>
        <dt><code>--with-suexec-umask</code></dt>
        <dd><code class="program"><a href="../programs/suexec.html">suexec</a></code>进程的<code>umask</code>[取决于系统的设定]</dd>
      </dl>

</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="env" id="env">环境变量</a></h2>
  <p>可以通过指定某些环境变量来修改<code>configure</code>脚本的默认选择,或者帮助<code>configure</code>脚本找到名字和/或位置不标准的库和程序。</p>

  
  <dl>
    <dt><code>CC</code></dt>
    <dd>C编译器</dd>

    <dt><code>CFLAGS</code></dt>
    <dd>C编译器的flags</dd>

    <dt><code>CPP</code></dt>
    <dd>C预处理程序</dd>

    <dt><code>CPPFLAGS</code></dt>
    <dd>C/C++预处理程序flags,比如使用"<code>-I<var>includedir</var></code>"指定一个非标准的头文件目录<var>includedir</var> 。</dd>

    <dt><code>LDFLAGS</code></dt>
    <dd>连接器flags,比如使用"-L<code>-L<var>libdir</var></code>"指定一个非标准的库文件目录<var>libdir</var> 。</dd> 
  </dl>
</div></div>
<div id="footer">
<p class="apache">本文允许自由使用、分发、转载,但必须保留译者署名;详见:<a href="../translator_announcement.html#announcement">译者声明</a>。</p>
<p class="menu"><a href="../mod/index.html">模块索引</a> | <a href="../mod/directives.html">指令索引</a> | <a href="../faq/index.html">常见问题</a> | <a href="../glossary.html">词汇表</a> | <a href="../sitemap.html">站点导航</a></p></div>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -