在Win32上用VC编译nginx
来源:互联网 发布:nginx tcp 域名重定向 编辑:程序博客网 时间:2024/06/12 04:40
编译前准备
1、编译器,Microsoft VisualStudio® 8 或 10支持编译,网上有VC8支持不够好的案例;
2、Bash命令执行外壳程序,下载MSYS(http://www.mingw.org/wiki/MSYS)并安装;
3、Perl脚本运行环境,如果把OpenSSL编译进来以便支持SSL,需要下载安装ActivePerl(http://www.activestate.com/activeperl) 或Strawberry Perl(http://strawberryperl.com/);
4、下载•Mercurial 客户端,http://mercurial.selenic.com/;
5、下载•PCRE, zlib 和OpenSSL的C语言库文件:
PCRE:http://www.pcre.org/
Zlib:http://zlib.net/
OpenSSL:http://www.openssl.org/。
6、配置PATH:Perl、MSYS、Mercurial安装路径下执行文件所在路径加入到PATH环境变量,VC的环境变量设置可以运行VC安装目录下的vcvarsall.bat配置。
7、运行MSYS;
8、从hg.nginx.org上检出源码:hg clone http://hg.nginx.org/nginx
9、创建编译目录和lib库文件目录,并把下载的库文件拷贝到该目录:
• mkdir objs
• mkdir objs/lib
• cd objs/lib
• tar -xzf ../../pcre-8.32.tar.gz
• tar -xzf ../../zlib-1.2.7.tar.gz
• tar -xzf ../../openssl-1.0.1e.tar.gz
运行configure脚本生成编译文件
· auto/configure --with-cc=cl --builddir=objs--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\
--with-cc-opt=-DFD_SETSIZE=1024--with-pcre=objs/lib/pcre-8.32 \
--with-zlib=objs/lib/zlib-1.2.7--with-openssl=objs/lib/openssl-1.0.1e \
--with-select_module--with-http_ssl_module --with-ipv6
运行nmake完成编译
nmake -f objs/Makefile
- 在Win32上用VC编译nginx
- nginx 在suse 10上的编译
- Nginx 在 Windows 平台上编译
- LibUSB-Win32 在Windows7上使用vs2010编译过程
- VC编译nginx
- 编译 Win32 上 CVS Emacs
- 在Debain Sarge或Etch上编译nginx
- 在CENT OS 上编译安装NGINX+PHP+MYSQL
- 在raspberry Pi上编译安装Nginx服务器
- nginx在linux和windows系统上的编译安装
- 在Windows上使用VC编译并安装ACE
- 在已有nginx上添加模块以及在已有安装包上编译nginx
- easylzma在Win32下编译
- ffmpeg在win32中的编译
- 为什么我照书写的win32程序在vs上编译不了?
- 在Win32下用VS2008编译PHP扩展
- VC 在WIN32 中 使用 GDIPlus
- 解决 “VC++ 多线程编程,win32,MFC 例子(转)”在高版本上运行有错误的问题
- HDU 1171 Big Event in HDU(01背包问题)
- maven的安装配置
- programing studying notes no.1--用processing描述球体碰撞
- Maven详解之仓库------本地仓库、远程仓库
- HDU 5492 Find a path
- 在Win32上用VC编译nginx
- Maven安装及与Eclipse集成
- Binary Tree Zigzag Level Order Traversal
- HDU 1196 Lowest Bit(水~)
- 条款20:宁以pass-by-reference-to-const替换pass-by-value
- Cannot open the disk 'F:\vmvare2\shared40' or one of the snapshot disks it depends on.
- Majority Element II
- ubuntu 启动 svn open db/txn-current-lock - permission denied
- android中的HttpClient,Delete请求