假如原已经安装好的Nginx,现在需要添加一个未被编译安装的ssl模块,我们该怎么办呢?重装,还是有其他的办法?当然不需要重装的,下面我们看下如何实现的。

1.cd到Nginx解压过后的目录
[root@nginx ~]# cd /root/nginx-1.6.2

2.查看Nginx编译安装时的命令,安装了哪些模块
[root@nginx nginx-1.6.2]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.6.2
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
TLS SNI support enabled
configure arguments: --with-http_image_filter_module --with-http_gzip_static_module

3.加入需要安装的模块,重新编译
[root@nginx nginx-1.6.2]# ./configure --with-http_image_filter_module --with-http_ssl_module --with-http_gzip_static_module
注意:在添加模块的时候,一定要把这些之前编译的模块带上,不然你编译的只有你想提价的模块,之前的模块不会编译。

4.make,千万不要make install,不然你就相当于重装了
[root@nginx nginx-1.6.2]# make

5. 替换Nginx二进制文件:
cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak 备份nginx
cp ./objs/nginx /usr/local/nginx/sbin/

6.启动Nginx
[root@nginx nginx-1.6.2]# /usr/local/nginx/sbin/nginx
查看下已经安装的模块
[root@nginx nginx-1.6.2]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.6.2
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
TLS SNI support enabled
configure arguments: --with-http_image_filter_module --with-http_ssl_module --with-http_gzip_static_module
如果一切正常的话,这样就可以结束了。

附:linux编译nginx参数详解

Nginx编译安装模块(非重装)的更多相关文章

  1. 安装成功的nginx,如何添加未编译安装模块(非覆盖安装http_image_filter_module)

    背景:1.做了图片上传小项目.2.图片上传,需要多图管理.3.图片上传,需要存储到Fastdfs.4.Fastdfs上的图片,和Nginx结合.5.Nginx从Fastdfs获得的图片,需要使用缩略图 ...

  2. 安装成功的nginx如何添加未编译安装模块

    原已经安装好的nginx,现在需要添加一个未被编译安装的模块举例说明:安装第三方的ngx_cache_purge模块(用于清除指定URL的缓存)nginx的模块是需要重新编译nginx,而不是像apa ...

  3. 新安装和已安装nginx如何添加未编译安装模块/补丁

    新安装和已安装nginx如何添加未编译安装模块/补丁 --http://www.apelearn.com/bbs/forum.php?mod=viewthread&tid=10485& ...

  4. 转:安装成功的nginx如何添加未编译安装模块

    原已经安装好的nginx,现在需要添加一个未被编译安装的模块 举例说明:安装第三方的ngx_cache_purge模块(用于清除指定URL的缓存) nginx的模块是需要重新编译nginx,而不是像a ...

  5. Nginx编译安装第三方模块http_substitutions_filter_module2222

    Nginx编译安装第三方模块http_substitutions_filter_module Rming -- 阅读 安装 Http 编译 module filter nginx 模块 >> ...

  6. Nginx编译安装第三方模块http_substitutions_filter_module

    Nginx编译安装第三方模块http_substitutions_filter_module 分类:服务器技术  作者:rming  时间:-- . >>ngx_http_substitu ...

  7. nginx编译安装新模块

    nginx的模块是需要重新编译nginx,而不是像apache一样配置文件引用.so 这里以安装第三方ngx_http_google_filter_module模块为例 下载第三方扩展模块ngx_ht ...

  8. Linux下nginx编译安装教程和编译参数详解

    这篇文章主要介绍了Linux下nginx编译安装教程和编译参数详解,需要的朋友可以参考下 一.必要软件准备1.安装pcre 为了支持rewrite功能,我们需要安装pcre 复制代码代码如下: # y ...

  9. nginx编译安装

    Nginx编译安装 1.nginx官网:http://wiki.nginx.org/Install下载:http://nginx.org/en/download.html 2.编译安装# wget h ...

随机推荐

  1. Drools规则引擎-memberOf操作

    场景 规则引擎技术讨论2群(715840230)有同学提出疑问,memberOf的使用过程中如果,memberOf之后的参数不是集合也不是数组,而是格式如"1,2,3,4"的字符串 ...

  2. Greenplum高可用真的高吗?

    目录 1. 问题描述 2. 解决方案 @ 1. 问题描述 在项目中使用了Greenplum做分析型数据库,Greenplum自身已经提供了高可用方案,Master节点提供Sdanby备用节点,Segm ...

  3. Perm排列计数(新博客试水,写的不好,各路大神见谅)

    B. Perm 排列计数 内存限制:512 MiB 时间限制:1000 ms 标准输入输出   题目描述 称一个1,2,...,N的排列P1,P2...,Pn是Magic的,当且仅当2<=i&l ...

  4. BZOJ3033 太鼓达人题解

    太鼓达人 时间限制: 1 Sec  内存限制: 128 MB 题目描述 七夕祭上,Vani牵着cl的手,在明亮的灯光和欢乐的气氛中愉快地穿行.这时,在前面忽然出现了一台太鼓达人机台,而在机台前坐着的是 ...

  5. Connecting to the Network

    This lesson shows you how to implement a simple application that connects to the network. It explain ...

  6. Lake Counting-C++

    Description Due to recent rains, water has pooled in various places in Farmer John's field, which is ...

  7. 【基本数据结构之堆】-C++

    注意:这篇博客讲的是手写堆,喜欢用C++自带数据结构模拟的慎入 今天我们来聊一聊一种奇怪 的数据结构: 堆 为什么说这个数据结构有点奇怪呢? 先看看其他的在我眼里是正常的数据结构: 队列(近似于排队) ...

  8. <float.h>中DBL_TRUE_MIN的定义和作用

    搬运自己2016年11月22日于SegmentFault发表的文章.链接:https://segmentfault.com/a/1190000007565915 在学习C Prime Plus的过程中 ...

  9. wordpress备份和还原和迁移

    备份用mysqldump -u root -p test person > backup.sql 还原用mysql -u root -p < ./backup.sql 数据库密码修改后怎么 ...

  10. php if语句

    一.前言 if语句 是几乎所有编程语言都有的函数. 当然我们最好的php这么最好的语言也有啦~ 二.搞起! 直接上代码不多哔哔.talk is cheap show me the code 2.1 i ...