# HG changeset patch # User Ruslan Ermilov # Date 1369991151 -14400 # Node ID a2aea48ff15562a94b291e59cb020c720a506dcd # Parent 4f1e2120be5eb2af5e2945dd21d254e12fb314f9 New "installation" article. Old "installation" was renamed to "configure" and describes how to build nginx from sources. diff --git a/xml/en/GNUmakefile b/xml/en/GNUmakefile --- a/xml/en/GNUmakefile +++ b/xml/en/GNUmakefile @@ -18,6 +18,7 @@ DOCS = \ howto_setup_development_environment_on_ec2 \ nginx_dtrace_pid_provider \ contributing_changes \ + configure \ FAQ = \ welcome_nginx_facebook \ diff --git a/xml/en/docs/install.xml b/xml/en/docs/configure.xml copy from xml/en/docs/install.xml copy to xml/en/docs/configure.xml --- a/xml/en/docs/install.xml +++ b/xml/en/docs/configure.xml @@ -5,10 +5,10 @@ -
+ rev="4">
@@ -182,7 +182,8 @@ the path to the sources of the PCRE libr The library distribution (version 4.4—8.32) needs to be downloaded from the PCRE site and extracted. -The rest is done by nginx’s ./configure and make. +The rest is done by nginx’s ./configure and +make. The library is required for regular expressions support in the directive and for the @@ -206,7 +207,8 @@ the path to the sources of the zlib libr The library distribution (version 1.1.3—1.2.7) needs to be downloaded from the zlib site and extracted. -The rest is done by nginx’s ./configure and make. +The rest is done by nginx’s ./configure and +make. The library is required for the ngx_http_gzip_module module. @@ -252,6 +254,11 @@ Example of parameters usage (all of this + +After configuration, +nginx is compiled and installed using make. + +
diff --git a/xml/en/docs/index.xml b/xml/en/docs/index.xml --- a/xml/en/docs/index.xml +++ b/xml/en/docs/index.xml @@ -8,7 +8,7 @@
@@ -73,6 +73,10 @@ + + + + diff --git a/xml/en/docs/install.xml b/xml/en/docs/install.xml --- a/xml/en/docs/install.xml +++ b/xml/en/docs/install.xml @@ -8,248 +8,51 @@
+ rev="1" + toc="no">
-The build is configured using the configure 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 Makefile. -The configure command supports the following parameters: - - - - ---prefix=path—defines -a directory that will keep server files. -This same directory will also be used for all relative paths set by -configure (except for paths to libraries sources) -and in the nginx.conf configuration file. -It is set to the /usr/local/nginx directory by default. - - - - - ---sbin-path=path—sets -the name of an nginx executable file. -This name is used only during installation. -By default the file is named -prefix/sbin/nginx. +nginx can be installed differently, depending on the operating system. - - - - ---conf-path=path—sets -the name of an nginx.conf configuration file. -If needs be, nginx can always be started with a different configuration file, -by specifying it in the command-line parameter --c file. -By default the file is named -prefix/conf/nginx.conf. - - - - - ---pid-path=path—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 -nginx.conf configuration file using the - directive. -By default the file is named -prefix/logs/nginx.pid. - - - - ---error-log-path=path—sets -the name of the primary error, warnings, and diagnostic file. -After installation, the file name can always be changed in the -nginx.conf configuration file using the - directive. -By default the file is named -prefix/logs/error.log. - - - - - ---http-log-path=path—sets -the name of the primary request log file of the HTTP server. -After installation, the file name can always be changed in the -nginx.conf configuration file using the - directive. -By default the file is named -prefix/logs/access.log. - - +
- - ---user=name—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 -nginx.conf configuration file using the - directive. -The default user name is nobody. - - - - - ---group=name—sets -the name of a group whose credentials will be used -by worker processes. -After installation, the name can always be changed in the -nginx.conf configuration file using the - directive. -By default, a group name is set to the name of an unprivileged user. - - - - - ---with-select_module
---without-select_module—enables or disables -building a module that allows the server to work with the -select 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. -
-
- - ---with-poll_module
---without-poll_module—enables or disables -building a module that allows the server to work with the -poll 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. -
-
- - - ---without-http_gzip_module—disables building a module -that compresses responses -of an HTTP server. -The zlib library is required to build and run this module. - - +
- - ---without-http_rewrite_module—disables building a -module that allows an HTTP server to -redirect requests and change URI -of requests. -The PCRE library is required to build and run this module. - - - - - ---without-http_proxy_module—disables building an -HTTP server proxying module. - - - - - - ---with-http_ssl_module—enables building a module -that adds the HTTPS protocol -support to an HTTP server. -This module is not built by default. -The OpenSSL library is required to build and run this module. - - - - ---with-pcre=path—sets -the path to the sources of the PCRE library. -The library distribution (version -4.4—8.32) needs to be downloaded from the -PCRE site and extracted. -The rest is done by nginx’s ./configure and make. -The library is required for regular expressions support in the - directive -and for the -ngx_http_rewrite_module -module. - - - - - ---with-pcre-jit—builds the PCRE library with -“just-in-time compilation” support (1.1.12, the - directive). - - - - - ---with-zlib=path—sets -the path to the sources of the zlib library. -The library distribution (version -1.1.3—1.2.7) needs to be downloaded from the -zlib site and extracted. -The rest is done by nginx’s ./configure and make. -The library is required for the -ngx_http_gzip_module module. - - - - - ---with-cc-opt=parameters—sets -additional parameters that will be added to the CFLAGS variable. -When using the system PCRE library under FreeBSD, ---with-cc-opt="-I /usr/local/include" -should be specified. -If the number of files supported by select needs to be -increased it can also be specified here such as this: ---with-cc-opt="-D FD_SETSIZE=2048". - - - - - ---with-ld-opt=parameters—sets -additional parameters that will be used during linking. -When using the system PCRE library under FreeBSD, ---with-ld-opt="-L /usr/local/lib" -should be specified. - - - - - +For Linux, nginx packages +from nginx.org can be used. +
+ + +
+ -Example of parameters usage (all of this needs to be typed in one line): - -./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 - +On FreeBSD, nginx can be installed either from the packages +or through the +ports +system. +The ports system provides greater flexibility, allowing selection among +a wide range of options. +The port will compile nginx with the specified options and install it. + + +
+ + +
+ + +If some special functionality is required, not available with packages and +ports, nginx can also be compiled from source files. +While more flexible, this approach may be complex for a beginner. +For more information, see .
diff --git a/xml/en/docs/mail/ngx_mail_core_module.xml b/xml/en/docs/mail/ngx_mail_core_module.xml --- a/xml/en/docs/mail/ngx_mail_core_module.xml +++ b/xml/en/docs/mail/ngx_mail_core_module.xml @@ -175,7 +175,7 @@ directive: Unnecessary protocols can be disabled using the -configuration +configuration parameters --without-mail_imap_module, --without-mail_pop3_module and --without-mail_smtp_module. diff --git a/xml/ru/GNUmakefile b/xml/ru/GNUmakefile --- a/xml/ru/GNUmakefile +++ b/xml/ru/GNUmakefile @@ -15,6 +15,7 @@ DOCS = \ debugging_log \ http/websocket \ contributing_changes \ + configure \ FAQ = \ sys_errlist \ diff --git a/xml/ru/docs/install.xml b/xml/ru/docs/configure.xml copy from xml/ru/docs/install.xml copy to xml/ru/docs/configure.xml --- a/xml/ru/docs/install.xml +++ b/xml/ru/docs/configure.xml @@ -5,15 +5,15 @@ -
+ rev="4">
-Конфигурация сборки осуществляется командой configure. +Сборка настраивается командой configure. Она определяет особенности системы и, в частности, методы, которые nginx может использовать для обработки соединений. В конце концов она создаёт Makefile. @@ -177,7 +177,8 @@ HTTPS. Дистрибутив библиотеки (версию 4.4—8.32) нужно взять на сайте PCRE и распаковать. -Всё остальное сделают ./configure nginx’а и make. +Всё остальное сделают ./configure nginx’а и +make. Библиотека нужна для использования регулярных выражений в директиве и для модуля @@ -199,7 +200,8 @@ 4.4—8.32) нужно взять на сайте PCRE путь к исходным текстам библиотеки zlib. Дистрибутив библиотеки (версию 1.1.3—1.2.7) нужно взять на сайте zlib и распаковать. -Всё остальное сделают ./configure nginx’а и make. +Всё остальное сделают ./configure nginx’а и +make. Библиотека нужна для модуля ngx_http_gzip_module. @@ -243,6 +245,11 @@ 1.1.3—1.2.7) нужно взять на сайте + +После конфигурации +nginx компилируется и устанавливается с помощью make. + +
diff --git a/xml/ru/docs/index.xml b/xml/ru/docs/index.xml --- a/xml/ru/docs/index.xml +++ b/xml/ru/docs/index.xml @@ -8,7 +8,7 @@
@@ -81,6 +81,10 @@ + + + + diff --git a/xml/ru/docs/install.xml b/xml/ru/docs/install.xml --- a/xml/ru/docs/install.xml +++ b/xml/ru/docs/install.xml @@ -8,239 +8,52 @@
+ rev="1" + toc="no">
-Конфигурация сборки осуществляется командой configure. -Она определяет особенности системы и, в частности, методы, которые nginx -может использовать для обработки соединений. -В конце концов она создаёт Makefile. -Команда configure поддерживает следующие параметры: - - - - ---prefix=путь—задаёт каталог, -в котором будут находиться файлы сервера. -Этот же каталог будет использоваться для всех относительных путей, -задаваемых configure (кроме путей к исходным текстам -библиотек) и в конфигурационном файле nginx.conf. -По умолчанию—каталог /usr/local/nginx. - - - - - ---sbin-path=путь—задаёт -имя исполняемого файла nginx. -Это имя используется только на стадии установки. -По умолчанию файл называется -префикс/sbin/nginx. - - - - - ---conf-path=путь—задаёт -имя конфигурационного файла nginx.conf. -При желании nginx можно всегда запустить с другим конфигурационным файлом, -указав его в параметре командной строки --c файл. -По умолчанию файл называется -префикс/conf/nginx.conf. - - - - - ---pid-path=путь—задаёт -имя файла nginx.pid, в котором будет храниться номер главного процесса. -После установки имя файла можно всегда поменять в конфигурационном -файле nginx.conf с помощью директивы -. -По умолчанию имя -файла—префикс/logs/nginx.pid. - - - - - ---error-log-path=путь—задаёт -имя основного файла ошибок, предупреждений и диагностики. -После установки имя файла можно всегда поменять в конфигурационном -файле nginx.conf с помощью директивы -. -По умолчанию имя -файла—префикс/logs/error.log. - - - - - ---http-log-path=путь—задаёт -имя основного файла регистрации запросов HTTP-сервера. -После установки имя файла можно всегда поменять в конфигурационном -файле nginx.conf с помощью директивы -. -По умолчанию имя -файла—префикс/logs/access.log. - - - - - ---user=имя—задаёт -имя непривилегированного пользователя, с правами которого будут -выполняться рабочие процессы. -После установки это имя можно всегда поменять в конфигурационном -файле nginx.conf с помощью директивы -. -По умолчанию имя пользователя nobody. - - - - - ---group=имя—задаёт -имя группы, с правами которой будут выполняться рабочие процессы. -После установки это имя можно всегда поменять в конфигурационном -файле nginx.conf с помощью директивы -. -По умолчанию группа совпадает с именем непривилегированного пользователя. - - - - - ---with-select_module
---without-select_module—разрешает или запрещает -сборку модуля для работы сервера с помощью метода select. -Этот модуль собирается автоматически, если на платформе не обнаружено -более подходящего метода—kqueue, epoll, rtsig или /dev/poll. +nginx устанавливается по-разному в зависимости от операционной системы.
-
- - ---with-poll_module
---without-poll_module—разрешает или запрещает -сборку модуля для работы сервера с помощью метода poll. -Этот модуль собирается автоматически, если на платформе не обнаружено -более подходящего метода—kqueue, epoll, rtsig или /dev/poll. -
-
- - - ---without-http_gzip_module—запрещает сборку модуля -сжатия ответов HTTP-сервера. -Для сборки и работы этого модуля нужна библиотека zlib. - - +
- - ---without-http_rewrite_module—запрещает сборку модуля -HTTP-сервера, позволяющего делать -перенаправления и менять URI запросов. -Для сборки и работы этого модуля нужна библиотека PCRE. - - - - ---without-http_proxy_module—запрещает сборку -проксирующего модуля -HTTP-сервера. - - - +
- - ---with-http_ssl_module—разрешает сборку модуля -для работы HTTP-сервера по протоколу -HTTPS. -По умолчанию модуль не собирается. -Для сборки и работы этого модуля нужна библиотека OpenSSL. - - - - ---with-pcre=путь—задаёт -путь к исходным текстам библиотеки PCRE. -Дистрибутив библиотеки (версию -4.4—8.32) нужно взять на сайте PCRE -и распаковать. -Всё остальное сделают ./configure nginx’а и make. -Библиотека нужна для использования регулярных выражений в директиве - -и для модуля -ngx_http_rewrite_module. - - - - - ---with-pcre-jit—собирает библиотеку PCRE с -поддержкой JIT-компиляции (1.1.12, директива -). - - - - - ---with-zlib=путь—задаёт -путь к исходным текстам библиотеки zlib. Дистрибутив библиотеки (версию -1.1.3—1.2.7) нужно взять на сайте -zlib и распаковать. -Всё остальное сделают ./configure nginx’а и make. -Библиотека нужна для модуля -ngx_http_gzip_module. - - - - - ---with-cc-opt=параметры—задаёт -дополнительные параметры, которые будут добавлены к переменной CFLAGS. -При использовании системной библиотеки PCRE во FreeBSD, нужно указать ---with-cc-opt="-I /usr/local/include". -Если нужно увеличить число файлов, с которыми может работать -select, то это тоже можно задать здесь же: ---with-cc-opt="-D FD_SETSIZE=2048". - - - - - ---with-ld-opt=параметры—задаёт -дополнительные параметры, которые будут использованы при линковке. -При использовании системной библиотеки PCRE во FreeBSD, нужно указать ---with-ld-opt="-L /usr/local/lib". - - - - - +Для установки nginx на Linux могут быть использованы +пакеты с nginx.org. +
+ + +
+ -Пример использования параметров (всё это нужно набрать в одной строке): - -./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 - +На FreeBSD можно установить nginx либо из + +пакетов, либо с помощью системы + +портов. +Система портов даёт большую гибкость, позволяя выбирать из широкого +набора настроек. +Порт скомпилирует nginx с выбранными опциями и установит. + + +
+ + +
+ + +Если необходима специфическая функциональность, недоступная из пакетов или +портов, можно скомпилировать nginx из исходного кода. +Будучи наиболее гибким, этот подход может быть сложным для начинающего. + освещает этот вопрос более подробно.
diff --git a/xml/ru/docs/mail/ngx_mail_core_module.xml b/xml/ru/docs/mail/ngx_mail_core_module.xml --- a/xml/ru/docs/mail/ngx_mail_core_module.xml +++ b/xml/ru/docs/mail/ngx_mail_core_module.xml @@ -173,7 +173,7 @@ listen unix:/var/run/nginx.sock; Поддержку ненужных протоколов можно отключить с помощью -конфигурационных +конфигурационных параметров --without-mail_imap_module, --without-mail_pop3_module и --without-mail_smtp_module.