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 ...
随机推荐
- docker+fastdfs+nginx 实现分布式大文件存储系统以及视频缓存播放
废话不多说,直接开撸 首先是一些准备工作: 1.关闭防火墙 service iptables stop --- fastdfs虽然在docker部署,但是使用的是主机网络,所以关闭防火墙. 2 下载 ...
- 远程连接你的linux服务器
为什么要远程连接linux 在实际的工作场景中,虚拟机界面或者物理服务器本地的终端都是很少接触的,因为服务器装完系统之后,都要拉倒IDC机房托管,如果是购买的云主机,那更碰不到服务器本体了,只能通过远 ...
- Petrozavodsk Winter-2018. Carnegie Mellon U Contest
A. Mines 每个点能爆炸到的是个区间,线段树优化建图,并求出SCC进行缩点. 剔除所有不含任何$n$个点的SCC之后,最小代价为每个入度为$0$的SCC中最小点权之和,用set维护即可. 时间复 ...
- centos如何设置固定IP
### centos6.5版本 编辑ifcfg-eth0 vi /etc/sysconfig/network-scripts/ifcfg-eth0 参照下面代码修改自己的配置 ############ ...
- css 制作翻页布局
代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...
- css 颜色表示法
css颜色值主要有三种表示方法: (1)颜色名表示,如:red红色,gold金色 (2)rgb表示,如:rgb(255,0,0)表示红色 (3)16进制数值表示,如:#ff0000表示红色,这种可以简 ...
- react-native android textinput显示不全的问题
出现的问题 如下图 原因 android 输入框默认带有上下内边距 解决 将Textinput元素样式的垂直内边距设置为0 paddingVertical: 0
- JS基础学习1
1 JS 概述 一个完整的javascript实现是由以下3个不同部分组成的: (1) 核心(ECMAscript) (2) 文档对象模型(DOM) Document object ...
- Docker ElK安装部署使用教程
一.简介 1.核心组成 ELK由Elasticsearch.Logstash和Kibana三部分组件组成: Elasticsearch是个开源分布式搜索引擎,它的特点有:分布式,零配置,自动发现,索引 ...
- Android 一个日历控件的实现代码
转载 2017-05-19 作者:Othershe 我要评论 本篇文章主要介绍了Android 一个日历控件的实现代码,小编觉得挺不错的,现在分享给大家,也给大家做个参考.一起跟随小编过来看 ...