nginx + nginx-rtmp+module 搭建流媒体服务器
1 安装
yum install-y gcc gcc-c++
2 下载安装 openssl pcre zlib
下载网址分别为
http://www.openssl.org/
http://www.pcre.org/
http://www.zlib.net/
3 分别解压下载的 openssl pcre zlib
tar -zxvf ******* 后面跟下载的文件名
4 切换到解压目录
cd *** cd 后面跟上解压文件名
5 分别执行以下命令
./configure --prefix=/usr/local/**** 后面分别跟上 openssl pcre zlib
分别执行 make && make install
6 下载nginx-rtmp-module
git clone https://github.com/arut/nginx-rtmp-module.git
解压 :
unzip nginx-rtm***......
7 安装Nginx
下载nginx wget http://nginx.org/download/nginx-1.12.2.tar.gz
解压nginx tar -zxvf nginx-1.12.2.tar.gz
切换到nginx解压路经下面,执行下面的代码
./configure --prefix=/usr/local/nginx-1.9.3 --with-openssl=/home/openssl/openssl-1.0.2j --with-pcre=/home/pcre/pcre-8.44 --with-zlib=/home/zlib/zlib-1.2.11 --add-module=/home/nginx/nginx-rtmp-module --with-http_ssl_module
注 : --with-openssl= 后面跟的是下载安装openssl pcre zlib 的解压路径
最后执行 make && make install
8 安装ffmpeg 的教程在 另外一篇博客上面,可参考 https://blog.csdn.net/weixin_45100140/article/details/106019773