查看当前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的更多相关文章

  1. Centos 7 nginx-1.12.0编译安装

    参考:http://www.nginx.cn/install 也不知道我的系统是否有这些依赖包,试试吧?缺少哪些我就装哪些吧,多踏点坑总是能学到点东西的.   获取nginx包 http://ngin ...

  2. 平滑升级你的Nginx

    1.概述(可以直接跳过看第2部分) Nginx方便地帮助我们实现了平滑升级.其原理简单概括,就是: (1)在不停掉老进程的情况下,启动新进程. (2)老进程负责处理仍然没有处理完的请求,但不再接受处理 ...

  3. 高性能Web服务器Nginx的配置与部署研究(14)平滑升级你的Nginx

    1.概述(可以直接跳过看第2部分) Nginx方便地帮助我们实现了平滑升级.其原理简单概括,就是: (1)在不停掉老进程的情况下,启动新进程. (2)老进程负责处理仍然没有处理完的请求,但不再接受处理 ...

  4. Centos 7 nginx-1.12.0 配置学习(一)

    [root@bogon nginx]# vim nginx.conf #user nobody; #运行用户 worker_processes ; #启动进程,通常设置成和cpu核心数相等 #全局错误 ...

  5. centos 6.9 编译安装 Nginx1.12.1

    centos 6.9 使用yum 安装 Nginx1.12.1 Nginx (engine x) 是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器.Nginx是由伊戈 ...

  6. 原创|1分钟搞定 Nginx 版本的平滑升级与回滚

    Nginx无论是对于运维.开发.还是测试来说,都是日常工作需要掌握的一个知识点,之前也写过不少关于Nginx相关的文章: Nginx服务介绍与安装 Nginx服务配置文件介绍 Nginx配置虚拟主机 ...

  7. 平滑升级nginx

    平滑升级nginx版本技术文档 作者 联系方式 日期 版本号 马坤 852115346@qq.com 2017-12-31 V1.0.0 备注:作者水平有限,难免出现错误.如若发现错误,请您及时与作者 ...

  8. nginx的平滑升级,不间断服务

    nginx的平滑升级,不间断服务   Nginx更新真的很快,最近nginx的1.0.5稳定版,nginx的0.8.55和nginx的0.7.69旧的稳定版本已经发布.我一项比较喜欢使用新版本的软件, ...

  9. 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 ...

随机推荐

  1. CSS-Sass

    什么是css预处理器

  2. Showstopper [POJ3484] [二分] [思维]

    Description 给你n个数列,问哪一个数字在所有的数列中出现了奇数次(最多一个). Sample Input 1 10 1 2 10 1 1 10 1 1 10 1 1 10 1 4 4 1 ...

  3. dbconfig.properties

    jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost:3306/数据库名 jdbc.username=root jdbc. ...

  4. nohup & 及端口查看

    ps -aux | grep processName | grep -v grep | awk '{print $2}' a:显示所有程序 u:以用户为主的格式来显示 x:显示所有程序,不以终端机来区 ...

  5. Java 初始化、final、清理

    1 为什么需要无参构造器? 第一个是继承需要 super 调用父类的构造器(父类构造器必须存在且不为 private.可以是无参/默认构造器,也可以是有参构造器),特别的如果父类不包含无参构造器的话, ...

  6. applicationContext.xml和applicationContext-mvc.xml

    1.applicationContext.xml<?xml version="1.0" encoding="UTF-8"?> <beans x ...

  7. 提高你的python:解释 yield 和 Generators(生成器)

    转自:http://www.oschina.net/translate/improve-your-python-yield-and-generators-explained 原文:http://www ...

  8. VBA - ONE

    1. Grouping our code (1)  Modules

  9. ide phpStorm更换主题

    #主题下载地址 http://www.phpstorm-themes.com #更换方式 1.将主题配置保存在 xxx.icls(如果是xml也保存成.icls) 2.打开phpStorm设置(中上方 ...

  10. 2. Scala变量

    2.1 变量是程序的基本组成单位 举一个简单的例子 object boke_demo01 { def main(args: Array[String]): Unit = { var a: Int = ...