`
sunqi
  • 浏览: 227917 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

nginx 安装选项

阅读更多

yum -y install pcre-devel openssl openssl-devel

./configure --prefix=/home/alisoft/nginx --user=alisoft --group=alisoft --without-http-cache --with-http_stub_status_module


--prefix=<path> - Nginx安装路径。如果没有指定,默认为 /usr/local/nginx。

--sbin-path=<path> - Nginx可执行文件安装路径。只能安装时指定,如果没有指定,默认为<prefix>/sbin/nginx。

--conf-path=<path> - 在没有给定-c选项下默认的nginx.conf的路径。如果没有指定,默认为<prefix>/conf/nginx.conf。

--pid-path=<path> - 在nginx.conf中没有指定pid指令的情况下,默认的nginx.pid的路径。如果没有指定,默认为 <prefix>/logs/nginx.pid。

--lock-path=<path> - nginx.lock文件的路径。

--error-log-path=<path> - 在nginx.conf中没有指定error_log指令的情况下,默认的错误日志的路径。如果没有指定,默认为 <prefix>/logs/error.log。

--http-log-path=<path> - 在nginx.conf中没有指定access_log指令的情况下,默认的访问日志的路径。如果没有指定,默认为 <prefix>/logs/access.log。

--user=<user> - 在nginx.conf中没有指定user指令的情况下,默认的nginx使用的用户。如果没有指定,默认为 nobody。

--group=<group> - 在nginx.conf中没有指定user指令的情况下,默认的nginx使用的组。如果没有指定,默认为 nobody。

--builddir=DIR - 指定编译的目录

--with-rtsig_module - 启用 rtsig 模块

--with-select_module --without-select_module - Whether or not to enable the select module. This module is enabled by default if a more suitable method such as kqueue, epoll, rtsig or /dev/poll is not discovered by configure.

//允许或不允许开启SELECT模式,如果 configure 没有找到更合适的模式,比如:kqueue(sun os),epoll (linux kenel 2.6+), rtsig(实时信号)或者/dev/poll(一种类似select的模式,底层实现与SELECT基本相 同,都是采用轮训方法) SELECT模式将是默认安装模式

--with-poll_module --without-poll_module - Whether or not to enable the poll module. This module is enabled by default if a more suitable method such as kqueue, epoll, rtsig or /dev/poll is not discovered by configure.

--with-http_ssl_module - Enable ngx_http_ssl_module. Enables SSL support and the ability to handle HTTPS requests. Requires OpenSSL. On Debian, this is libssl-dev.

//开启HTTP SSL模块,使NGINX可以支持HTTPS请求。这个模块需要已经安装了OPENSSL,在DEBIAN上是libssl

--with-http_realip_module - 启用 ngx_http_realip_module

--with-http_addition_module - 启用 ngx_http_addition_module

--with-http_sub_module - 启用 ngx_http_sub_module

--with-http_dav_module - 启用 ngx_http_dav_module

--with-http_flv_module - 启用 ngx_http_flv_module

--with-http_stub_status_module - 启用 "server status" 页

--without-http_charset_module - 禁用 ngx_http_charset_module

--without-http_gzip_module - 禁用 ngx_http_gzip_module. 如果启用,需要 zlib 。

--without-http_ssi_module - 禁用 ngx_http_ssi_module

--without-http_userid_module - 禁用 ngx_http_userid_module

--without-http_access_module - 禁用 ngx_http_access_module

--without-http_auth_basic_module - 禁用 ngx_http_auth_basic_module

--without-http_autoindex_module - 禁用 ngx_http_autoindex_module

--without-http_geo_module - 禁用 ngx_http_geo_module

--without-http_map_module - 禁用 ngx_http_map_module

--without-http_referer_module - 禁用 ngx_http_referer_module

--without-http_rewrite_module - 禁用 ngx_http_rewrite_module. 如果启用需要 PCRE 。

--without-http_proxy_module - 禁用 ngx_http_proxy_module

--without-http_fastcgi_module - 禁用 ngx_http_fastcgi_module

--without-http_memcached_module - 禁用 ngx_http_memcached_module

--without-http_limit_zone_module - 禁用 ngx_http_limit_zone_module

--without-http_empty_gif_module - 禁用 ngx_http_empty_gif_module

--without-http_browser_module - 禁用 ngx_http_browser_module

--without-http_upstream_ip_hash_module - 禁用 ngx_http_upstream_ip_hash_module

--with-http_perl_module - 启用 ngx_http_perl_module

--with-perl_modules_path=PATH - 指定 perl 模块的路径

--with-perl=PATH - 指定 perl 执行文件的路径

--http-log-path=PATH - Set path to the http access log

--http-client-body-temp-path=PATH - Set path to the http client request body temporary files

--http-proxy-temp-path=PATH - Set path to the http proxy temporary files

--http-fastcgi-temp-path=PATH - Set path to the http fastcgi temporary files

--without-http - 禁用 HTTP server

--with-mail - 启用 IMAP4/POP3/SMTP 代理模块

--with-mail_ssl_module - 启用 ngx_mail_ssl_module

--with-cc=PATH - 指定 C 编译器的路径

--with-cpp=PATH - 指定 C 预处理器的路径

--with-cc-opt=OPTIONS - Additional parameters which will be added to the variable CFLAGS. With the use of the system library PCRE in FreeBSD, it is necessary to indicate --with-cc-opt="-I /usr/local/include". If we are using select() and it is necessary to increase the number of file descriptors, then this also can be assigned here: --with-cc-opt="-D FD_SETSIZE=2048".

--with-ld-opt=OPTIONS - Additional parameters passed to the linker. With the use of the system library PCRE in FreeBSD, it is necessary to indicate --with-ld-opt="-L /usr/local/lib".

--with-cpu-opt=CPU - 为特定的 CPU 编译,有效的值包括:pentium, pentiumpro, pentium3, pentium4, athlon, opteron, amd64, sparc32, sparc64, ppc64

--without-pcre - 禁止 PCRE 库的使用。同时也会禁止 HTTP rewrite 模块。在 "location" 配置指令中的正则表达式也需要 PCRE 。

--with-pcre=DIR - 指定 PCRE 库的源代码的路径。

--with-pcre-opt=OPTIONS - Set additional options for PCRE building.

--with-md5=DIR - Set path to md5 library sources.

--with-md5-opt=OPTIONS - Set additional options for md5 building.

--with-md5-asm - Use md5 assembler sources.

--with-sha1=DIR - Set path to sha1 library sources.

--with-sha1-opt=OPTIONS - Set additional options for sha1 building.

--with-sha1-asm - Use sha1 assembler sources.

--with-zlib=DIR - Set path to zlib library sources.

--with-zlib-opt=OPTIONS - Set additional options for zlib building.

--with-zlib-asm=CPU - Use zlib assembler sources optimized for specified CPU, valid values are: pentium, pentiumpro

--with-openssl=DIR - Set path to OpenSSL library sources

--with-openssl-opt=OPTIONS - Set additional options for OpenSSL building

--with-debug - 启用调试日志

--add-module=PATH - Add in a third-party module found in directory PATH

分享到:
评论

相关推荐

    Nginx源码安装的方法步骤

    一、下载Nginx源文件 进入nginx官网下载nginx的稳定版本,我下载的是1.10.0。 下载:wget ...三、配置Nginx安装选项 我这里只配置安装到/opt目录下,其它选项可执行./configuration

    nginx-sticky-module-1.25.zip

    下载后,在编译安装nginx时,用--add-module选项,指到sticky所在目录。类似命令如下: ./configure --prefix=/usr/local/nginx-1.6.0 --add-module=../nginx-sticky-module-1.25 --without-...

    nginx服务器安装及配置文件详解.pdf

    Nginx 在工作中已经有好几个环境在使用了,每次都是重新去网上找博客,各种编译配置,今天自己也整理一份安装文档和 nginx.conf 配置选项的说明,已作参考

    Nginx 调优 TCP socket选项 中文详解

    Nagle算法在一些场景下的确能提高网络利用率、降低包处理(客户端或服务器)主机资源消耗并且工作得很好,但是在某些场景下却又弊大于利,要说清楚这个问题需要引入另一个概念,即延迟确认(Delayed ACK)。

    k8s的ingress-nginx配置

    1.14.0 ingress-nginx配置选项

    nginx-opentracing:用于OpenTracing的NGINX插件

    如果NGINX是使用--with-compat选项编译的,则可以将它们放到现有的NGINX安装中。 有关如何设置它的示例,请参见 。 否则,可以从使用nginx-opentracing或nginx-opentracing。入门首先,为所使用的跟踪器编写配置。 ...

    Nginx服务器安装及配置文件与使用详解

    Nginx 在工作中已经有好几个环境在使用了,每次都是重新去网上找博客,各种编译配置,今天自己也整理一份安装文档和 nginx.conf 配置选项的说明,留作以后参考。 1. 安装nginx 1.1 选择稳定版本 我们编译安装nginx来...

    Nginx 服务器安装及配置文件详解介绍

    Nginx 在工作中已经有好几个环境在使用了,每次都是重新去网上找博客,各种编译配置,今天自己也整理一份安装文档和 nginx.conf 配置选项的说明,留作以后参考。 1. 安装nginx 1.1 选择稳定版本 我们编译安装nginx...

    Web服务器Nginx常见的配置选项整理.docx

    Web服务器Nginx常见的配置选项整理.docx

    Windows下Nginx+PHP5的安装与配置方法

    以下是我在 Windows 2003 安装中 Nginx 和 PHP5.2 的步骤,但windows版本的nginx性能要比Linux/Uninx版本的Nginx差太多。 安装 PHP5首先,从 http://www.php.net/downloads.php 下 载最新的 PHP5.2.9-2 Windows ...

    Nginx版UPUPW PHP绿色服务器平台

    Nginx版UPUPW PHP绿色服务器平台 1807.1 Nginx版UPUPW PHP绿色服务器平台采用Nginx+PHP+MariaDB的架构搭建,MariaDB和MySQL...支持生产开发环境选项; 支持FTP服务器端管理模块; 支持UPUPW配置文件的备份与还原。

    nginx优化详细

    通过一个百万并发的nginx反向代理服务器的配置文件优化选项

    homebrew-nginx:用于自定义模块的社区NGINX Tap

    安装水龙头后,您可以安装带有可选nginx-full : brew tap denji/nginxbrew install nginx-full --with-upload-module有关可用配置选项的列表,请运行: brew options nginx-fullbrew info nginx-full那冲突呢?...

    nginx upstream fair算法

    nginx upstream fair算法 编译时加下面选项: --add-module=./nginx-upstream-fair make && make install

    nginx-proxy-manager:Docker容器,用于通过简单,强大的界面管理Nginx代理主机

    尽管可能有高级选项,但它们是可选的,并且项目应尽可能简单,以使进入此处的障碍很低。特征基于美观安全的管理界面无需了解Nginx即可轻松创建转发域,重定向,流和404主机使用“让我们加密”或提供您自己的自定义...

    ansible-nginx-proxy:将 nginx 配置为代理服务器的 Ansible 秘诀

    这个秘籍并不试图涵盖所有可用的 Nginx 选项,只是使用将 Nginx 配置为代理服务器。角色变量选项描述nginx_enabled 在启动时启用 nginx 服务。 nginx_state nginx 服务的状态。 nginx_app_config nginx 应用程序...

    ansible-role-nginx:Ansible角色-Nginx

    在此角色安装Nginx之后,您可能需要做一些额外的设置工作,例如在/etc/nginx/conf.d/添加您自己的[virtualhost] .conf文件,描述用于特定网站的位置和选项。要求没有任何。角色变量下面列出了可用的变量以及默认值...

    spnego-http-auth-nginx-module:适用于Nginx的SPNEGO HTTP身份验证模块

    用于HTTP SPNEGO身份验证的...遵循,并将--add-module选项传递给nginx configure: ./configure --add-module = spnego-http-auth-nginx-module 请注意,如果不清楚,您确实需要安装KRB5(MIT或Heimdal)头文件。 在

    nginx-auth-ldap:用于 nginx 的 LDAP 身份验证模块

    用于 nginx 的 LDAP 身份...如何安装FreeBSD cd /usr/ports/www/nginx && make config install clean 检查 HTTP_AUTH_LDAP 选项 [*] HTTP_AUTH_LDAP 3rd party http_auth_ldap moduleLinux cd ~ && git clone ...

    nginx-http-hsts:Nginx 模块添加适当的 Strict-Transport-Security 标头

    切换到包含 nginx_ 源的目录,使用所需的选项运行配置脚本,并确保放置一个--add-module标志指向包含摘要模块源的目录: $ cd nginx-1.x.x $ ./configure --add-module=../nginx-http-hsts-master [other ...

Global site tag (gtag.js) - Google Analytics