windows 下编译 nginx-quic

1. 下载nginx-quic 源码

下载nginx-quic

在这里插入图片描述
下载后的版本号为

nginx-quic-3be953161026.zip

2. 下载msys2

下载msys2

在这里插入图片描述

3. 准备编译环境

安装 MSYS2
在这里插入图片描述
安装完成后执行以下命令更新包 在msys2 控制台中执行
pacman -Syu
安装编译工具
pacman -S --needed base-devel mingw-w64-x86_64-toolchain

在这里插入图片描述

在这个控制台执行gcc
在这里插入图片描述

下载 libressl

解压 libressl-3.6.0.tar.gz 到 libressl
在这里插入图片描述

下载 http://www.zlib.net/
在这里插入图片描述

下载 https://sourceforge.net/projects/pcre/
在这里插入图片描述

导航到 msys2 安装目录 D:\soft\msys2\home\xueji

下载 https://github.com/openssl/openssl#download

git clone git://git.openssl.org/openssl.git

解压 nginx-quic-3be953161026.zip 到 nginx-quic-3be953161026
在这里插入图片描述
在这里插入图片描述

cd nginx-quic-3be953161026/

在这里插入图片描述

配置

./auto/configure       --with-debug                                \
                       --prefix= \
					   --conf-path=conf/nginx.conf \
					   --pid-path=logs/nginx.pid \
					   --http-log-path=logs/access.log \
					   --error-log-path=logs/error.log \
					   --sbin-path=nginx.exe \
					   --http-client-body-temp-path=temp/client_body_temp \
					   --http-proxy-temp-path=temp/proxy_temp \
					   --http-fastcgi-temp-path=temp/fastcgi_temp \
					   --http-scgi-temp-path=temp/scgi_temp \
					   --http-uwsgi-temp-path=temp/uwsgi_temp \
                       --with-openssl=openssl                      \
                       --with-pcre=pcre                            \
                       --with-zlib=zlib                            \
					   --with-http_v2_module                       \
                       --with-http_ssl_module                      \
	                   --with-http_v3_module                       \
	                   --with-stream_quic_module                   \
                       --with-cc-opt="-I../libressl/build/include" \
                       --with-ld-opt="-L../libressl/build/lib"

在这里插入图片描述

安装cmake

$ pacman -S make cmake
resolving dependencies...
looking for conflicting packages...

在这里插入图片描述

在这里插入图片描述

编译过程,需要在 mingw64.exe 命令行中编译,不能直接在 msys2.exe 中执行

xueji@xue MINGW64 ~/nginx-quic-3be953161026
$ ./auto/configure       --with-debug                                \
                       --prefix= \
                                           --conf-path=conf/nginx.conf \
                                           --pid-path=logs/nginx.pid \
                                           --http-log-path=logs/access.log \
                                           --error-log-path=logs/error.log \
                                           --sbin-path=nginx.exe \
                                           --http-client-body-temp-path=temp/client_body_temp \
                                           --http-proxy-temp-path=temp/proxy_temp \
                                           --http-fastcgi-temp-path=temp/fastcgi_temp \
                                           --http-scgi-temp-path=temp/scgi_temp \
                                           --http-uwsgi-temp-path=temp/uwsgi_temp \
                       --with-openssl=openssl                      \
                       --with-pcre=pcre                            \
                       --with-zlib=zlib                            \
                                           --with-http_v2_module                       \
                       --with-http_ssl_module                      \
                           --with-http_v3_module                       \
                           --with-stream_quic_module                   \
                       --with-cc-opt="-I../libressl/build/include" \
                       --with-ld-opt="-L../libressl/build/lib"
checking for OS
 + MINGW64_NT-10.0-22621 3.3.6-341.x86_64 x86_64
 + using GNU C compiler
 + gcc version: 12.2.0 (Rev4, Built by MSYS2 project)
checking for gcc -pipe switch ... found
checking for MINGW64_NT-10.0-22621 specific features
creating objs/Makefile

Configuration summary
  + using PCRE library: pcre
  + using OpenSSL library: openssl
  + using zlib library: zlib

  nginx path prefix: ""
  nginx binary file: "/nginx.exe"
  nginx modules path: "/modules"
  nginx configuration prefix: "/conf"
  nginx configuration file: "/conf/nginx.conf"
  nginx pid file: "/logs/nginx.pid"
  nginx error log file: "/logs/error.log"
  nginx http access log file: "/logs/access.log"
  nginx http client request body temporary files: "temp/client_body_temp"
  nginx http proxy temporary files: "temp/proxy_temp"
  nginx http fastcgi temporary files: "temp/fastcgi_temp"
  nginx http uwsgi temporary files: "temp/uwsgi_temp"
  nginx http scgi temporary files: "temp/scgi_temp"


xueji@xue MINGW64 ~/nginx-quic-3be953161026
$ make
make -f objs/Makefile
make[1]: Entering directory '/home/xueji/nginx-quic-3
...
....

没搞定

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值