CentOS 7 Nginx1.12.2平滑升级到新版本nginx-1.13.3
查看当前Nginx版本信息
[root@web ~]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.12.
built by gcc 4.8. (Red Hat 4.8.-) (GCC)
built with OpenSSL 1.1.0e Feb
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=nginx --group=nginx --with-pcre --with-openssl=/tmp/openssl-1.1.0e --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_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_stub_status_module --with-http_auth_request_module --with-http_image_filter_module --with-mail --with-threads --with-mail_ssl_module --with-stream_ssl_module
下载nginx-1.13.3版本到/usr/local/下,解压并进入解压后的目录
[root@nginx ~]# cd /usr/local/
[root@nginx nginx-1.13.]# wget http://nginx.org/download/nginx-1.13.3.tar.gz
[root@nginx nginx-1.13.]# wget https://www.openssl.org/source/openssl-1.1.0e.tar.gz
[root@nginx nginx-1.13.]# tar xf openssl-1.1.0e.tar.gz
[root@nginx nginx-1.13.]# tar xf nginx-1.13..tar.gz
[root@nginx nginx-1.13.]# cd nginx-1.13.
查看nginx版本的时候,configure后面有一大串模块,这也是你第一次安装nginx时所指定的模块,升级的时候也要同时指定,也可以添加其他模块
[root@nginx nginx-1.13.]# ./configure \
--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-pcre \
--with-openssl=/tmp/openssl-1.1.0e \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_addition_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_stub_status_module \
--with-http_auth_request_module \
--with-http_image_filter_module \
--with-mail \
--with-threads \
--with-mail_ssl_module \
--with-stream_ssl_module \
&& make
make完以后,不需要执行make install,否则会覆盖安装,nginx服务会出现各种问题
不中断nginx web服务器的正常运行称之为平滑升级,先重命名之前的nginx二进制文件
[root@nginx nginx-1.13.]# mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
拷贝刚编译新生产的Nginx二进制文件到/usr/local/nginx/sbin/目录
[root@nginx nginx-1.13.]# cp /usr/local/nginx-1.13./objs/nginx /usr/local/nginx/sbin/
开始执行升级命令
[root@web nginx-1.13.]# make upgrade
/usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`
sleep
test -f /usr/local/nginx/logs/nginx.pid.oldbin
kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`
查看nginx版本信息
[root@web nginx-1.13.]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.13.
built by gcc 4.8. (Red Hat 4.8.-) (GCC)
built with OpenSSL 1.1.0e Feb
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=nginx --group=nginx --with-pcre --with-openssl=/tmp/openssl-1.1.0e --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_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_stub_status_module --with-http_auth_request_module --with-http_image_filter_module --with-mail --with-threads --with-mail_ssl_module --with-stream_ssl_module
已经成功升级到1.13.3
CentOS 7 Nginx1.12.2平滑升级到新版本nginx-1.13.3的更多相关文章
- Centos 7 nginx-1.12.0编译安装
参考:http://www.nginx.cn/install 也不知道我的系统是否有这些依赖包,试试吧?缺少哪些我就装哪些吧,多踏点坑总是能学到点东西的. 获取nginx包 http://ngin ...
- 平滑升级你的Nginx
1.概述(可以直接跳过看第2部分) Nginx方便地帮助我们实现了平滑升级.其原理简单概括,就是: (1)在不停掉老进程的情况下,启动新进程. (2)老进程负责处理仍然没有处理完的请求,但不再接受处理 ...
- 高性能Web服务器Nginx的配置与部署研究(14)平滑升级你的Nginx
1.概述(可以直接跳过看第2部分) Nginx方便地帮助我们实现了平滑升级.其原理简单概括,就是: (1)在不停掉老进程的情况下,启动新进程. (2)老进程负责处理仍然没有处理完的请求,但不再接受处理 ...
- Centos 7 nginx-1.12.0 配置学习(一)
[root@bogon nginx]# vim nginx.conf #user nobody; #运行用户 worker_processes ; #启动进程,通常设置成和cpu核心数相等 #全局错误 ...
- centos 6.9 编译安装 Nginx1.12.1
centos 6.9 使用yum 安装 Nginx1.12.1 Nginx (engine x) 是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器.Nginx是由伊戈 ...
- 原创|1分钟搞定 Nginx 版本的平滑升级与回滚
Nginx无论是对于运维.开发.还是测试来说,都是日常工作需要掌握的一个知识点,之前也写过不少关于Nginx相关的文章: Nginx服务介绍与安装 Nginx服务配置文件介绍 Nginx配置虚拟主机 ...
- 平滑升级nginx
平滑升级nginx版本技术文档 作者 联系方式 日期 版本号 马坤 852115346@qq.com 2017-12-31 V1.0.0 备注:作者水平有限,难免出现错误.如若发现错误,请您及时与作者 ...
- nginx的平滑升级,不间断服务
nginx的平滑升级,不间断服务 Nginx更新真的很快,最近nginx的1.0.5稳定版,nginx的0.8.55和nginx的0.7.69旧的稳定版本已经发布.我一项比较喜欢使用新版本的软件, ...
- CentOS-7.3.1611编译安装 Nginx-1.12.1+mysql-5.7.19+PHP-7.1.8+zabbix-3.4.1
CentOS-7.3.1611编译安装 Nginx-1.12.1+mysql-5.7.19+PHP-7.1.8+zabbix-3.4.1 下载软件 1.下载nginx http://nginx.org ...
随机推荐
- flask狗书
Models.py #coding:utf8 fromflaskimportFlask fromflask_sqlalchemyimportSQLAlchemy app=Flask(__name__) ...
- line-height:1.5和line-height:150%的区别
1. 给你个数,孩子自己算吧 line-height:1.5 父元素设置line-height:1.5会直接继承给子元素,子元素根据自己的font-size再去计算子元素自己的line-height ...
- Team
队名 正义联盟 团队成员 211606301 蔡振翼(队长) 211606445 肖志豪 211606382 吴文清 211606370 刘华强 211605240 谢孟轩 211614269 林凯 ...
- XIV Open Cup named after E.V. Pankratiev. GP of America
A. Ancient Diplomacy 建图,同色点间边权为$0$,异色点间边权为$1$,则等价于找一个点使得到它最短路最长的点的最短路最小,Floyd即可. 时间复杂度$O(n^3)$. #inc ...
- 清除电脑缓存的bat文件
电脑在使用了之后,会产生垃圾缓存,若不及时清理会降低电脑的运行速度. 1.步骤: 2.新建一个记事本文件,命名“系统清理”;(或其他名字) 3.原封不动复制下面的文字到该记事本中 @echo off ...
- JS编码方式
1. escape(): 采用unicode字符集对指定的字符串除0-255以外进行编码.所有的空格符.标点符号.特殊字符以及更多有联系非ASCII字符都将被转化成%xx格式的字符编码(xx等于该字符 ...
- ELK 5.5.0 安装
Preparation 假设当前为root用户,并已有jdk1.8环境. cd /opt/package useradd sealion ElasticSearch wget https://arti ...
- 请求库之requests模块
本片导航: 介绍 基于GET请求 基于POST请求 响应Response 高级用法 一.介绍 #介绍:使用requests可以模拟浏览器的请求,比起之前用到的urllib,requests模块的a ...
- Java课程寒假之回答问题:如何将你的兴趣化为可以立足于社会的资本
在学校的时候干过几次兼职,算是无聊时候的外快吧,有一次是去辅导机构,在考试期间监考学生,前后大概四个小时,最后拿了四十五并且管了一顿饭,不得不说,小学生是真的皮,考试的时候有的爱讲话,有的是写完之后开 ...
- Windows下自带压缩文件工具之-makecab
在内网渗透时,当没有rar.7z等压缩工具时候,拖取文件的时候为了防止流量过大,又必须压缩把文件压缩.当然你可以自己上传一个压缩工具.Windows自带制作压缩文件工具makecb你可以了解哈.压缩单 ...