一、安装nginx

yum安装nginx 折叠源码
1
2
3
4
5
6
7
8
9
10
11
12
# 添加nginx源
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
# 查看nginx的yum源
yum info nginx
# 安装nginx
yum install nginx
# 查看nginx安装模块
nginx -vV
 
 
...
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'

二、下载nginx源码包

wget下载源码 折叠源码
1
2
3
4
5
# 下载
wget http://nginx.org/download/nginx-1.14.2.tar.gz
# 解压
# tar xf nginx-1.14.2.tar.gz
# cd nginx-1.14.2

三、编译

添加:--with-threads模块

编译nginx 折叠源码
1
2
./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie' --with-threads
make && make install

四、reload服务器

reload服务器 折叠源码
1
nginx -s reload
 

[原创]nginx添加module之threads的更多相关文章

  1. nginx添加module之threads

    一.安装nginx yum安装nginx 折叠源码 1 2 3 4 5 6 7 8 9 10 11 12 # 添加nginx源 rpm -ivh http://nginx.org/packages/c ...

  2. 【原】Nginx添加Content-MD5头部压测分析

    如需转载,必须注明原文地址,请尊重作者劳动成果. http://www.cnblogs.com/lyongerr/p/5048464.html 本文介绍了webbenck安装,但是最后使用的是ab工具 ...

  3. How to Customize Server Header using NginX headers-more module

    http://wiki.nginx.org/HttpHeadersMoreModule#Version headers_more When you are browsing a website, yo ...

  4. Nginx Upload Module 上传模块

    传统站点在处理文件上传请求时,普遍使用后端编程语言处理,如:Java.PHP.Python.Ruby等.今天给大家介绍Nginx的一个模块,Upload Module上传模块,此模块的原理是先把用户上 ...

  5. Nginx Image Module图片缩略图 水印处理模块

    Nginx Image Module图片缩略图 水印处理模块 下载Tengine tar -zxvf tengine-1.4.5.tar.gz cd tengine-1.4.5 下载Nginx tar ...

  6. nginx添加sticky模块-cookie保持会话

    cookie不同于session,一个存于客户端,一个存于服务端. 环境nginx 1.8.0 centos6.X sticky:1.2.5  wget https://bitbucket.org/n ...

  7. [转帖]Nginx Image Module图片缩略图 水印处理模块

    Nginx Image Module图片缩略图 水印处理模块 https://www.cnblogs.com/jicki/p/5546972.html Nginx Image Module图片缩略图 ...

  8. Nginx添加到windows服务

    在windows平台,把Nginx注册到服务,又可以启动.停止和重启的方法,网上并没找到好的办法. 既然如此,唯有自己写程序实现了 使用C#进行编写,有兴趣的可以下载源码自己改:源码下载(2016-1 ...

  9. nginx添加模块 (非覆盖安装)

    nginx添加模块(非覆盖安装) 原已经安装好的nginx,现在需要添加一个未被编译安装的模块: 查看原来编译时都带了哪些参数# /usr/local/nginx/sbin/nginx -V ngin ...

随机推荐

  1. php文件的处理和操作

    好长时间没有看php手册了,有些关于文件操作方面的知识点发现从没有学过,现补习一下,顺便整理一下: 1.文件的打开:fopen()   此函数的第一个参数含有要打开的文件的名称,第二个参数规定了使用哪 ...

  2. springboot---->springboot中的校验器(一)

    这里面我们简单的学习一下springboot中关于数据格式化的使用.冬天花败,春暖花开,有人离去,有人归来. springboot中的校验器 我们的测试环境是springboot,对请求的person ...

  3. Visual Studio 2013安装Update 3启动crash的解决方法

    Visual Studio 2013安装完Update 3后启动立刻crash,异常信息为: System.InvalidOperationException was unhandled Messag ...

  4. Artech的MVC4框架学习——第三章controller的激活

    第一当目标controller的名称通过URL路由被解析出来后,asp.net mvc利用 ControllerBuilder 注册 ControllerFactory ,根据名称实现对目标contr ...

  5. 一、laya学习笔记 --- layabox环境搭建 HelloWorld(坑:ts版本问题解决方案)

    好吧,使用layabox需要从官网下载些啥呢 一.下载layabox 官网 https://www.layabox.com/ 首页上有两个,一个Engine,一个IDE Engine我下载的TS版本, ...

  6. Windows任务计划的设置

    需求:因为要定时跑一些exe的小程序,来定时执行项目内的某段代码.所以需要建一个任务计划 1. 2. 3.

  7. 23种设计模式之访问者模式(Visitor)

    访问者模式是一种对象的行为性模式,用于表示一个作用于某对象结构中的各元素的操作,它使得用户可以再不改变各元素的类的前提下定义作用于这些元素的新操作.访问者模式使得增加新的操作变得很容易,但在一定程度上 ...

  8. 23种设计模式之解释器模式(Interpreter)

    解释器模式属于类的行为型模式,描述了如何为语言定义一个文法,如何在该语言中表示一个句子,以及如何解释这些句子,这里的“语言”是使用规定格式和语法的代码.解释器模式主要用在编译器中,在应用系统开发中很少 ...

  9. 检查mono兼容性的工具MOAM

    mono的迁移工具,可以帮助我们从windows平台迁移到Linux平台,可以用来检测特定的.net的dll或exe程序对mono的兼容性,并能够给出不兼容的方法 项目地址 MoMA 项目介绍 MoM ...

  10. npm publish 发布

    前言 我们npm publish发布的时候,一定是本地文件发布到远程仓库,并且登录到http://registry.npmjs.org(即npm adduser或npmlogin)之后,才可以进行发布 ...