zoukankan      html  css  js  c++  java
  • nginx-1.18 编译安装

    环境 centos 7.9

    nginx-1.18

    安装方式 编译安装

    用途:实验项目

    预装:
    yum install -y gcc-c++

    1、安装 pcre -- 正则库
    官网: https://sourceforge.net/projects/pcre/files/pcre/
    wget -cO pcre-8.44.tar.gz https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz/download
    tar xf pcre-8.44.tar.gz
    ./configure
    make && make install
    验证 pcre-config --version

    2、安装 zlib-1.2.11 压缩
    地址 http://www.zlib.net/
    tar zxf zlib-1.2.11.tar.gz

    ./configure
    make && make install

    nginx 安装:
    Nginx下载: https://nginx.org/en/download.html

    创建用户: useradd -r -s /sbin/nologin nginx
    解压 tar -xf nginx-1.18.0.tar.gz
    cd nginx-1.18.0/

    ./configure
    --prefix=/usr/local/nginx
    --user=nginx
    --group=nginx
    --with-http_stub_status_module
    --with-http_ssl_module
    --with-http_realip_module
    --with-http_gzip_static_module
    --with-http_v2_module
    --with-pcre
    --with-stream
    --with-stream_ssl_module
    --with-stream_realip_module

    #--with-zlib=/usr/local/src/zlib-1.2.11
    #--with-pcre=/usr/local/src/pcre-8.44

    注解:
    #./configure --prefix=/usr/local/nginx --without-http_memcached_module --user=www --group=www --with-http_stub_status_module --with-openssl=/usr/ --with-pcre=/usr/local/src/pcre-8.36
    #注意:--with-pcre=/usr/local/src/pcre-8.44 指向的是源码包解压的路径,而不是组件安装的路径,其他亦然
    make
    make install
    查看是否成功 /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

  • 相关阅读:
    VM439:1 https://unidemo.dcloud.net.cn 不在以下 request 合法域名列表中,请参考
    vue点击出现蒙版
    vue实现轮播图
    js函数调用的几种方法
    js中的object类型
    vue报错笔记
    vue中项目如何引入sass (vue-cli项目)
    vue编写轮播图组件
    VSCode配置 Debugger for Chrome插件
    就是一段程序,可以求出N个不等长列表中取N个元素形成的所有组合
  • 原文地址:https://www.cnblogs.com/blue-t/p/14494984.html
Copyright © 2011-2022 走看看