以gunzip这个模块为例,讲述一下,在nginx中如何安装新的模块

1、首先查看nginx已经安装了哪些模块。

nginx –V

2、发现没有gunzip模块,安装

进入nginx的安装目录中,不是nginx的软件目录。

在已有模块种写上要安装的模块,执行下边的命令

./configure \

--prefix=/usr/local/ywgh/nginx \

--http-client-body-temp-path=/tmp/clientbody \

--http-proxy-temp-path=/tmp/proxy \

--http-fastcgi-temp-path=/tmp/fastcgi \

--http-uwsgi-temp-path=/tmp/uwsgi \

--http-scgi-temp-path=/tmp/scgi \

--user=www \

--group=www \

--with-file-aio \

--with-http_realip_module \

--with-http_ssl_module \

--with-openssl=/usr/local/src/software/nginx/openssl \

--with-http_gunzip_module \

--with-http_gzip_static_module \

--with-zlib=/usr/local/src/software/nginx/zlib \

--with-http_stub_status_module \

--with-pcre=/usr/local/src/software/nginx/pcre \

3、然后编译,覆盖

直接make就行,不需要再make install了,如果要重新安装就使用make install,就直接覆盖了。

然后新产生的可执行文件nginx在安装目录中的objs目录下。

将objs目录下的nginx 复制到软件位置的nginx中。进行覆盖就可以了。覆盖的时候,需要先关闭nginx。

文章来源

运维公会:nginx增加新模块

nginx增加新模块的更多相关文章

  1. 已经编译安装的nginx/tenginx编译增加新模块

    只适用于自行编译安装的nginx配置 业务变更带来的Nginx增加模块需求 由于业务从php转为go开发,需要用到Http2的协议.这种协议在Nginx上需要http_v2_module这个模块的支持 ...

  2. 为nginx增加nginx_http_concat模块

    为nginx增加nginx_http_concat模块 时间 2013-06-05 22:14:56  我行我思 原文  http://www.fanjun.me/?p=562 主题 Nginx 缘由 ...

  3. Debian 为nginx增加第三方模块

    为nginx增加第三方模块需要重新编译nginx的,但是debian在安装nginx的时候做了很多事情,比如systemd,/etc/nginx/里的各种文件,所以我们最好在debian源代码包的基础 ...

  4. nginx增加第三方模块

    增加第三方模块 ============================================================ 一.概述nginx文件非常小但是性能非常的高效,这方面完胜ap ...

  5. nginx 增加 lua模块

    Nginx中的stub_status模块主要用于查看Nginx的一些状态信息. 本模块默认是不会编译进Nginx的,如果你要使用该模块,则要在编译安装Nginx时指定: ./configure –wi ...

  6. 如何在已经安装好的Nginx上增加新模块

    学习资源: https://blog.csdn.net/dxm2025/article/details/41149865 https://blog.csdn.net/qq_36663951/artic ...

  7. nginx添加新模块

    1.下载模块 git clone https://github.com/agentzh/echo-nginx-module 2.放入指定位置 mv echo-nginx-module-master / ...

  8. 编译nginx增加fair模块

    安装必要的软件 ubuntu里是 apt install wget gcc make zlib1g-dev libpcre3-dev 去官网下载最新稳定版的nginx源码 git clone 源码 g ...

  9. 添加nginx新模块,获取客户真实ip

    当前是客户端登录软件后台获取不到客户的真实ip而是云盾的代理ip 为了获取到真实ip后来发现通过配置nginx的read_ip模块就可以了 获取客户的真实ip使用Nginx的realip模块 当Ngi ...

随机推荐

  1. 简介Python中用于处理字符串的center()方法

    简介Python中用于处理字符串的center()方法 这篇文章主要介绍了简介Python中用于处理字符串的center()方法,是Python入门中的基础知识,需要的朋友可以参考下 center() ...

  2. Node.js报错TypeError: Cannot read property 'isDirectory' of undefined

    截图如下: 原因如下:记住"./uploads" 后要加一个/ fs.stat("./uploads/" + files[i], function(err, s ...

  3. CentOS安装文件共享samba

    参考:https://jingyan.baidu.com/article/03b2f78cdf811c5ea237aebc.html https://www.linuxidc.com/Linux/20 ...

  4. Jenkins入坑记

    记录一遍Jenkins初级使用教程 一,安装 (操作系统 centerOS7) 1-1.本次使用的是rpm包安装方式,在Jenkins官网下载rpm安装文件 下载地址: https://pkg.jen ...

  5. 什么是挂载(mount)?

    官方文档是这么解释的: All files accessible in a Unix system are arranged in one big tree, the file hierarchy, ...

  6. linux系统下,在用户空间应用程序中模拟发送系统键盘事件

    Linux 有自己的 input 子系统,可以统一管理鼠标和键盘事件. 如果想模拟键盘事件,但是系统没有键盘设备该如何是好? 基于输入子系统实现的 input 可以方便的在用户空间模拟鼠标和键盘事件. ...

  7. (十四)JDBC入门

    目录 什么是JDBC 操作JDBC的步骤 DriverManager对象 数据库URL Connection对象 Statement对象 ResultSet对象 常用数据类型转换表 释放资源 SQL注 ...

  8. LeetCode. 3的幂

    题目要求: 给定一个整数,写一个函数来判断它是否是 3 的幂次方. 示例: 输入: 27 输出: true 代码: class Solution { public: bool isPowerOfThr ...

  9. Error: errCode: -404011 cloud function execution error | errMsg: clou……错误

    在开通了云开发之后,无论点击小程序获取openid按钮报,Error: errCode: -404011 cloud function execution error | errMsg: clou…… ...

  10. Yii2 设计模式——单例模式

    单例模式 模式定义 单例模式确保一个类只有一个实例,并提供一个全局访问点.当现实中只需要一个对象,或者为了节省系统资源,又或者是为了共享数据的时候可以使用单例模式. 代码实现 我们先来看看单例模式的标 ...