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 pathnginx.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 pathnginx.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 pathnginx.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 pathnginx.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 namenginx.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 namenginx.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开发 ...
随机推荐
- Myeclipse的web项目移植到Eclipse中需要添加的包
3.jstl.jar 4.standard-1.1.2.jar 把Myeclipse的web项目一直到Eclipse当中需要添加的包主要有一下4个: 1.servlet-api.jar 2.jsp-a ...
- iPhone —— 如何自制铃声(图文)
iPhone不像其他手机可以直接将MP3格式的文件设为铃声.但如果想用自己喜欢的歌曲作为铃声该怎么办呢?请听我一一道来. 一.将MP3文件转换成iPhone铃声能识别的M4R格式文件 1.向iTune ...
- html5 canvas移动设备渲染测试
最近项目闲着没什么事,又想起了canvas, 针对移动端设备默认浏览器,做了点渲染方面效率的测试,手头设备不多(有一些低端机型和pc chrome做对比),现将测试数据分享给大家吧,本想和css3 a ...
- sqlserver资源下载
安装包可以从itellyou下载 NorthWind 安装SQL2000SampleDb.msi 之后可以在C:\SQL Server 2000 Sample Databases目录 2016/01/ ...
- leetcode:Palindrome Linked List
Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time ...
- 谈谈 char *num="123";和char num[4]="123";的区别
最近写程序的时候发现这样一个问题 #include<iostream> #include <string.h> using namespace std; void revers ...
- maven命令大全
1. mvn help:describe 你是否因为记不清某个插件有哪些goal而痛苦过,你是否因为想不起某个goal有哪些参数而苦恼,那就试试这个命令吧,它会告诉你一切的. 参数: 1. -Dplu ...
- selenium-webdriver(python) (十) 如何处理下拉框
本节重点 处理下拉框 switch_to_alert() accept() 下拉框是我们最常见的一种页面元素,对于一般的元素,我们只需要一次就定位,但下拉框里的内容需要进行两次定位,先定位到下拉框,再 ...
- Python风格规范
Python风格规范 分号 Tip 不要在行尾加分号, 也不要用分号将两条命令放在同一行. 行长度 Tip 每行不超过80个字符 例外: 长的导入模块语句 注释里的URL 不要使用反斜杠连接行. Py ...
- linux安全体系
一. 硬件.软件选型 确认需求,分析可能面临的安全问题 记录各硬件寿命.保证散热.确保性能冗余 使用商业正版.开源的软件,不从互联网安装系统,从源头保证系统安全 购买专业售后支持 服务器配置双电源 ...