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 ...
随机推荐
- BZOJ 1015:[JSOI2008]星球大战starwar(逆向处理+并查集)
[JSOI2008]星球大战starwar 时间限制: 3 Sec 内存限制: 162 MB[题目描述] ...
- 服务器提交了协议冲突。Section=ResponseHeader Detail=标头名称无效
服务器提交了协议冲突.Section=ResponseHeader Detail=CR 后面必须是LF. 微软没有容忍不符合RFC 822中的httpHeader必须以CRLF结束的规定的服务器响应所 ...
- 基于Linux的嵌入式文件系统构建与设计
摘 要:Linux是当今一种十分流行的嵌入式操作系统.由于其具有执行效率高.占用空间小.实时性能优良和可扩展性强等特点,因此被广泛应用于工业控制领域.该文对其文件系统进行了简单的介绍,结合嵌入式系统应 ...
- MySql数据类型和Java数据类型对应一览
类型名称 显示长度 数据库类型 JAVA类型 JDBC类型索引(int) 描述 VARCHAR L+N VARCHAR java.lang.String 12 CHAR N ...
- 转JSON提示No serializer found for class
在调用Json串生成方法时,提示: No serializer found for class com.jeremxy.domain.EpgDetail and no propertiesdiscov ...
- BestCoder 2nd Anniversary/HDU 5718 高精度 模拟
Oracle Accepts: 599 Submissions: 2576 Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 262144/26 ...
- 【自己D自己】WC2019总结
好吧写着写着写成自黑文了. 这是我时隔一个月写的,寒假非常自闭,肝童年游戏赛尔号来着…… 没玩过的无视 作为一个 $BJ$ 蒟蒻,第一次飞到广州二中这么远的地方(我没出过国,去广州算是很远的一次了). ...
- wordpress install 主题
手动安装,你可到访WordPress官方网站的主题部分,找到你喜欢的主题后,可压缩下载到电脑并将其解压缩: 上传.zip 包到服务器,解压到 wordpress/wp-content/themes c ...
- linux下头文件
aio.h 异步I/Oassert.h 验证程序断言complex 复数类complex.h 复数处理cpio.h cpio归档值ctype.h 字符类型dirent.h 目录项,opendir(), ...
- [暑假集训--数论]poj1365 Prime Land
Everybody in the Prime Land is using a prime base number system. In this system, each positive integ ...