• 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

  • 相关阅读:
    简单RPC框架-业务线程池
    简单RPC框架-基于Consul的服务注册与发现
    简易RPC框架-学习使用
    统一配置中心2
    dubbo+zipkin调用链监控
    Spring Cache扩展:注解失效时间+主动刷新缓存
    转:深入理解Java G1垃圾收集器
    dubbo源码分析(一)
    理解WEB API网关
    理解zookeeper选举机制
  • 原文地址:https://www.cnblogs.com/blue-t/p/14494984.html
Copyright © 2020-2023  润新知