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 ...
随机推荐
- Sentinel系统监控Redis主从节点
author:JevonWei 版权声明:原创作品 blog:http://119.23.52.191/ --- 构建Sentinel监控Redis的主节点架构 拓扑结构结构 拓扑环境 master ...
- 如何理解显示卡的驱动模块(DDX,DRM,DRI,XVMC)
如何理解显示卡的驱动模块(DDX,DRM,DRI,XVMC) 1)DDX是什么 DDX是X服务器的2D驱动模块,例如via_drv.so. 2D的显示加速,包括xvideo也是由它负责. 它会初始化硬 ...
- 刷题总结—— Scout YYF I(poj3744 矩阵快速幂+概率dp)
题目: Description YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate int ...
- Codeforces Round #361 (Div. 2) B bfs处理
B. Mike and Shortcuts time limit per test 3 seconds memory limit per test 256 megabytes input standa ...
- IDEA 注册问题,创建 和 删除项目
目录 .....2016.3/2017.1 IDEA 注册码 .....IDEA 创建项目 .....IDEA 删除项目 IDEA 注册码 复制使用别人的注册码,启动选择如下: 复制粘贴如下代码: 这 ...
- [转]从头到尾彻底理解KMP
https://blog.csdn.net/v_july_v/article/details/7041827
- 遍历datalist中的checkbox,并获取此时的值
原文发布时间为:2009-04-29 -- 来源于本人的百度文章 [由搬家工具导入] protected void Page_Load(object sender, EventArgs e) { if ...
- ubuntu php编译安装配置
安装参考:http://ilanni.blog.51cto.com/526870/1569322/ 加载扩展的一些参数参考:http://java-er.com/blog/nginx-php-fpm/
- python日期时间相关
参考: http://www.coder4.com/archives/2239 http://www.cnblogs.com/lhj588/archive/2012/04/23/2466653.htm ...
- hdu 4858(简单模拟)
项目管理 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...