Mercurial > hg > nginx-site
comparison xml/en/docs/install.xml @ 263:be3772a799a2
English translation of "Installing nginx".
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 21 Dec 2011 09:26:46 +0000 |
parents | |
children | 06b4c1f3149d |
comparison
equal
deleted
inserted
replaced
262:676abe405aba | 263:be3772a799a2 |
---|---|
1 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> | |
2 | |
3 <article name="Installing nginx" | |
4 link="/en/docs/install.html" | |
5 lang="en"> | |
6 | |
7 <section> | |
8 | |
9 <para> | |
10 The build is configured using the <command>configure</command> command. | |
11 It defines various aspects of the system, including the methods nginx | |
12 is allowed to use for connection processing. | |
13 At the end it creates a <command>Makefile</command>. | |
14 The <command>configure</command> command supports the following parameters: | |
15 <list> | |
16 | |
17 <listitem> | |
18 <para> | |
19 <command>--prefix=<<value>path</value>></command>—defines | |
20 a directory that will keep server files. | |
21 This same directory will also be used for all relative paths set by | |
22 <command>./configure</command> (except for paths to libraries sources) | |
23 and in the <command>nginx.conf</command> configuration file. | |
24 It is set to the <command>/usr/local/nginx</command> directory by default. | |
25 </para> | |
26 </listitem> | |
27 | |
28 <listitem> | |
29 <para> | |
30 <command>--sbin-path=<<value>path</value>></command>—sets | |
31 the name of an nginx executable file. | |
32 This name is used only during installation. | |
33 By default the file is named | |
34 <command><<value>prefix</value>>/sbin/nginx</command>. | |
35 </para> | |
36 </listitem> | |
37 | |
38 <listitem> | |
39 <para> | |
40 <command>--conf-path=<<value>path</value>></command>—sets | |
41 the name of an <command>nginx.conf</command> configuration file. | |
42 If needs be, nginx can always be started with a different configuration file, | |
43 by specifying it in the command-line parameter | |
44 <nobr><command>-c <<value>file</value>></command></nobr>. | |
45 By default the file is named | |
46 <command><<value>prefix</value>>/conf/nginx.conf</command>. | |
47 </para> | |
48 </listitem> | |
49 | |
50 <listitem> | |
51 <para> | |
52 <command>--pid-path=<<value>path</value>></command>—sets | |
53 the name of an nginx.pid file that will store the process ID | |
54 of the main process. | |
55 After installation, the file name can always be changed in the | |
56 <command>nginx.conf</command> configuration file using the | |
57 <link doc="ngx_core_module.xml" id="pid"/> directive. | |
58 By default the file is named | |
59 <command><<value>prefix</value>>/logs/nginx.pid</command>. | |
60 </para> | |
61 </listitem> | |
62 | |
63 <listitem> | |
64 <para> | |
65 <command>--error-log-path=<<value>path</value>></command>—sets | |
66 the name of the primary error, warnings, and diagnostic file. | |
67 After installation, the file name can always be changed in the | |
68 <command>nginx.conf</command> configuration file using the | |
69 <link doc="ngx_core_module.xml" id="error_log"/> directive. | |
70 By default the file is named | |
71 <command><<value>prefix</value>>/logs/error.log</command>. | |
72 </para> | |
73 </listitem> | |
74 | |
75 <listitem> | |
76 <para> | |
77 <command>--http-log-path=<<value>path</value>></command>—sets | |
78 the name of the primary request log file of the HTTP server. | |
79 After installation, the file name can always be changed in the | |
80 <command>nginx.conf</command> configuration file using the | |
81 <link doc="http/ngx_http_log_module.xml" id="access_log"/> directive. | |
82 By default the file is named | |
83 <command><<value>prefix</value>>/logs/access.log</command>. | |
84 </para> | |
85 </listitem> | |
86 | |
87 <listitem> | |
88 <para> | |
89 <command>--user=<<value>name</value>></command>—sets | |
90 the name of an unprivileged user whose credentials will be used | |
91 by worker processes. | |
92 After installation, the name can always be changed in the | |
93 <command>nginx.conf</command> configuration file using the | |
94 <link doc="ngx_core_module.xml" id="user"/> directive. | |
95 The default user name is nobody. | |
96 </para> | |
97 </listitem> | |
98 | |
99 <listitem> | |
100 <para> | |
101 <command>--group=<<value>name</value>></command>—sets | |
102 the name of a group whose credentials will be used | |
103 by worker processes. | |
104 After installation, the name can always be changed in the | |
105 <command>nginx.conf</command> configuration file using the | |
106 <link doc="ngx_core_module.xml" id="user"/> directive. | |
107 By default, a group name is set to the name of an unprivileged user. | |
108 </para> | |
109 </listitem> | |
110 | |
111 <listitem> | |
112 <para> | |
113 <command>--with-select_module</command><br/> | |
114 <command>--without-select_module</command>—enables or disables | |
115 building a module that allows the server to work with the | |
116 <c-func>select</c-func> method. | |
117 This module is built automatically if the platform does not appear | |
118 to support more appropriate methods such as kqueue, epoll, rtsig, or /dev/poll. | |
119 </para> | |
120 </listitem> | |
121 | |
122 <listitem> | |
123 <para> | |
124 <command>--with-poll_module</command><br/> | |
125 <command>--without-poll_module</command>—enables or disables | |
126 building a module that allows the server to work with the | |
127 <c-func>poll</c-func> method. | |
128 This module is built automatically if the platform does not appear | |
129 to support more appropriate methods such as kqueue, epoll, rtsig, or /dev/poll. | |
130 </para> | |
131 </listitem> | |
132 | |
133 <listitem> | |
134 <para> | |
135 <command>--without-http_gzip_module</command>—disables building a module | |
136 that <link doc="http/ngx_http_gzip_module.xml">compresses responses</link> | |
137 of an HTTP server. | |
138 The zlib library is required to build and run this module. | |
139 </para> | |
140 </listitem> | |
141 | |
142 <listitem> | |
143 <para> | |
144 <command>--without-http_rewrite_module</command>—disables building a | |
145 module that allows an HTTP server to | |
146 <link doc="http/ngx_http_rewrite_module.xml">redirect requests and change URI | |
147 of requests</link>. | |
148 The PCRE library is required to build and run this module. | |
149 The module is experimental—its directives may change in the future. | |
150 </para> | |
151 </listitem> | |
152 | |
153 <listitem> | |
154 <para> | |
155 <command>--without-http_proxy_module</command>—disables building an | |
156 HTTP server <link doc="http/ngx_http_proxy_module.xml">proxying module</link>. | |
157 <!-- | |
158 The MD5 library is required to build and run this module. | |
159 --> | |
160 </para> | |
161 </listitem> | |
162 | |
163 <listitem> | |
164 <para> | |
165 <command>--with-http_ssl_module</command>—enables building a module | |
166 that adds the <link doc="http/ngx_http_ssl_module.xml">HTTPS protocol | |
167 support</link> to an HTTP server. | |
168 This module is not built by default. | |
169 The OpenSSL library is required to build and run this module. | |
170 </para> | |
171 </listitem> | |
172 | |
173 <listitem> | |
174 <para> | |
175 <command>--with-pcre=<<value>путь</value>></command>—sets | |
176 the path to the sources of the PCRE library. | |
177 The library distribution (version | |
178 4.4—6.1) needs to be downloaded from the | |
179 <link url="http://www.pcre.org">PCRE</link> site and extracted. | |
180 The rest is done by nginx's ./configure and make. | |
181 The library is required for regular expressions support in the | |
182 <link doc="http/ngx_http_core_module.xml" id="location"/> directive | |
183 and for the | |
184 <link doc="http/ngx_http_rewrite_module.xml">ngx_http_rewrite_module</link> | |
185 module. | |
186 </para> | |
187 </listitem> | |
188 | |
189 <listitem> | |
190 <para> | |
191 <command>--with-zlib=<<value>путь</value>></command>—sets | |
192 the path to the sources of the zlib library. | |
193 The library distribution (version | |
194 1.1.3—1.2.2) needs to be downloaded from the | |
195 <link url="http://www.gzip.org/zlib/">zlib</link> site and extracted. | |
196 The rest is done by nginx's ./configure and make. | |
197 The library is required for the | |
198 <link doc="http/ngx_http_gzip_module.xml">ngx_http_gzip_module</link> module. | |
199 </para> | |
200 </listitem> | |
201 | |
202 <listitem> | |
203 <para> | |
204 <command>--with-cc-opt=<<value>parameters</value>></command>—sets | |
205 additional parameters that will be added to the CFLAGS variable. | |
206 When using the system PCRE library under FreeBSD, | |
207 <command>--with-cc-opt="-I /usr/local/include"</command> | |
208 should be specified. | |
209 If the number of files supported by <c-func>select</c-func> needs to be | |
210 increased it can also be specified here such as this: | |
211 <command>--with-cc-opt="-D FD_SETSIZE=2048"</command>. | |
212 </para> | |
213 </listitem> | |
214 | |
215 <listitem> | |
216 <para> | |
217 <command>--with-ld-opt=<<value>parameters</value>></command>—sets | |
218 additional parameters that will be used during linking. | |
219 When using the system PCRE library under FreeBSD, | |
220 <command>--with-ld-opt="-L /usr/local/lib"</command> | |
221 should be specified. | |
222 </para> | |
223 </listitem> | |
224 | |
225 </list> | |
226 | |
227 </para> | |
228 | |
229 <para> | |
230 Example of parameters usage (all of this needs to be typed in one line): | |
231 <programlisting> | |
232 ./configure | |
233 --sbin-path=/usr/local/nginx/nginx | |
234 --conf-path=/usr/local/nginx/nginx.conf | |
235 --pid-path=/usr/local/nginx/nginx.pid | |
236 --with-http_ssl_module | |
237 --with-pcre=../pcre-4.4 | |
238 --with-zlib=../zlib-1.1.3 | |
239 </programlisting> | |
240 </para> | |
241 | |
242 </section> | |
243 | |
244 </article> |