zoukankan      html  css  js  c++  java
  • nginx平滑升级

    1.查询原来安装配置信息

    [root@t-scrmap1-v-szzb local]# netstat -unlatp | grep nginx
    tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      2410/nginx          
    tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      2410/nginx          
    
    [root@t-scrmap1-v-szzb local]# /usr/local/nginx/sbin/nginx -V
    nginx version: nginx/1.8.1
    built by gcc 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) 
    built with OpenSSL 1.0.1e-fips 11 Feb 2013
    TLS SNI support enabled
    configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module
    [root@t-scrmap1-v-szzb local]#          

    2.编译新版本

    1 tar -xvf nginx-1.10.2.tar.gz 
    2 cd nginx-1.10.2
    3 ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module
    4 make

    3.升级

    mv  /usr/local/nginx/sbin/nginx   /usr/local/nginx/sbin/nginx-low
    #备份原版本
    cp  objs/nginx   /usr/local/nginx/sbin/
    #cp新的启动程序到sbin目录
    [root@t-scrmap1-v-szzb nginx-1.10.2]# 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 1
    test -f /usr/local/nginx/logs/nginx.pid.oldbin
    kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`
    [root@t-scrmap1-v-szzb nginx-1.10.2]#

    4.升级成功

    [root@t-scrmap1-v-szzb nginx]# ./sbin/nginx -V
    nginx version: nginx/1.10.2
    built by gcc 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) 
    built with OpenSSL 1.0.1e-fips 11 Feb 2013
    TLS SNI support enabled
    configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module
    [root@t-scrmap1-v-szzb nginx]# netstat -unlatp | grep nginx
    tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      18308/nginx         
    tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      18308/nginx         
    [root@t-scrmap1-v-szzb nginx]# 
  • 相关阅读:
    问题——虚拟机连接,查本地DNS,查软件位置,payload生成,检测注册表变化
    nmap命令解释
    SMB扫描,SMTP扫描
    操作系统识别,SNMP扫描
    服务扫描——查询banner信息,服务识别
    nmap之扫描端口(附加hping3隐藏扫描)
    scapy简单用法——四层发现
    转载 界面组装器模式
    设计模式=外观模式
    如何进行自动化测试和手工测试
  • 原文地址:https://www.cnblogs.com/kamil/p/6066235.html
Copyright © 2011-2022 走看看