系统说明:
centos6.2_64
一、版本
nginx-1.4.4
nginx-rtmp-module-1.0.6
https://github.com/shenhailuanma/nginx-rtmp-module.git
二、安装
./configure --add-module=/root/nginx-rtmp-module-1.0.6
很正常的,出现问题:
./configure: error: the HTTP rewrite module requires the PCRE library.
安装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就安装完成了。
三、配置文件
#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;
}
}
}
/usr/local/nginx/sbin/nginx -c /root/rtmp.conf
OK,利用nginx-rtmp-module,简单实现了一个rtmp媒体服务器。