03_Nginx加入新模块
1 进入nginx安装文件夹,查看nginx版本号及其编译參数:
|
[root@localhost nginx]# ./nginx -V nginx version: nginx/1.8.0 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) built with OpenSSL 1.0.1c 10 May 2012 TLS SNI support enabled configure arguments: --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.37 --with-zlib=../zlib-1.2.8 --with-openssl=../openssl-1.0.1c --with-http_stub_status_module --user=nginx --group=nginx [root@localhost nginx]# |
2 进入nginx的源代码文件夹:
|
[root@localhost src]# ls nginx-1.8.0 openssl-1.0.1c pcre-8.37 zlib-1.2.8 nginx-1.8.0.tar.gz openssl-1.0.1c.tar.gz pcre-8.37.tar.gz zlib-1.2.8.tar.gz [root@localhost src]# pwd /usr/local/src [root@localhost src]# cd nginx-1.8.0 [root@localhost nginx-1.8.0]# ls auto CHANGES CHANGES.ru conf configure contrib html LICENSE Makefile man objs README src [root@localhost nginx-1.8.0]# |
3 下面是又一次编译的代码和模块:
|
./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-http_realip_module \ --with-http_addition_module \ --with-http_stub_status_module \ --with-http_sub_module \ --with-http_dav_module \ --with-http_flv_module \ --with-http_mp4_module \ --with-http_gunzip_module \ --with-http_gzip_static_module \ --with-http_random_index_module \ --with-http_secure_link_module \ --with-http_auth_request_module \ --with-mail \ --with-mail_ssl_module \ --with-file-aio \ --with-http_spdy_module \ --with-ipv6 \ --with-pcre=../pcre-8.37 \ --with-zlib=../zlib-1.2.8 \ --with-openssl=../openssl-1.0.1c \ --user=nginx \ --group=nginx; |
截图例如以下:
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" v:shapes="图片_x0020_3" alt="" />
具体參数请看官网:http://nginx.org/en/docs/configure.html
4 编译:
make (注意:千万不要make install)
5 make完毕之后再当前文件夹下的objs文件夹下就多了个nginx,这个就是新版本号的程序了
6 备份旧的nginx程序
|
[root@localhost objs]# cp /usr/local/nginx/nginx /usr/local/nginx/nginx.bak [root@localhost objs]# cd /usr/local/nginx/ [root@localhost nginx]# ls client_body_temp fastcgi_temp mime.types.default sbin uwsgi_temp conf html nginx scgi_params win-utf fastcgi.conf koi-utf nginx.bak scgi_params.default fastcgi.conf.default koi-win nginx.conf scgi_temp fastcgi_params logs nginx.conf.default uwsgi_params fastcgi_params.default mime.types proxy_temp uwsgi_params.default [root@localhost nginx]# |
6 把新的nginx程序覆盖旧的
|
[root@localhost nginx-1.8.0]# ls auto CHANGES CHANGES.ru conf configure contrib html LICENSE Makefile man objs README src [root@localhost nginx-1.8.0]# cp objs/nginx /usr/local/nginx/nginx cp:是否覆盖"/usr/local/nginx/nginx"? y [root@localhost nginx-1.8.0]# |
7 測试新的nginx程序是否正确
[root@localhost nginx-1.8.0]#/usr/local/nginx/nginx -t
8 平滑重新启动nginx
/usr/local/nginx/nginx –s reload
9 查看nginx版本号及其编译參数:
/usr/local/nginx/nginx –V
03_Nginx加入新模块的更多相关文章
- 03_Nginx添加新模块
1 进入nginx安装目录,查看nginx版本及其编译参数: [root@localhost nginx]# ./nginx -V nginx version: nginx/1.8.0 buil ...
- springboot~添加新模块的方法
在springboot项目框架里,把一个项目两大模块,主项目main和测试项目test,而我们的测试项目根据功能又可以再分,比如可以有单元测试,集成测试,业务测试等等. 对于一个初学者来说,建立模块的 ...
- Anaconda安装新模块
如果使用import导入的新模块没有安装,则会报错,下面是使用Anaconda管理进行安装的过程:1.打开Anaconda工具,如图: 2.可通过输入 conda list 查看已安装的模块 3.如果 ...
- ecmall 开发一个新模块
要开发新模块,要借鉴原有模块的代码并进行修改. 首先打开目录external/modules 会有一个datacall文件夹,这个文件夹对应的就是一个模块. 复制datacall文件夹,重命名为tes ...
- [实战] 给现有的NGINX二进制RPM包加新模块
[实战] 给现有的NGINX二进制RPM包加新模块 一.前言 在做 wiki 的镜像,这样以后文章就可以使用外链了(链接直接跳转墙内小站). 遇到的问题就是:我的 NGINX 包安装的时候图方便采用 ...
- Magento 2开发教程 - 创建新模块
视频在youtube网站国内访问不了,可以使用FQ软件查看. 视频地址:www.youtube.com/embed/682p52tFcmY@autoplay=1 下面是视频文字介绍: Magento ...
- thinkPHP5 添加新模块
1. 修改build.php文件 , 添加新模块 2. cmd 运行命令 php think build --config build.php
- nginx增加新模块
以gunzip这个模块为例,讲述一下,在nginx中如何安装新的模块 1.首先查看nginx已经安装了哪些模块. nginx –V 2.发现没有gunzip模块,安装 进入nginx的安装目录中,不是 ...
- 线上nginx 平滑添加新模块;如(--with-http_realip_module)
nginx 添加模块1.查看当前nginx信息(配置文件路径,启动用户...) ps aux | grep nginx 2.查看当前nginx已启用的模块(记录模块信息,安装路径)./nginx -V ...
随机推荐
- 查看oracle日志路径
adrci ADRCI: Release 12.2.0.1.0 - Production on Tue Oct 9 16:14:35 2018 Copyright (c) 1982, 2017, Or ...
- 如何获取JavaCard剩余空间
0x01应用场景 获取JavaCard卡内剩余空间,一方面是在评估一张卡的时候需要用到,另一方面是在应用个人化或者运行时需要用到. 例如:应用提供商为了保证自己的应用在卡内运行期间能够不受空间影响,一 ...
- OOP & DOM
OOP & DOM let Dom = Dom || {}; Dom = { checkValType(val) { let typeString = Object.prototype.toS ...
- TTL 和 RS-232
下面详细讲解下面这三种的区别 USB转TTL串口板(常用芯片PL2303,CH340) USB转RS-232串口线 TTL转RS-232串口板,RS-232转TTL串口板(常用芯片MAX3232,MA ...
- THUSC2018 爆零记
没想到我还真能过这个...... 太玄学了= = 不过这直接导致我月考数学挂科,掉出年级前十= = 5.26 THU过了! 真是十分意外的惊喜啊$-\omega-$ 6.1 今天出发去帝都! 然而飞行 ...
- Python之面向对象:继承
概念:子类继承父类的属性和方法. 一个派生类(derived class)继承基类(bass class)字段和方法.继承也允许把一个派生类的对象作为一个基类对象对待. 一.单继承 :推崇.特点和使用 ...
- 【转】利用ScriptManager实现Javascript调用WebService中的方法
原文发布时间为:2009-07-01 -- 来源于本人的百度文章 [由搬家工具导入] 前台调用后台方法,或者后台调用前台方法。ScriptManager实现 开发过程中,总想在前台直接调用后台的met ...
- VC6.0工程改名(转)
只讨论对工程改名,其他文件和类的名字不改变,否则就很麻烦了. 操作步骤: (1)删除 .dsw 文件.改好了会再自动生成的: (2)以写字板或记事本方式打开.dsp文件: (3)将其中所有的原工 ...
- C#图解教程学习笔记——类相关的概念
一.一些基本概念1. 字段:隶属于类的变量,即类的成员变量.2. 方法:隶属于类的函数,即类的成员函数.3. 实例成员:类的每个实例拥有自己的各个类成员的副本,这些成员称为实例成员. 改变一个实例字段 ...
- Codeforces Round #450 (Div. 2) A. Find Extra One【模拟/判断是否能去掉一个点保证剩下的点在Y轴同侧】
A. Find Extra One time limit per test 1 second memory limit per test 256 megabytes input standard in ...