• Nginx编译安装


    下载安装包

    wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz
    wget http://www.zlib.net/zlib-1.2.11.tar.gz
    wget ftp://ftp.pcre.org/pub/pcre/pcre-8.45.tar.gz
    wget http://nginx.org/download/nginx-1.20.1.tar.gz
    wget wget https://github.com/openresty/echo-nginx-module/archive/v0.61.tar.gz
    wget https://github.com/openresty/echo-nginx-module/archive/v0.61.tar.gz
    wget https://github.com/3078825/nginx-image/archive/master.zip

    解压到/usr/local/src目录

    [root@localhost nginx]# ll /usr/local/src
    total 24
    drwxr-xr-x. 11 root root 4096 Jun 21 08:44 nginx-1.20.1
    drwxrwxr-x. 19 root root 4096 Jun 21 10:17 openssl-1.1.1k
    drwxr-xr-x. 9 1169 1169 12288 Jun 21 10:18 pcre-8.45
    drwxr-xr-x. 14 501 games 4096 Jun 21 10:18 zlib-1.2.11
    [root@localhost nginx]#

    编译安装

    [root@localhost nginx]# cd /usr/local/src/nginx-1.20.1/
    [root@localhost nginx-1.20.1]# pwd
    /usr/local/src/nginx-1.20.1
    [root@localhost nginx-1.20.1]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-file-aio --with-http_realip_module --with-http_gzip_static_module --with-zlib=/usr/local/src/zlib-1.2.11 --with-pcre=/usr/local/src/pcre-8.45 --with-openssl=/usr/local/src/openssl-1.1.1k

    [root@localhost nginx-1.20.1]# make && make install

    以上是简易安装,平常项目中需要安装相关模组,以下是典型安装的配置命令

    ./configure --prefix=/usr/local/nginx --with-http_image_filter_module --with-http_stub_status_module --with-http_ssl_module --with-file-aio --with-http_realip_module --with-http_gzip_static_module --with-zlib=/usr/local/src/zlib-1.2.11 --with-pcre=/usr/local/src/pcre-8.45 --with-openssl=/usr/local/src/openssl-1.1.1k --add-module=/usr/local/src/nginx/echo-nginx-module-0.61 --add-module=/usr/local/src/nginx/ngx_image_thumb-master

  • 相关阅读:
    omnibus gitlab-ce安装
    Helm
    pod状态为Back-off
    我的博客即将入驻“云栖社区”,诚邀技术同仁一同入驻。
    云主机搭建Kubernetes 1.10集群
    Linux清除Windows密码
    Nginx负载均衡之健康检查
    MariaDB主从复制搭建
    Python基础
    Tomcat URL重写
  • 原文地址:https://www.cnblogs.com/102x/p/14914889.html
Copyright © 2020-2023  润新知