zoukankan      html  css  js  c++  java
  • nginx安装配置

    3.1. 源码编译方式:

    安装make:yum -y install autoconf automake make

    安装g++: yum -y install gcc gcc-c++ 

    #一般系统中已经装了了make和g++,无须再装

       

    yum -y install pcre pcre-devel    

    yum -y install zlib zlib-devel

    yum install -y openssl openssl-devel

    #安装nginx依赖的库

    wget  http://nginx.org/download/nginx-1.15.8.tar.gz

    tar -zxvf nginx-1.15.8.tar.gz

    cd nginx-1.15.8

    ./configure   --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module 

    #配置

    #--prefix指定安装目录

    #--with-http_ssl_module安装https模块

    #creating objs/Makefile 代表编译成功

    make && make install 

    #make编译

    #make install安装

    3.2. yum方式:

    yum install yum-utils

    yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo

    yum install openresty

    3.3. Nginx目录结构:

    • Conf  配置文件
    • Html   网页文件
    • Logs   日志文件
    • Sbin    二进制程序

    3.4. Nginx常用命令

    启停命令:

    ./nginx -c nginx.conf的文件。如果不指定,默认为NGINX_HOME/conf/nginx.conf

    ./nginx -s stop  停止

    ./nginx -s quit退出

    ./nginx -s reload 重新加载nginx.conf

  • 相关阅读:
    使用paramiko的问题记录
    python常见异常及解决方法
    linux ps -aux各列含义
    常用技能
    超时程序管理
    跨年的总结和展望
    java json和对象互转
    一些常用功能总结
    ResultSet转成java类对象
    python常用功能总结
  • 原文地址:https://www.cnblogs.com/Soy-technology/p/11355599.html
Copyright © 2011-2022 走看看