Mercurial > hg > nginx-site
annotate xml/en/docs/howto_build_on_win32.xml @ 441:0b6333a9f8af
Netcraft published its March 2012 Web Server Survey.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 05 Mar 2012 15:43:52 +0000 |
parents | a413dffb0557 |
children | 6135f3c95bf6 |
rev | line source |
---|---|
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
2 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
3 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
4 |
123
7db449e89e92
Unified the use of the "name" attribute instead of "title".
Ruslan Ermilov <ru@nginx.com>
parents:
121
diff
changeset
|
5 <article name="How to build nginx on the Win32 Platform with Visual C" |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
6 link="/en/docs/howto_build_on_win32.html" |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
7 lang="en"> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
8 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
9 <section name="Prerequisites"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
10 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
11 <para> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
12 To build nginx on the <registered>Microsoft Win32</registered> platform you need: |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
13 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
14 <list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
15 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
16 <item> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
17 Microsoft Visual C compiler. <registered>Microsoft Visual Studio</registered> |
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
18 8 and 10 are known to work. |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
19 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
20 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
21 <item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
22 <link url="http://www.mingw.org/wiki/MSYS">MSYS</link>. |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
23 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
24 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
25 <item> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
26 Perl, if you want to build <registered>OpenSSL</registered> and nginx with SSL support. |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
27 For example <link url="http://www.activestate.com/activeperl">ActivePerl</link> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
28 or <link url="http://strawberryperl.com">Strawberry Perl</link>. |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
29 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
30 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
31 <item> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
32 <registered>Subversion</registered> client. Choose any from the |
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
33 <link url="http://subversion.apache.org/packages.html#windows">list</link> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
34 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
35 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
36 <item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
37 <link url="http://www.pcre.org">PCRE</link>, <link url="http://zlib.net">zlib</link> |
118
b2462c2e2e47
o OpenSSL, Visual Studio, Subversion, Win32 are trademarks.
Maxim Konovalov <maxim@nginx.com>
parents:
117
diff
changeset
|
38 and <link url="http://www.openssl.org">OpenSSL</link> libraries sources. |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
39 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
40 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
41 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
42 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
43 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
44 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
45 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
46 <section id="build_steps" |
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
47 name="Build steps"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
48 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
49 <para> |
115 | 50 Ensure that paths to Perl, Subversion and MSYS bin directories are added to |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
51 PATH environment variable before you start build. To set Visual C environment |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
52 run vcvarsall.bat script from Visual C directory. |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
53 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
54 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
55 <para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
56 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
57 To build nginx: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
58 <list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
59 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
60 <item> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
61 Start MSYS bash. |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
62 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
63 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
64 <item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
65 Check out nginx sources from the svn.nginx.org repository. For example: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
66 <programlisting> |
115 | 67 svn co svn://svn.nginx.org/tags/release-1.1.6 |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
68 </programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
69 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
70 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
71 <item> |
119 | 72 Create a build and lib directories, and unpack zlib, PCRE and OpenSSL libraries |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
73 sources into lib directory: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
74 <programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
75 mkdir objs |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
76 mkdir objs/lib |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
77 cd objs/lib |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
78 unzip ../../pcre-8.12.zip |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
79 tar -xzf ../../zlib-1.2.5.tar.gz |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
80 tar -xzf ../../openssl-1.0.0e.tar.gz |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
81 </programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
82 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
83 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
84 <item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
85 Run configure script: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
86 <programlisting> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
87 auto/configure --with-cc=cl --builddir=objs --prefix= \ |
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
88 --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid \ |
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
89 --http-log-path=logs/access.log --error-log-path=logs/error.log \ |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
90 --sbin-path=nginx.exe --http-client-body-temp-path=temp/client_body_temp \ |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
91 --http-proxy-temp-path=temp/proxy_temp \ |
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
92 --http-fastcgi-temp-path=temp/fastcgi_temp \ |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
93 --with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs/lib/pcre-8.12 \ |
221 | 94 --with-zlib=objs/lib/zlib-1.2.5 --with-openssl=objs/lib/openssl-1.0.0e \ |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
95 --with-select_module --with-http_ssl_module --with-ipv6 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
96 </programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
97 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
98 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
99 <item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
100 Run make: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
101 <programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
102 nmake -f objs/Makefile |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
103 </programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
104 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
105 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
106 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
107 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
108 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
109 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
110 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
111 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
112 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
113 <section id="see_also" |
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
114 name="See also"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
115 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
116 <para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
117 <list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
118 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
119 <item> |
374
a413dffb0557
Replaced "a href" with "link doc" / "link url".
Ruslan Ermilov <ru@nginx.com>
parents:
221
diff
changeset
|
120 <link doc="windows.xml"/> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
121 </item> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
122 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
123 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
124 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
125 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
126 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
127 </article> |