nginx及nginx-rtmp-module安装

十年热恋 提交于 2019-12-01 20:45:00


系统说明:

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媒体服务器。






标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!