nginx及nginx-rtmp-module安装


系统说明: nginx

centos6.2_64 git

1、版本 github

nginx-1.4.4 ubuntu

nginx-rtmp-module-1.0.6 centos

https://github.com/shenhailuanma/nginx-rtmp-module.git 服务器


2、安装 app

./configure --add-module=/root/nginx-rtmp-module-1.0.6 ui

很正常的,出现问题: lua

./configure: error: the HTTP rewrite module requires the PCRE library. spa

安装pcre-devel与openssl-devel解决问题

在centos下:
 
yum -y install pcre-devel openssl openssl-devel

在ubuntu下:

sudo apt-get update 
sudo apt-get install libpcre3 libpcre3-dev 

你可能还须要安装
sudo apt-get install openssl libssl-dev

而后,make,make install就安装完成了。


3、配置文件

#uer  nobody;
worker_processes  1;
error_log  logs/error.log debug;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#pid        logs/nginx.pid;
events {
    worker_connections  1024;
}
rtmp {
    server {
        listen 1935;
        chunk_size 4096;
        application myapp {
            live on;
        }
    }
}



4、运行

/usr/local/nginx/sbin/nginx -c /root/rtmp.conf


OK,利用nginx-rtmp-module,简单实现了一个rtmp媒体服务器。

相关文章
相关标签/搜索