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开发 ...
随机推荐
- C# const与static的理解
C# const与static的理解 static readonly与 const变量,作用是一样的,无论访问修饰符是不是public,还是其它(private. protected.interna ...
- OpenMp并行提升时间为什么不是线性的?
最近在研究OpenMp,写了一段代码,如下: #include<time.h> #include<stdio.h> #include<stdlib.h> #incl ...
- echo "hello" | nc -4t -w1 localhost 8001
TCP4: echo "hello" | nc -4t -w1 localhost 8001 UDP4: echo "hello" | nc -4u -w1 l ...
- 解决docker中DNS查询的问题
I got a dns error that i can not access dns server, that caused by : /etc/resolv.conf you can find t ...
- HDU 2059 龟兔赛跑
受上一道题影响,我本来想着开一个二维数组来表示充电和不充电的状态. 可这样就有一个问题,如果没有充电,那么在下一个阶段就有剩余的电量. 这样问题貌似就不可解了,难道是因为不满足动态规划的无后效性这一条 ...
- 编译器错误消息: CS0016: 未能写入输出文件
“/”应用程序中的服务器错误. 编译错误 说明: 在编译向该请求提供服务所需资源的过程中出现错误.请检查下列特定错误详细信息并适当地修改源代码. 编译器错误消息: CS0016: 未能写入输出文件“c ...
- Sqlite数据库 找不到请求的 .Net Framework Data Provider。可能没有安装
解决方法 在web.config里面添加 <system.data> <DbProviderFactories> <remove invariant="Sy ...
- 【转】DB2 常用命令
1. 打开命令行窗口 #db2cmd 2. 打开控制中心 # db2cmd db2cc 3. 打开命令编辑器 db2cmd db2ce =====操作数据库命令===== 4. 启动数据库实例 ...
- noSession or session is close 错误
<filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class>or ...
- poj 2127 LCIS 带路径输出
这个题 用一维 为什么错了: 因为 用一维 dp 方程肯定也是一维:但是有没有想,第 i 个字符更新了 j 位置的最优结果,然后 k 字符又一次更新了 j 位置的最优值,然后 我的结果是 i ...