zoukankan      html  css  js  c++  java
  • linux下 Nginx 搭建与配置

    • 安装依赖
    yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
    • 下载安装文件
    cd /usr/local
    
    mkdir nginx
    
    cd nginx
    
    wget http://nginx.org/download/nginx-1.15.9.tar.gz
    
    tar -xvf nginx-1.15.9.tar.gz
    • 安装nginx
    
    cd /usr/local/nginx
    
    #支持https和tcp/udp
    ./configure --with-http_ssl_module --with-stream make make install

    #如果想增加其他参数重新配置

    ./configure 所有配置

    make

    cp ./objs/nginx /usr/local/nginx/sbin/

    #最后重启nginx即可
    • nginx常用指令
    校验配置文件 /usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
    
    启动nginx  /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    
    重新加载配置文件 /usr/local/nginx/sbin/nginx -s reload
    
    停止nginx  pkill -9 nginx
    
    平滑重启kill -HUP Nginx主进程号
    
    查看nginx进程ps -ef|grep nginx
  • 相关阅读:
    git知识点总结
    自动化进阶
    unittest单元测试框架
    自动化测试模型
    webdriver
    python文件处理
    uva 11077 置换
    poj 1066 Treasure Hunt
    poj 2661 Factstone Benchmark
    hdu 4180
  • 原文地址:https://www.cnblogs.com/avalon-merlin/p/10494292.html
Copyright © 2011-2022 走看看