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

  • 相关阅读:
    Ehcache2 的配置(不使用配置文件)
    约定优于配置
    Eclipse 3.5使用dropins的插件安装方式
    程序开发为什么要使用框架
    关于远程连接MySQL数据库的问题解决
    python使用open经常报错:TypeError: an integer is required的解决方案
    python仿微软记事本
    抓取oschina上面的代码分享python块区下的 标题和对应URL
    单词翻译
    python多线程下载
  • 原文地址:https://www.cnblogs.com/102x/p/14914889.html
Copyright © 2011-2022 走看看