Mercurial > hg > nginx-site
view xml/en/docs/install.xml @ 267:727da42d3887
Synchronized versions of "download".
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 22 Dec 2011 11:22:46 +0000 |
parents | 06b4c1f3149d |
children | 4c6d2c614d2c |
line wrap: on
line source
<!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> <article name="Installing nginx" link="/en/docs/install.html" lang="en"> <section> <para> The build is configured using the <command>configure</command> command. It defines various aspects of the system, including the methods nginx is allowed to use for connection processing. At the end it creates a <command>Makefile</command>. The <command>configure</command> command supports the following parameters: <list> <listitem> <para> <command>--prefix=<<value>path</value>></command>—defines a directory that will keep server files. This same directory will also be used for all relative paths set by <command>./configure</command> (except for paths to libraries sources) and in the <command>nginx.conf</command> configuration file. It is set to the <command>/usr/local/nginx</command> directory by default. </para> </listitem> <listitem> <para> <command>--sbin-path=<<value>path</value>></command>—sets the name of an nginx executable file. This name is used only during installation. By default the file is named <command><<value>prefix</value>>/sbin/nginx</command>. </para> </listitem> <listitem> <para> <command>--conf-path=<<value>path</value>></command>—sets the name of an <command>nginx.conf</command> configuration file. If needs be, nginx can always be started with a different configuration file, by specifying it in the command-line parameter <nobr><command>-c <<value>file</value>></command></nobr>. By default the file is named <command><<value>prefix</value>>/conf/nginx.conf</command>. </para> </listitem> <listitem> <para> <command>--pid-path=<<value>path</value>></command>—sets the name of an nginx.pid file that will store the process ID of the main process. After installation, the file name can always be changed in the <command>nginx.conf</command> configuration file using the <link doc="ngx_core_module.xml" id="pid"/> directive. By default the file is named <command><<value>prefix</value>>/logs/nginx.pid</command>. </para> </listitem> <listitem> <para> <command>--error-log-path=<<value>path</value>></command>—sets the name of the primary error, warnings, and diagnostic file. After installation, the file name can always be changed in the <command>nginx.conf</command> configuration file using the <link doc="ngx_core_module.xml" id="error_log"/> directive. By default the file is named <command><<value>prefix</value>>/logs/error.log</command>. </para> </listitem> <listitem> <para> <command>--http-log-path=<<value>path</value>></command>—sets the name of the primary request log file of the HTTP server. After installation, the file name can always be changed in the <command>nginx.conf</command> configuration file using the <link doc="http/ngx_http_log_module.xml" id="access_log"/> directive. By default the file is named <command><<value>prefix</value>>/logs/access.log</command>. </para> </listitem> <listitem> <para> <command>--user=<<value>name</value>></command>—sets the name of an unprivileged user whose credentials will be used by worker processes. After installation, the name can always be changed in the <command>nginx.conf</command> configuration file using the <link doc="ngx_core_module.xml" id="user"/> directive. The default user name is nobody. </para> </listitem> <listitem> <para> <command>--group=<<value>name</value>></command>—sets the name of a group whose credentials will be used by worker processes. After installation, the name can always be changed in the <command>nginx.conf</command> configuration file using the <link doc="ngx_core_module.xml" id="user"/> directive. By default, a group name is set to the name of an unprivileged user. </para> </listitem> <listitem> <para> <command>--with-select_module</command><br/> <command>--without-select_module</command>—enables or disables building a module that allows the server to work with the <c-func>select</c-func> method. This module is built automatically if the platform does not appear to support more appropriate methods such as kqueue, epoll, rtsig, or /dev/poll. </para> </listitem> <listitem> <para> <command>--with-poll_module</command><br/> <command>--without-poll_module</command>—enables or disables building a module that allows the server to work with the <c-func>poll</c-func> method. This module is built automatically if the platform does not appear to support more appropriate methods such as kqueue, epoll, rtsig, or /dev/poll. </para> </listitem> <listitem> <para> <command>--without-http_gzip_module</command>—disables building a module that <link doc="http/ngx_http_gzip_module.xml">compresses responses</link> of an HTTP server. The zlib library is required to build and run this module. </para> </listitem> <listitem> <para> <command>--without-http_rewrite_module</command>—disables building a module that allows an HTTP server to <link doc="http/ngx_http_rewrite_module.xml">redirect requests and change URI of requests</link>. The PCRE library is required to build and run this module. The module is experimental—its directives may change in the future. </para> </listitem> <listitem> <para> <command>--without-http_proxy_module</command>—disables building an HTTP server <link doc="http/ngx_http_proxy_module.xml">proxying module</link>. <!-- The MD5 library is required to build and run this module. --> </para> </listitem> <listitem> <para> <command>--with-http_ssl_module</command>—enables building a module that adds the <link doc="http/ngx_http_ssl_module.xml">HTTPS protocol support</link> to an HTTP server. This module is not built by default. The OpenSSL library is required to build and run this module. </para> </listitem> <listitem> <para> <command>--with-pcre=<<value>path</value>></command>—sets the path to the sources of the PCRE library. The library distribution (version 4.4—6.1) needs to be downloaded from the <link url="http://www.pcre.org">PCRE</link> site and extracted. The rest is done by nginx's ./configure and make. The library is required for regular expressions support in the <link doc="http/ngx_http_core_module.xml" id="location"/> directive and for the <link doc="http/ngx_http_rewrite_module.xml">ngx_http_rewrite_module</link> module. </para> </listitem> <listitem> <para> <command>--with-zlib=<<value>path</value>></command>—sets the path to the sources of the zlib library. The library distribution (version 1.1.3—1.2.2) needs to be downloaded from the <link url="http://www.gzip.org/zlib/">zlib</link> site and extracted. The rest is done by nginx's ./configure and make. The library is required for the <link doc="http/ngx_http_gzip_module.xml">ngx_http_gzip_module</link> module. </para> </listitem> <listitem> <para> <command>--with-cc-opt=<<value>parameters</value>></command>—sets additional parameters that will be added to the CFLAGS variable. When using the system PCRE library under FreeBSD, <command>--with-cc-opt="-I /usr/local/include"</command> should be specified. If the number of files supported by <c-func>select</c-func> needs to be increased it can also be specified here such as this: <command>--with-cc-opt="-D FD_SETSIZE=2048"</command>. </para> </listitem> <listitem> <para> <command>--with-ld-opt=<<value>parameters</value>></command>—sets additional parameters that will be used during linking. When using the system PCRE library under FreeBSD, <command>--with-ld-opt="-L /usr/local/lib"</command> should be specified. </para> </listitem> </list> </para> <para> Example of parameters usage (all of this needs to be typed in one line): <programlisting> ./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=../pcre-4.4 --with-zlib=../zlib-1.1.3 </programlisting> </para> </section> </article>