编译windows版nginx-rtmp-module
2016-04-07 12:27
746 查看
编译windows版nginx-rtmp-module
>>>>>整合版,一键运行,点我<<<<<准备工作
要在 Microsoft Win32??平台上编译Nginx你需要:Microsoft Visual C compiler. Microsoft Visual Studio??8 and 10 are known to work.(用来编译)
MSYS.(执行配置脚本)
Perl, if you want to build OpenSSL??and nginx with SSL support. For example?ActivePerl?or?Strawberry
Perl.(注意这里不能使用MSYS的perl)
Mercurial?client.(通过HG下载最新源码)
PCRE,?zlib?and?OpenSSL?libraries sources.(PCRE用来重写url,zlib支持页面压缩,这里编译rtmp模块,必须编译出openssl)
win32版nginx-rtmp-module模块源代码
编译步骤
在开始之前,你需要将Perl,Mercurial,MSYS bin目录加入PATH环境变量,也就是打开cmd,输入perl,hg,bash不会提示找不到命令.运行vcvarsall.bat或者叫Visual Studio命令提示(2010).
敲入bash,进入msys的环境
从hg.nginx.org检出最新的Nginx源代码
hg clone http://hg.nginx.org/nginx
1 | hg clone http://hg.nginx.org/nginx |
mkdir objs/lib -p
cd objs/lib
tar -xzf pcre-8.32.tar.gz
tar -xzf zlib-1.2.8.tar.gz
tar -xzf openssl-1.0.1e.tar.gz
unzip nginx-rtmp-module-win32.zip (也可使用git)
1 2 3 4 5 6 | mkdir objs/lib -p cd objs/lib tar -xzf pcre-8.32.tar.gz tar -xzf zlib-1.2.8.tar.gz tar -xzf openssl-1.0.1e.tar.gz unzip nginx-rtmp-module-win32.zip (也可使用git) |
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
--http-scgi-temp-path=temp/scgi_temp
--http-uwsgi-temp-path=temp/uwsgi_temp
--with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs/lib/pcre-8.32
--with-zlib=objs/lib/zlib-1.2.8 --with-openssl=objs/lib/openssl-1.0.1e
--with-select_module --with-http_ssl_module --add-module=objs/lib/nginx-rtmp-module-win32
1 2 3 4 5 6 7 8 9 10 11 | 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 --http-scgi-temp-path=temp/scgi_temp --http-uwsgi-temp-path=temp/uwsgi_temp --with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs/lib/pcre-8.32 --with-zlib=objs/lib/zlib-1.2.8 --with-openssl=objs/lib/openssl-1.0.1e --with-select_module --with-http_ssl_module --add-module=objs/lib/nginx-rtmp-module-win32 |
nmake -f objs/Makefile
1 | nmake -f objs/Makefile |
使用任意rtmp客户端测试,默认app为myapp的直播应用,请参考官方配置开启record,vod等功能.
注意事项:
由于原作者是在*UNIX环境开发,使用了部分UNIX系统调用,部分功能在windows上暂时无法实现,比如vod 为mp4文件,exec ffmpeg来切片.但作为直播流,点播flv文件,在线录制是没有问题的.
下载撸主的编译版本:
nginx 1.7.10
nginx-rtmp-module 1.1.6
https://github.com/illuspas/nginx-rtmp-win32?
原创文章,转载请注明: 转载自贝壳博客
本文链接地址:
编译windows版nginx-rtmp-module
0
相关文章推荐
- 在Windows下搭建基于nginx的视频直播和点播系统
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- Nginx Permission denied (errno=13) 解决办法
- Rails+Nginx+Passenger安装配置 简洁可靠
- nginx源码分析(4)——事件模型
- nginx源码分析(3)——进程模型
- 【小镇的技术天梯】lanmp服务器集群搭建(3)使用keepalived给nginx双机热备
- 使用花生壳直接访问本地的电脑(例:nginx服务)
- nginx 并发数问题思考:worker_connections,worker_processes与 max clients
- nginx
- nginx 中的ctx什么意思
- nginx安装教程
- Nginx服务器中配置非80端口的端口转发方法详解
- nginx+keepalive主从双机热备+自动切换解决方案
- ubuntu 14.4 nginx环境下安装PHP(版本>= 5.5.9)
- nginx安装及依赖关系的配置记录
- ubuntu linux下源码编译安装nginx
- nginx常用命令
- Nginx
- nginx 限制连接和请求数之外的白名单配置