Openresty Series - Win11 & ( Nginx & Lua & Batch )
msys2
pacman
/etc/pacman.d/mirrorlist.mingw64
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64
pacman -S mingw-w64-x86_64-toolchain
pacman -S openssl openssl-devel zlib zlib-devel pcre pcre-devel
Download
/home/unix2linux/openresty-master/openresty-1.27.1.1>
git clone https://gitee.com/mirrors_bungle/ngx_http_proxy_connect_module
/home/unix2linux/openresty-master/openresty-1.27.1.1/objs/lib>
wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz --no-check-certificate
wget https://zlib.net/fossils/zlib-1.3.1.tar.gz
wget http://downloads.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.gz
/home/unix2linux/openresty-master/openresty-1.27.1.1/objs/lib>lf
openssl-1.1.1w/ pcre-8.45/ zlib-1.3.1/
/home/unix2linux/openresty-master/openresty-1.27.1.1>ls
COPYRIGHT README.markdown bundle ngx_http_proxy_connect_module patches
README-windows.txt build configure objs
configure
/home/unix2linux/openresty-master/openresty-1.27.1.1>
PCRE=pcre-8.45
ZLIB=zlib-1.3.1
OPENSSL=openssl-1.1.1w
JOBS=12
./configure \
--with-cc=gcc \
--prefix=openresty \
--with-cc-opt='-DFD_SETSIZE=1024' \
--sbin-path=nginx.exe \
--with-pcre-jit \
--without-http_rds_json_module \
--without-http_rds_csv_module \
--without-lua_rds_parser \
--with-ipv6 \
--with-stream \
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-http_v2_module \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
--with-http_stub_status_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_auth_request_module \
--with-http_secure_link_module \
--with-http_random_index_module \
--with-http_gzip_static_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-select_module \
--with-luajit-xcflags="-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT" \
--with-pcre=objs/lib/$PCRE \
--with-zlib=objs/lib/$ZLIB \
--with-openssl=objs/lib/$OPENSSL \
--add-module=ngx_http_proxy_connect_module
patch
/home/unix2linux/openresty-master/openresty-1.27.1.1>patch -d build/nginx-1.27.1/ -p 1 < ./ngx_http_proxy_connect_module/patch/proxy_connect_rewrite_1015.patch
ngx_http_parse
./build/nginx-1.27.1/src/http/ngx_http_parse.c
state =sw http_09; state = swhost http_09;
Makefile
make
/home/unix2linux/openresty-master/openresty-1.27.1.1>make
cd /home/unix2linux/openresty-master/openresty-1.27.1.1/build/LuaJIT-2.1-20241104 && make TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC='gcc' PREFIX=openresty/luajit
make[1]: Entering directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/LuaJIT-2.1-20241104'
==== Building LuaJIT 2.1 ====
make -C src
make[2]: Entering directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/LuaJIT-2.1-20241104/src'
make[2]: Nothing to be done for 'default'.
make[2]: Leaving directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/LuaJIT-2.1-20241104/src'
==== Successfully built LuaJIT 2.1 ====
make[1]: Leaving directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/LuaJIT-2.1-20241104'
cd /home/unix2linux/openresty-master/openresty-1.27.1.1/build/lua-cjson-2.1.0.14 && make DESTDIR=/home/unix2linux/openresty-master/openresty-1.27.1.1/ LUA_INCLUDE_DIR=/home/unix2linux/openresty-master/openresty-1.27.1.1/build/luajit-root/include/luajit-2.1 LUA_CMODULE_DIR=openresty/lualib LUA_MODULE_DIR=openresty/lualib CJSON_LDFLAGS="-shared -L/home/unix2linux/openresty-master/openresty-1.27.1.1/build/luajit-root -llua51" CJSON_CFLAGS="-g -fpic" CC='gcc'
make[1]: Entering directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/lua-cjson-2.1.0.14'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/lua-cjson-2.1.0.14'
cd /home/unix2linux/openresty-master/openresty-1.27.1.1/build/lua-redis-parser-0.13 && make DESTDIR=/home/unix2linux/openresty-master/openresty-1.27.1.1/ LUA_INCLUDE_DIR=/home/unix2linux/openresty-master/openresty-1.27.1.1/build/luajit-root/include/luajit-2.1 LUA_LIB_DIR=openresty/lualib LDFLAGS="-shared -L/home/unix2linux/openresty-master/openresty-1.27.1.1/build/luajit-root -llua51" CC='gcc'
make[1]: Entering directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/lua-redis-parser-0.13'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/lua-redis-parser-0.13'
cd /home/unix2linux/openresty-master/openresty-1.27.1.1/build/nginx-1.27.1 && make
make[1]: Entering directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/nginx-1.27.1'
make -f objs/Makefile
.........
tream_lua_input_filters.o \
objs/addon/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.o \
objs/ngx_modules.o \
-L/home/unix2linux/openresty-master/openresty-1.27.1.1/build/luajit-root -L/home/unix2linux/openresty-master/openresty-1.27.1.1/build/luajit-root -Wl,--export-all-symbols -Wl,-E -Wl,--export-all-symbols -Wl,-E -ladvapi32 -lws2_32 -L/home/unix2linux/openresty-master/openresty-1.27.1.1/build/luajit-root -llua51 -L/home/unix2linux/openresty-master/openresty-1.27.1.1/build/luajit-root -llua51 /home/unix2linux/openresty-master/openresty-1.27.1.1/objs/lib/pcre-8.45/.libs/libpcre.a /home/unix2linux/openresty-master/openresty-1.27.1.1/objs/lib/openssl-1.1.1w/.openssl/lib/libssl.a /home/unix2linux/openresty-master/openresty-1.27.1.1/objs/lib/openssl-1.1.1w/.openssl/lib/libcrypto.a -lgdi32 -lcrypt32 -lws2_32 /home/unix2linux/openresty-master/openresty-1.27.1.1/objs/lib/zlib-1.3.1/libz.a \
-Wl,-E -Wl,--export-all-symbols -Wl,--out-implib=objs/libnginx.a
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe
: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?
sed -e "s|%%PREFIX%%|openresty|" \
-e "s|%%PID_PATH%%|openresty/logs/nginx.pid|" \
-e "s|%%CONF_PATH%%|openresty/conf/nginx.conf|" \
-e "s|%%ERROR_LOG_PATH%%|openresty/logs/error.log|" \
< docs/man/nginx.8 > objs/nginx.8
make[2]: Leaving directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/nginx-1.27.1'
make[1]: Leaving directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/nginx-1.27.1'
make install
/home/unix2linux/openresty-master/openresty-1.27.1.1>make install
cd /home/unix2linux/openresty-master/openresty-1.27.1.1/build/LuaJIT-2.1-20241104 && make TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC='gcc' PREFIX=openresty/luajit
make[1]: Entering directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/LuaJIT-2.1-20241104'
==== Building LuaJIT 2.1 ====
make -C src
make[2]: Entering directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/LuaJIT-2.1-20241104/src'
make[2]: Nothing to be done for 'default'.
make[2]: Leaving directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/LuaJIT-2.1-20241104/src'
==== Successfully built LuaJIT 2.1 ====
......
make[2]: Leaving directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/nginx-1.27.1'
make[1]: Leaving directory '/home/unix2linux/openresty-master/openresty-1.27.1.1/build/nginx-1.27.1'
mkdir -p /home/unix2linux/openresty-master/openresty-1.27.1.1/openresty/site/lualib /home/unix2linux/openresty-master/openresty-1.27.1.1/openresty/site/pod /home/unix2linux/openresty-master/openresty-1.27.1.1/openresty/site/manifest
dos
cd D:\msys64\home\unix2linux\openresty-master\openresty-1.27.1.1\openresty
.\luajit -v
.\nginx -v
原文地址:https://blog.csdn.net/unix2linux/article/details/143518487
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!