Mercurial > hg > nginx-site
annotate xml/en/docs/howto_build_on_win32.xml @ 1365:7682146b3051
Updated with Netcraft November 2014 Web Server Survey stats.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Sat, 22 Nov 2014 01:38:18 +0300 |
parents | ec68c9ae35bf |
children | 153a99d25210 |
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 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
5 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
6 |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
7 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
8 |
853
d1446e47d17d
Unified on the look of titles.
Ruslan Ermilov <ru@nginx.com>
parents:
700
diff
changeset
|
9 <article name="Building nginx on the Win32 platform with Visual C" |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
10 link="/en/docs/howto_build_on_win32.html" |
589 | 11 lang="en" |
12 rev="1"> | |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
13 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
14 <section name="Prerequisites"> |
113
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 <para> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
17 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
|
18 |
461 | 19 <list type="bullet"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
20 |
461 | 21 <listitem> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
22 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
|
23 8 and 10 are known to work. |
461 | 24 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
25 |
461 | 26 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
27 <link url="http://www.mingw.org/wiki/MSYS">MSYS</link>. |
461 | 28 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
29 |
461 | 30 <listitem> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
31 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
|
32 For example <link url="http://www.activestate.com/activeperl">ActivePerl</link> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
33 or <link url="http://strawberryperl.com">Strawberry Perl</link>. |
461 | 34 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
35 |
461 | 36 <listitem> |
890 | 37 <link url="http://mercurial.selenic.com/">Mercurial</link> client. |
461 | 38 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
39 |
461 | 40 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
41 <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
|
42 and <link url="http://www.openssl.org">OpenSSL</link> libraries sources. |
461 | 43 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
44 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
45 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
46 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
47 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
48 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
49 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
50 <section id="build_steps" |
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
51 name="Build steps"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
52 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
53 <para> |
889
675f5c67b45c
Source code repository switch to Mercurial.
Maxim Dounin <mdounin@mdounin.ru>
parents:
859
diff
changeset
|
54 Ensure that paths to Perl, Mercurial and MSYS bin directories are added to |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
55 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
|
56 run vcvarsall.bat script from Visual C directory. |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
57 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
58 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
59 <para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
60 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
61 To build nginx: |
461 | 62 <list type="bullet"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
63 |
461 | 64 <listitem> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
65 Start MSYS bash. |
461 | 66 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
67 |
461 | 68 <listitem> |
889
675f5c67b45c
Source code repository switch to Mercurial.
Maxim Dounin <mdounin@mdounin.ru>
parents:
859
diff
changeset
|
69 Check out nginx sources from the hg.nginx.org repository. For example: |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
70 <programlisting> |
889
675f5c67b45c
Source code repository switch to Mercurial.
Maxim Dounin <mdounin@mdounin.ru>
parents:
859
diff
changeset
|
71 hg clone http://hg.nginx.org/nginx |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
72 </programlisting> |
461 | 73 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
74 |
461 | 75 <listitem> |
119 | 76 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
|
77 sources into lib directory: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
78 <programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
79 mkdir objs |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
80 mkdir objs/lib |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
81 cd objs/lib |
859
0ed7670778bb
Replaced "unzip" with "tar -xzf" in "Win32 build" howto.
Valentin Bartenev <vbart@nginx.com>
parents:
858
diff
changeset
|
82 tar -xzf ../../pcre-8.32.tar.gz |
858
65e75e59a714
Updated versions of external libraries and link to zlib site.
Valentin Bartenev <vbart@nginx.com>
parents:
857
diff
changeset
|
83 tar -xzf ../../zlib-1.2.7.tar.gz |
65e75e59a714
Updated versions of external libraries and link to zlib site.
Valentin Bartenev <vbart@nginx.com>
parents:
857
diff
changeset
|
84 tar -xzf ../../openssl-1.0.1e.tar.gz |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
85 </programlisting> |
461 | 86 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
87 |
461 | 88 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
89 Run configure script: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
90 <programlisting> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
91 auto/configure --with-cc=cl --builddir=objs --prefix= \ |
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
92 --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
|
93 --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
|
94 --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
|
95 --http-proxy-temp-path=temp/proxy_temp \ |
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
96 --http-fastcgi-temp-path=temp/fastcgi_temp \ |
858
65e75e59a714
Updated versions of external libraries and link to zlib site.
Valentin Bartenev <vbart@nginx.com>
parents:
857
diff
changeset
|
97 --with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs/lib/pcre-8.32 \ |
65e75e59a714
Updated versions of external libraries and link to zlib site.
Valentin Bartenev <vbart@nginx.com>
parents:
857
diff
changeset
|
98 --with-zlib=objs/lib/zlib-1.2.7 --with-openssl=objs/lib/openssl-1.0.1e \ |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
99 --with-select_module --with-http_ssl_module --with-ipv6 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
100 </programlisting> |
461 | 101 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
102 |
461 | 103 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
104 Run make: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
105 <programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
106 nmake -f objs/Makefile |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
107 </programlisting> |
461 | 108 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
109 |
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 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
112 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
113 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
114 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
115 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
116 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
117 <section id="see_also" |
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
118 name="See also"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
119 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
120 <para> |
461 | 121 <list type="bullet"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
122 |
461 | 123 <listitem> |
374
a413dffb0557
Replaced "a href" with "link doc" / "link url".
Ruslan Ermilov <ru@nginx.com>
parents:
221
diff
changeset
|
124 <link doc="windows.xml"/> |
461 | 125 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
126 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
127 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
128 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
129 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
130 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
131 </article> |