zoukankan      html  css  js  c++  java
  • 【nginx】安装nginx

    1.去官网下载一个nginx压缩包(推荐使用稳定版本)

    2.选择一个目录(由于是基础操作就不贴代码了)

    3.上传安装包至服务器(由于是基础操作就详细说了)

    4.安装环境

    (1)安装gcc
    yum install gcc-c++
    
    (2)安装zlib压缩与解压缩依赖
    yum install -y zlib zlib-devel
    
    (3)安装PRCE库
    yum install -y pcre pcre-devel
    
    (4)安装ssl
    yum install -y openssl openssl-devel

     

    5.解压压缩包

    tar -zxvf nginx-1.16.1.tar.gz

    创建临时目录

    mkdir /var/temp/nginx -p

    6. 粘贴到控制台

    ./configure 
    --prefix=/usr/local/nginx 
    --pid-path=/var/run/nginx/nginx.pid 
    --lock-path=/var/lock/nginx.lock 
    --error-log-path=/var/log/nginx/error.log 
    --http-log-path=/var/log/nginx/access.log 
    --with-http_gzip_static_module 
    --http-client-body-temp-path=/var/temp/nginx/client 
    --http-proxy-temp-path=/var/temp/nginx/proxy 
    --http-fastcgi-temp-path=/var/temp/nginx/fastcgi 
    --http-uwsgi-temp-path=/var/temp/nginx/uwsgi  
    --http-scgi-temp-path=/var/temp/nginx/scgi

    7.输入make

    8.输入make install

    9.输入

    whereis nginx    
    这里会得到nginx安装目录

    10. 进入到nginx的安装目录,进入sbin,并启动

    cd (刚刚控制台返回的路径)
    cd sbin
    ./nginx

     

  • 相关阅读:
    List集合之Vector分析
    List集合之ArrayList分析
    Linux下的tar压缩解压缩命令详解
    第五次会议(4.7)
    第四次会议(3.31)
    第三次会议(3.17)
    第二次会议(3.9)
    第一次会议(3.1)
    团队的Kick off
    Parse error: syntax error, unexpected T_ENDFOREACH in..报错处理
  • 原文地址:https://www.cnblogs.com/impyu/p/12639389.html
Copyright © 2011-2022 走看看