linux 搭建nginx + rtmp服务器
一 环境准备
虚拟机ubuntu 装备,安装一些nginx 必要的依赖和服务
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install openssl libssl-dev
下载 nginx和 nginx-rtmp-module, github
http://nginx.org/download/nginx-1.8.1.tar.gz
https://github.com/arut/nginx-rtmp-module
二 配置并编译nginx
在makefile 同目录下运行如下
./configure --prefix=/usr/local/nginx
make
make install
--prefix= 后面是需要安装的目录
配置path
把nginx 目录下的 sbin加入到路径里面
添加 nginx-rtmp-module,增加rtmp功能
./configure --add-module=/opt/module/nginx-rtmp-module
make
make install
-- add-module 添加解压的nginx-rtmp-module 目录即可 </