Building nginx from Sources(从源代码安装nginx)
Building nginx from Sources(从源代码安装nginx)
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
.
它定了了各种系统,包括nginx方法被允许使用连接的过程。在最后创建了”文件编写“文件
The configure
command supports the following parameters: 配置命令支持下边的一些参数
--prefix=
— defines a directory that will keep server files. 前缀路径,定义了一个保存服务器文件的目录path
This same directory will also be used for all relative paths set by configure
(except for paths to libraries sources) 同样的目录将设置为相同目录,如果直接执行configure命令
and in the nginx.conf
configuration file. It is set to the /usr/local/nginx
directory by default. 默认使用configure命令,最终保存服务器文件的目录在 /usr/local/nginx目录里面,该默认目录的设置是在nginx.conf里面设置的
--sbin-path=
— sets the name of an nginx executable file. This name is used only during installation. By default the file is named path
.prefix
/sbin/nginx
sbin-path 等于一个路径,该路径是设置一个可行执行文件的名字,这个名字仅仅用于安装。默认该文件被命名为
.prefix
/sbin/nginx
--conf-path=
— sets the name of an path
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
. By default the file is named file
.prefix
/conf/nginx.conf
conf-path等于一个路径,设置nginx.conf这个配置文件的名称。如果有必须要,nginx可以用不同的配置文件开始。特别的命令配置文件的命令行参数为 -c file.默认文件命名为 prefix/conf/nginx.conf
--pid-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 path
nginx.conf
configuration file using the pid directive. By default the file is named
.prefix
/logs/nginx.pid
pid-path等于一个路径,该路径是nginx.pid文件,用于存储主进程中的一个进程ID.在安装后,这个文件名称通常被改为nginx.conf备至文件被使用pid指令。默认文件被命名为 prefix/logs/nginx.pid
--error-log-path=
— sets the name of the primary error, warnings, and diagnostic file. After installation, the file name can always be changed in the path
nginx.conf
configuration file using the error_log directive. By default the file is named
.prefix
/logs/error.log
errror-log-path等于一个路径,该路径是参数错误、警告、诊断文件。在安装后,该文件通常被修改到nginx.conf备至文件用error log指令,默认文件被命名为 prefix/logs/error.log
--http-log-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 path
nginx.conf
configuration file using the access_log directive. By default the file is named
.prefix
/logs/access.log
--http-log-path
等于一个路径,该路径设置了http服务器的请求逻辑日志参数的名称。在安装后,该名称被改进进入nginx.conf配置文件用 通过逻辑 指令。默认该文件被命名为 prefix/logs/access.log
--user=
— 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 name
nginx.conf
configuration file using the user directive. The default user name is nobody.
--user等于一个路径,该路径是一个能够被用着工作进程的资格证书的特权用户。在安装后,该名称被改进进入nginx.confi文件,被命名为user指令。默认用户为没有任何人
--group=
— sets the name of a group whose credentials will be used by worker processes. After installation, the name can always be changed in the name
nginx.conf
configuration file using the user directive. By default, a group name is set to the name of an unprivileged user.
--group等于一个名称,具有工作进程资格证书的一组名称。这个名称通常被改进进入nginx.conf以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, or /dev/poll.
--without-select_module:是一个允许或者禁用一个模块,该模块允许服务器用select()方法工作。这个模块被自动建立当平台没有出现适合的方法如kqueue, epoll, 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, or /dev/poll.
--without-poll_module
:允许或者禁用一个建立的模块,该模块允许服务器用poll()线程方法工作。该模块被自动建立当服务器没有出现荀彧合适的方法,例如kqueue,epoll,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_gzip_module:禁用http服务的解压缩创建模块。这个zlib图书馆被允许建立运行该模块
--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. 禁用http服务器http服务器转发请求或者改变请求的URL创建的模块。 这个PCRE这个图书馆被允许建立和运行该模块
--without-http_proxy_module
— disables building an HTTP server proxying module.
--without-http_proxy_module
禁止http服务器代理模块
--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-http_ssl_module:允许建立一个http服务器的http协议支持的模块。该模块默认不会被建立。 开源库被建立和运行该模块
--with-pcre=
— sets the path to the sources of the PCRE library. The library distribution (version 4.4 — 8.39) needs to be downloaded from the PCRE site and extracted. The rest is done by nginx’s path
./configure
and make
. The library is required for regular expressions support in the location directive and for the ngx_http_rewrite_module module.
--with-pcre
等于一个路径,该路径是一个网络库的资源。这个库需要下载从网络库和提取。剩下的被nginx的配置文件创建。这个库被要求为当前命令或者重写模块的库命令
--with-pcre-jit
— builds the PCRE library with “just-in-time compilation” support (1.1.12, the pcre_jit directive).
--with-pcre-jit
建立了PCRE库带着及时编译帮助
--with-zlib=
— sets the path to the sources of the zlib library. The library distribution (version 1.1.3 — 1.2.8) needs to be downloaded from the zlib site and extracted. The rest is done by nginx’s path
./configure
and make
. The library is required for the ngx_http_gzip_module module.
--with-zlib
等于一个路径,设置了zlib库的源代码路径。这个库贡献需要从zlib站点下站和提取。剩下的被做到nginx的配置文件和编译。这个库被http解压缩模块所需要
--with-cc-opt=
— sets additional parameters that will be added to the CFLAGS variable. When using the system PCRE library under FreeBSD, parameters
--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-cc-opt
等于参数,设置附加的参数被添加到目的变量。当使用系统PCRE库在免费的BSD下时候,用--with-cc-opt="-I /usr/lcoal/include"应该被设定。如果文件的大小需要支持选择方法,他被特定指示为这样的形式:--with-c-opt="-D FD_SETSIZE=2048"
--with-ld-opt=
— sets additional parameters that will be used during linking. When using the system PCRE library under FreeBSD, parameters
--with-ld-opt="-L /usr/local/lib"
should be specified.
--with-ld-opt=
:设定附加的参数,这些常被用到连接。当我们在UNIX操作系统下使用PCRE库时候,被指定为"parameters
--with-ld-opt="-L /usr/local/lib"
"
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-8.39
--with-zlib=../zlib-1.2.8
After configuration, nginx is compiled and installed using make
.
在配置之后,nginx被编译和用make安装
Building nginx from Sources(从源代码安装nginx)的更多相关文章
- CentOS 7 源代码安装Nginx
本篇简要介绍CentOS 7 源代码安装Nginx. Preface # yum install epel-release -y # yum group install "Developme ...
- nginx(一)----ubuntu14.04下安装nginx
/** * lihaibo * 文章内容都是根据自己工作情况实践得出. *如有错误,请指正 *转载请注明出处 */ 此文章中用到的软件下载地址: 链接: http://pan.baidu.com/s/ ...
- 【nginx】利用yum源安装nginx
先安装nginx的yum源 http://nginx.org/en/linux_packages.html#stable 找到链接,安装: rpm -ivh http://nginx.org/pack ...
- Nginx(一):linux下安装nginx与配置
linux系统为Centos 64位 准备目录 [root@instance-3lm099to ~]# mkdir /usr/local/nginx [root@instance-3lm099to ~ ...
- nginx详解(代理服务器的解释+nginx 在linux 下的安装+nginx.conf 中的配置解释)
一.概论 1.什么是代理服务器 代理服务器,客户机在发送请求时,不会直接发送给目的主机,而是先发送给代理服务器,代理服务接受客户机请求之后,再向主机发出,并接收目的主机返回的数据,存放在代理服务器的硬 ...
- 【Nginx】 linux环境下安装nginx步骤
开始前,请确认gcc g++开发类库是否装好,默认已经安装. centos平台编译环境使用如下指令 安装make: yum -y install gcc automake autoconf libto ...
- 【Nginx】centos7 yum命令安装nginx
安装nginx 首先我们需要使用root用户进行操作 第一步:添加nginx存储库 sudo yum install epel-release 出现如下图说明成功: 第二步:安装nginx sudo ...
- [nginx] 从源码编译安装NGINX
nginx通过rpm包进行的安装和配置: [web][nginx] 初识nginx -- 使用nginx搭建https DPI解码测试环境 现在,要通过源码进行安装. 参考:https://nginx ...
- Linux(Centos)之安装Nginx及注意事项
1.Nginx的简单说明 a. Nginx是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器,期初开发的目的就是为了代理电子邮件服务器室友:Igor Sysoev开发 ...
随机推荐
- YTU 2607: A代码填空题--更换火车头
2607: A代码填空题--更换火车头 时间限制: 1 Sec 内存限制: 128 MB 提交: 91 解决: 73 题目描述 注:本题只需要提交填写部分的代码,请按照C++方式提交. 假设火车有 ...
- urllib.request ProxyHandler
import urllib.request proxy_support = urllib.request.ProxyHandler({}) opener = urllib.request.build_ ...
- 自动化测试之python安装
1.首先访问http://www.python.org/download/去下载最新的python版本. 2.安装下载包,一路next. 3.为计算机添加安装目录搭到环境变量,如图把python的安装 ...
- MySQL之Join
参见MySQL(以5.1为例)中官方手册:MySQL官方手册-JOIN 假设有以下几个表 t1 id book 1 java 2 c++ 3 php t2 id author 2 zhang 3 wa ...
- 新版本 JSAPI微信支付V3 C# DEMO
小弟在公众号后台无意中点了更新(微信支付接口升级)PS:想都没有想,心里还乐滋滋的免费的干嘛不升级...后果来了.面临着支付不能用了,代码需要重新更新. /** * JS_API支付demo * == ...
- PHP基础 CGI,FastCGI,PHP-CGI与PHP-FPM
CGI CGI全称是“公共网关接口”(Common Gateway Interface),HTTP服务器与你的或其它机器上的程序进行“交谈”的一种工具,其程序须运行在网络服务器上. CGI可以用任何一 ...
- php flock注意事项
对于实际的运用,必须将其添加到所有使用的文件脚本中 但注意:其函数无法再NFS或其他网络文件系统中使用也无法在多线程服务器API中使用.
- Notepad 列编辑、正则查找、替换
目标: 将源数据转成初始化sql语句.源数据: 104110040018,1,中国银行,中国银行天津琼州道支行,NULL,1100,天津市,12,天津市 104110040059,1,中国银行,中国银 ...
- 当sql报错代码,不允许对表操作的原因
不允许对表 表名 执行操作,原因码为 原因码. 说明 限制对表 表名 的访问.原因基于下列原因码 原因码: 1 该表处于“设置完整性暂挂无访问”状态.未强制表的完整性并且表的内容可能是无效的.如果从属 ...
- java UncaughtExceptionHandler 处理线程意外中止
本文转自:http://peirenlei.iteye.com/blog/305079 Thread的run方法是不抛出任何检查型异常(checked exception)的,但是它自身却可能因为一个 ...