• Nginx平滑升级


    Nginx平滑升级

    下载Nginx地址:http://nginx.org/download/nginx-1.12.1.tar.gz
    nginx版本:1.8.0
    nginx升级版本:1.12.1
    nginx -v #查看当前Nginx版本
    nginx -V #查看当前Nginx编译参数

    在执行编译时会报错没有--with-http_spdy_module选项(nginx 1.9.5 已经没有了 --with-http_spdy_module ,取代的是 --with-http_v2_module),查看官方模块地址:http://nginx.org/en/docs/

    开始部署

    [root@localhost src]#tar xvf nginx-1.12.1.tar.gz
    [root@localhost nginx-1.12.1]# cd nginx-1.12.1
    [root@localhost nginx-1.12.1]# ./configure
    --user=tdoa 
    --group=tdoa 
    --prefix=/usr/local/tdoa/nginx
    --with-file-aio
    --with-http_stub_status_module
    --with-http_gzip_static_module
    --with-pcre=/root/linux-2015/down/pcre-8.32
    --with-pcre-jit
    --with-http_v2_module
    [root@localhost nginx-1.12.1]# make
    

    执行make后,make install无需执行,将现有nginx重命名

    [root@localhost objs]# mv /usr/local/tdoa/nginx/sbin/nginx  /usr/local/tdoa/nginx/sbin/nginx.old
    [root@localhost objs]# pwd
    /usr/local/src/nginx-1.12.1/objs
    [root@localhost objs]# cp nginx
    nginx    nginx.8  
    [root@localhost objs]# cp nginx /usr/local/tdoa/nginx/sbin/
    [root@localhost objs]# /usr/local/tdoa/nginx/sbin/nginx -v
    nginx version: nginx/1.12.1
    [root@localhost objs]# /usr/local/tdoa/nginx/sbin/nginx -t
    nginx: the configuration file /usr/local/tdoa/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/tdoa/nginx/conf/nginx.conf test is successful
    [root@localhost objs]# /usr/local/tdoa/nginx/sbin/nginx -s reload
    [root@localhost objs]# netstat  -tnlp |grep 80
    tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      98457/nginx         
    tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1680/cupsd          
    tcp        0      0 ::1:631                     :::*                        LISTEN      1680/cupsd
    
  • 相关阅读:
    程序集、属性和元数据
    wget 使用探索
    为wget使用代理
    创建项目 (Visual C#)
    wget 下载整个网站,或者特定目录
    演练:使用 Visual C# 创作用户控件
    NavigateUrl属性绑定 天高地厚
    【转载】Repeater控件里的大智慧 天高地厚
    【转载】ASP.NET Page 那点事 天高地厚
    意向锁如何提高性能 天高地厚
  • 原文地址:https://www.cnblogs.com/liangml/p/8510465.html
Copyright © 2020-2023  润新知