📄 upgrading.html
字号:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="Apache, 中文, 手册, 中文版, 中文手册, 中文版手册, 参考手册, 中文参考手册, 金步国" />
<meta name="description" content="Apache 2.2 中文版参考手册" />
<meta name="author" content="金步国" />
<link href="./style/css/manual-zip.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="./style/css/manual-zip-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
<title>从2.0升级到2.2 - Apache 2.2 中文版参考手册</title>
</head>
<body id="manual-page">
<div id="page-header"><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><p class="apache">Apache HTTP Server 版本2.2</p><img alt="" src="./images/feather.gif" /></div>
<div class="up"><a href="./index.html"><img title="<-" alt="<-" src="./images/left.gif" /></a></div>
<div id="path"><a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">文档</a> > <a href="./index.html">版本2.2</a></div>
<div id="translation-info"> <a href="./translator_announcement.html#thanks">致谢</a> | <a href="./translator_announcement.html#announcement">译者声明</a> | 本篇译者:<a href="mailto:csfrank@citiz.net">金步国</a> | 本篇译稿最后更新:2006年1月7日 | <a href="./translator_announcement.html#last_new">获取最新版本</a></div>
<div id="page-content"><div id="preamble"><h1>从2.0升级到2.2</h1>
<p>为了帮助大伙儿升级,我们为现在的Apache用户提供了一份重要信息的文档说明。这些只是一些简要说明,你可以从<a href="new_features_2_2.html">新特性</a>文档或<code>src/CHANGES</code>文件中得到更多信息。</p>
<p>这篇文档仅仅描述了从版本 2.0 到 2.2 的变化,如果你是从1.3版进行升级的,请查考<a href="upgrading13to20.html">从1.3升级到2.0</a>文档。</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="compile-time" id="compile-time">编译时配置的改变</a></h2>
<p>编译过程与2.0版本非常相似,你曾经使用过的<code>configure</code>命令行(在安装目录下的<code>build/config.nice</code>文件中)在某些情况下仍然可以使用。主要是模块的名称变化了,特别是认证和授权模块。具体如下:</p>
<ul>
<li>mod_imap 被更名为 <code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li>
<li>mod_auth 被拆分为 <code class="module"><a href="./mod/mod_auth_basic.html">mod_auth_basic</a></code>、<code class="module"><a href="./mod/mod_authn_file.html">mod_authn_file</a></code>、<code class="module"><a href="./mod/mod_authz_user.html">mod_authz_user</a></code>、<code class="module"><a href="./mod/mod_authz_groupfile.html">mod_authz_groupfile</a></code></li>
<li>mod_access 被更名为 <code class="module"><a href="./mod/mod_authz_host.html">mod_authz_host</a></code></li>
<li>mod_auth_ldap 被更名为 <code class="module"><a href="./mod/mod_authnz_ldap.html">mod_authnz_ldap</a></code></li>
<li>需要使用 APR 1.0 API</li>
<li>将内置的PCRE升级到5.0版本</li>
</ul>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="run-time" id="run-time">运行时配置的改变</a></h2>
<p>除了下面讨论的某些特定配置需要进行很小的调整以外,现存的2.0版本的配置文件和启动脚本基本上不需要修改就可以直接用在2.2版本中。另外,如果你使用<code class="directive"><a href="./mod/mod_so.html#loadmodule">LoadModule</a></code>动态加载了标准模块。你还需要根据上面提到的模块名变更情况适当修改原有配置文件。</p>
<p>如果你选择使用新的2.2版默认配置文件,你将会发现它已经删除了绝大多数不属于基本配置的指令,比以前大大简化了。在安装目录下的<code>conf/extra/</code>子目录中,有一组包含许多高级特性的示例配置。默认的配置文件被安装在<code>conf/original</code>子目录中。</p>
<p>一些需要注意的运行时配置更改:</p>
<ul>
<li><code class="program"><a href="./programs/apachectl.html">apachectl</a></code>选项<code>startssl</code>被取消了。要启用SSL支持,你必须编辑<code>httpd.conf</code>文件,在其中包含与<code class="module"><a href="./mod/mod_ssl.html">mod_ssl</a></code>相关的指令,然后使用 <code>apachectl start</code> 命令启动服务器。我们提供了一个示范如何启用<code class="module"><a href="./mod/mod_ssl.html">mod_ssl</a></code>的配置文件:<code>conf/extra/httpd-ssl.conf</code> 。</li>
<li>现在,<code class="directive"><a href="./mod/core.html#usecanonicalname">UseCanonicalName</a></code>的默认值是 <code>Off</code> 。如果原来的配置文件中没有使用这个指令,你可以在其中添加 <code>UseCanonicalName On</code> 以保持和原来的行为相同。</li>
<li>除非明确使用<code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code>指令在配置文件中指定了一个目录,否则,<code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code>模块将不会被激活。若想恢复到与原来默认行为相同,你必须在配置文件中添加一行"<code>UserDir public_html</code>"。</li>
</ul>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="misc" id="misc">杂项变化</a></h2>
<ul>
<li><code class="module"><a href="./mod/mod_cache.html">mod_cache</a></code>原来在2.0中是试验模块,现在变成标准模块了。</li>
<li><code class="module"><a href="./mod/mod_disk_cache.html">mod_disk_cache</a></code>原来在2.0中是试验模块,现在变成标准模块了。</li>
<li><code class="module"><a href="./mod/mod_mem_cache.html">mod_mem_cache</a></code>原来在2.0中是试验模块,现在变成标准模块了。</li>
<li><code class="module"><a href="./mod/mod_charset_lite.html">mod_charset_lite</a></code>原来在2.0中是试验模块,现在变成标准模块了。</li>
<li><code class="module"><a href="./mod/mod_dumpio.html">mod_dumpio</a></code>原来在2.0中是试验模块,现在变成标准模块了。</li>
</ul>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="third-party" id="third-party">第三方模块</a></h2>
<p>大多数2.0版本的第三方模块可以不加修改的运行于2.2版本中。但是这些模块必须要重新进行编译后才能使用。</p>
</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 + -