zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    python_控制台输出带颜色的文字方法
    模拟数据库作业
    js笔记
    CSS 笔记
    html 笔记
    必备技能-Git 使用规范流程
    python 闭包
    30个python编程技巧!
    python 面向对象
    python 线程
  • 原文地址:https://www.cnblogs.com/102x/p/14914889.html
Copyright © 2011-2022 走看看