diff xml/cn/docs/windows.xml @ 558:149f54c158f0

Added initial translation in simplified Chinese submitted by the Server Platforms Team at Taobao.com.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 28 Jun 2012 10:27:07 +0000
parents
children 9934338f83af
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/cn/docs/windows.xml	Thu Jun 28 10:27:07 2012 +0000
@@ -0,0 +1,121 @@
+<!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
+
+<article name="nginx Windows版使用说明"
+         link="/cn/docs/windows.html"
+         lang="cn">
+
+
+<section>
+
+<para>
+nginx的Windows版本使用原生Win32 API(非Cygwin模拟层)。当前nginx/Windows只使用<i>select</i>作为通知方法,所以不要期待它有很高的性能和扩展性。鉴于这点和一些已知问题,nginx/Windows目前还处于<i>beta</i>阶段。nginx/Windows和Unix版本相比,功能几乎已经齐全,除了XSLT过滤器、图像过滤器、GeoIP模块和嵌入Perl语言支持以外。
+</para>
+
+<para>
+安装nginx/Windows,需要<link doc="../download.xml">下载</link>最新的<development_version />开发版本,因为开发分支上包含了所有已知的问题修复,尤其是针对Windows版本的问题修复。解压缩下载得到的zip文件,进入nginx-<development_version />目录,运行nginx。下面给出一个在C盘根目录下安装的例子:
+
+<programlisting>
+cd c:\
+unzip nginx-<development_version />.zip
+cd nginx-<development_version />
+start nginx
+</programlisting>
+
+可以在命令行运行<command>tasklist</command>命令来查看nginx进程:
+
+<programlisting>
+C:\nginx-<development_version />&gt;tasklist /fi "imagename eq nginx.exe"
+
+Image Name           PID Session Name     Session#    Mem Usage
+=============== ======== ============== ========== ============
+nginx.exe            652 Console                 0      2 780 K
+nginx.exe           1332 Console                 0      3 112 K
+</programlisting>
+
+其中一个是主进程,另一个是工作进程。如果nginx没有启动,请查看<path>logs\error.log</path>文件以寻找失败原因。如果日志文件不存在,那失败原因会记录在Windows事件日志中。如果某次请求没有展示预想的页面,而是展示了错误页面,也请查看<path>logs\error.log</path>文件。
+</para>
+
+<para>
+nginx/Windows使用工作目录作为前缀将配置文件中设置的相对目录补齐。就上面安装的例子而言,工作目录应该是<path>C:\nginx-<development_version />\</path>(工作目录基本上与运行文件所在的目录相同)。配置文件中的目录请使用“/”,而不是“\”做目录分隔:
+
+<programlisting>
+access_log   logs/site.log;
+root         C:/web/html;
+</programlisting>
+</para>
+
+<para>
+nginx/Windows作为标准控制台应用运行,而不是系统服务。可以用下面的命令控制:
+
+<table note="yes">
+
+<tr>
+<td width="20%">nginx -s stop</td>
+<td>快速退出</td>
+</tr>
+
+<tr>
+<td>nginx -s quit</td>
+<td>优雅退出</td>
+</tr>
+
+<tr>
+<td>nginx -s reload</td>
+<td>
+更换配置,启动新的工作进程,优雅的关闭以往的工作进程
+</td>
+</tr>
+
+<tr>
+<td>nginx -s reopen</td>
+<td>重新打开日志文件</td>
+</tr>
+
+</table>
+</para>
+
+</section>
+
+<section id="known_issues"
+        name="已知问题">
+
+<list type="bullet">
+
+<listitem>
+虽然可以启动若干工作进程运行,实际上只有一个进程在处理请求所有请求。
+</listitem>
+
+<listitem>
+一个工作进程只能处理不超过1024个并发连接。
+</listitem>
+
+<listitem>
+缓存和其他需要共享内存支持的模块在Windows Vista及后续版本的操作系统中无法工作,因为在这些操作系统中,地址空间的布局是随机的。
+</listitem>
+
+</list>
+
+</section>
+
+<section id="possible_future_enhancements"
+        name="日后可能加强的功能">
+
+<list type="bullet">
+
+<listitem>
+作为系统服务运行。
+</listitem>
+
+<listitem>
+使用“I/O完成端口”作为事件模型。
+</listitem>
+
+<listitem>
+使用单工作进程多线程的模型。
+</listitem>
+
+</list>
+
+</section>
+
+</article>