https://blog.csdn.net/fireroll/article/details/51985688

Windows机器配置:
Windows7旗舰版 64位
Intel(R) Core(TM)i5-2520 CPU @2.50GHz 2.50 GHz
内存: 4GB

1. 下载 nginx 1.7.11.3 Gryphon
下载链接: http://nginx-win.ecsds.eu/download/nginx 1.7.11.3 Gryphon.zip
下载完成后解压;
将解压后的目录名:
  nginx 1.7.11.3 Gryphon
改成:
  nginx-1.7.11.3-Gryphon

2. 下载服务器状态检查程序 stat.xsl
https://github.com/arut/nginx-rtmp-module/

将nginx-rtmp-module-master.zip解压后复制到目录:nginx-1.7.11.3-Gryphon下,
保证stat.xls的目录为:
nginx-1.7.11.3-Gryphon\nginx-rtmp-module\stat.xsl

3. 配置文件 conf\nginx-win-rtmp.conf 内容如下:

#user  nobody;
# multiple workers works !
worker_processes  2;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  8192;
    # max value 32768, nginx recycling connections+registry optimization = 
    #   this.value * 20 = max concurrent connections currently tested with one worker
    #   C1000K should be possible depending there is enough ram/cpu power
    # multi_accept on;
}

rtmp {
    server {
        listen 1935;
        chunk_size 4000;
        application live {
             live on;
        }
    }
}

http {
    #include      /nginx/conf/naxsi_core.rules;
    include       mime.types;
    default_type  application/octet-stream;

#log_format  main  '$remote_addr:$remote_port - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  logs/access.log  main;

#     # loadbalancing PHP
#     upstream myLoadBalancer {
#         server 127.0.0.1:9001 weight=1 fail_timeout=5;
#         server 127.0.0.1:9002 weight=1 fail_timeout=5;
#         server 127.0.0.1:9003 weight=1 fail_timeout=5;
#         server 127.0.0.1:9004 weight=1 fail_timeout=5;
#         server 127.0.0.1:9005 weight=1 fail_timeout=5;
#         server 127.0.0.1:9006 weight=1 fail_timeout=5;
#         server 127.0.0.1:9007 weight=1 fail_timeout=5;
#         server 127.0.0.1:9008 weight=1 fail_timeout=5;
#         server 127.0.0.1:9009 weight=1 fail_timeout=5;
#         server 127.0.0.1:9010 weight=1 fail_timeout=5;
#         least_conn;
#     }

sendfile        off;
    #tcp_nopush     on;

server_names_hash_bucket_size 128;

## Start: Timeouts ##
    client_body_timeout   10;
    client_header_timeout 10;
    keepalive_timeout     30;
    send_timeout          10;
    keepalive_requests    10;
## End: Timeouts ##

#gzip  on;

server {
        listen       80;
        server_name  localhost;

location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }
        location /stat.xsl {
            root nginx-rtmp-module/;
        }
        location /control {
            rtmp_control all;
        }

#charset koi8-r;
        #access_log  logs/host.access.log  main;

## Caching Static Files, put before first location
        #location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
        #    expires 14d;
        #    add_header Vary Accept-Encoding;
        #}

# For Naxsi remove the single # line for learn mode, or the ## lines for full WAF mode
        location / {
            #include    /nginx/conf/mysite.rules; # see also http block naxsi include line
            ##SecRulesEnabled;
         ##DeniedUrl "/RequestDenied";
         ##CheckRule "$SQL >= 8" BLOCK;
         ##CheckRule "$RFI >= 8" BLOCK;
         ##CheckRule "$TRAVERSAL >= 4" BLOCK;
         ##CheckRule "$XSS >= 8" BLOCK;
            root   html;
            index  index.html index.htm;
        }

# For Naxsi remove the ## lines for full WAF mode, redirect location block used by naxsi
        ##location /RequestDenied {
        ##    return 412;
        ##}

## Lua examples !
#         location /robots.txt {
#           rewrite_by_lua '
#             if ngx.var.http_host ~= "localhost" then
#               return ngx.exec("/robots_disallow.txt");
#             end
#           ';
#         }

#error_page  404              /404.html;

# redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000; # single backend process
        #    fastcgi_pass   myLoadBalancer; # or multiple, see example above
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

# deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }

# another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

#    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

# HTTPS server
    #
    #server {
    #    listen       443 ssl spdy;
    #    server_name  localhost;

#    ssl                  on;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
    #    ssl_session_timeout  5m;
    #    ssl_prefer_server_ciphers On;
    #    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    #    ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:ECDH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!eNULL:!MD5:!DSS:!EXP:!ADH:!LOW:!MEDIUM;

#    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}

4. 启动服务器
进入windows的cmd; 
> cd nginx-1.7.11.3-Gryphon
> nginx.exe -c conf\nginx-win-rtmp.conf
---------------------
作者:北雨南萍
来源:CSDN
原文:https://blog.csdn.net/fireroll/article/details/51985688
版权声明:本文为博主原创文章,转载请附上博文链接!

windows下搭建基于nginx的rtmp服务器的更多相关文章

  1. 在Windows下搭建基于nginx的视频直播和点播系统

    http://my.oschina.net/gaga/blog/478480 一.软件准备 由于nginx原生是为linux服务的,因此官方并没有编译好的windows版本可以下载,要在windows ...

  2. Windows下搭建基于SSH的Git服务器

    Git客户端安装 客户端要同时安装在远程服务器和自己的电脑上,下载地址:http://msysgit.github.io/ 选择安装组件 :也可以默认选择; 图标组件(Addition icons) ...

  3. Windows 7下 搭建 基于 ssh 的sftp 服务器

    Windows  xp 下 搭建 基于  ssh 的sftp 服务器,服务器端可以用 freesshd,F-secure server等,filezilla server不可用,之前傻乎乎的用file ...

  4. windows下编译基于nginx插件的rtmp流媒体服务nginx-rtmp

    1 概述 rtmp流媒体服务器,开源方案有多种,包括srs,red5,crtmpserver,fms,nginx插件等.本文描述了基于nginx插件的方式来实现rtmp流媒体服务器nginx-rtmp ...

  5. windows 下搭建简易nginx+PHP环境

    2016年11月19日 14:40:16 星期六 官网下载 nginx, php windows下的源码包(windows下不用安装, 解压即可) 修改配置文件, (稍后补上) 路径如下: 启动脚本: ...

  6. 在window系统下搭建基于ssh的git服务器

    以下是基于window server 2012搭建的,学习搭建过程需要很多问题,找了许多文章做了一下总结. 1.所需的软件 Git for Windows: MsysGit(Git-1.7.4-pre ...

  7. windows下搭建属于自己的web服务器

    这次需要记录一下我搭建web服务器的过程. 第一步,确定自己要使用的平台:这次我用的是windows2008 server版本 第二步,计划是想要纯手工的安装apache.php等.但是我们可以下载一 ...

  8. windows下搭建ffmpeg+nginx+rtmp-module搭建实时视频环境

    下载ffmpeg的Windows静态版: https://ffmpeg.zeranoe.com/builds/win64/static/下载nginx-rtmp-windows版:https://gi ...

  9. Windows下搭建PHP开发环境-WEB服务器

    PHP集成开发环境有很多,如XAMPP.AppServ......只要一键安装就把PHP环境给搭建好了.但这种安装方式不够灵活,软件的自由组合不方便,同时也不利于学习.所以我还是喜欢手工搭建PHP开发 ...

随机推荐

  1. c# 串行化事件

  2. Crossover 19(Mac运行Windows应用程序)

    怎样才能在Mac上运行Windows应用程序?相信这是很多朋友都在问的问题,今天macdown(mac软件平台)小编为大家带来Crossover 19 Mac版下载,Crossover 19 mac版 ...

  3. MySQL进阶11--DDL数据库定义语言--库创建/修改/删除--表的创建/修改/删除/复制

    /*进阶 11 DDL 数据库定义语言 库和表的管理 一:库的管理:创建/修改/删除 二:表的管理:创建/修改/删除 创建: CREATE DATABASE [IF NOT EXISTS] 库名; 修 ...

  4. BZOJ4802 欧拉函数 (Pollard-Rho Miller-Robin)

    题目 求大数的欧拉函数φ\varphiφ 题解 Pollard-Rho 板子 CODE #pragma GCC optimize (3) #include <bits/stdc++.h> ...

  5. Linux命令的详解

           cat /etc/passwd文件中的每个用户都有一个对应的记录行,记录着这个用户的一下基本属性.该文件对所有用户可读.               /etc/shadow  文件正如他 ...

  6. 没有向ZK写offset数据

    两天公司要学习kafka,结合之前的storm,做了一个简单的集成,之前也参考了网上的例子一些例子,发现或多或少都有一些问题.所以自己做了一个. 这个是网上其他人遇到的问题,给摘录一下,防止以后自己和 ...

  7. 51nod 1488 帕斯卡小三角 斜率优化

    思路:斜率优化 提交:\(2\)次 错因:二分写挂 题解: 首先观察可知, 对于点\(f(X,Y)\),一定是由某个点\((1,p)\),先向下走,再向右下走. 并且有个显然的性质,若从\((1,p) ...

  8. 三十.数据库服务概述 构建MySQL服务器 、 数据库基本管理 MySQL数据类型

    mysql50:192.168.4.50 1.构建MySQL服务器 安装MySQL-server.MySQl-client软件包 修改数据库用户root的密码 确认MySQL服务程序运行.root可控 ...

  9. bzoj 3498

    统计三元环 很多代码在bzoj都T诶 #include <iostream> #include <cstdio> #include <algorithm> #inc ...

  10. [Luogu] 选学霸

    https://www.luogu.org/problemnew/show/P2170 并查集+DP #include <iostream> #include <cstring> ...