Debian 8.2下的Nginx+rtmp-module 编译安装

##############################################################
#Debian 8.2下的Nginx+rtmp-module 编译安装
#2016/2/6
#My_Jin
##############################################################
#编译环境准备
#Debian / Ubuntu 平台
apt-get install build-essential
apt-get install libtool

#Centos平台
#安装make:
yum -y install gcc automake autoconf libtool make
#安装g++:
yum install gcc gcc-c++

#默认使用路径为/data0

#PCRE install
# download link -- http://jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.tar.gz
cd /data0
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
tar -zxvf pcre-8.38.tar.gz
cd pcre-8.38
./configure
make
make install

#Zlib install
# download link -- http://zlib.net/zlib-1.2.8.tar.gz
cd /data0
wget http://zlib.net/zlib-1.2.8.tar.gz
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make
make install

#OpenSSL install
#download link -- http://www.openssl.org/source/openssl-1.0.1r.tar.gz
#openssl github url:https://github.com/openssl/openssl.git
cd /data0
wget http://www.openssl.org/source/openssl-1.0.1r.tar.gz
tar -zxvf openssl-1.0.1r.tar.gz

#nginx-rtmp-module install
#rtmp module github -- https://github.com/arut/nginx-rtmp-module.git
git clone https://github.com/arut/nginx-rtmp-module.git

#Nginx download and config
#Nginx download link -- http://nginx.org/download/nginx-1.8.1.tar.gz
cd /data0
wget http://nginx.org/download/nginx-1.8.1.tar.gz
tar -zxvf nginx-1.8.1.tar.gz
cd nginx-1.8.1
#此为查看方便 实际情况下为一行
#./configure --sbin-path=/usr/local/nginx/nginx
#--conf-path=/usr/local/nginx/nginx.conf
#--pid-path=/usr/local/nginx/nginx.pid
#--with-http_ssl_module
#--with-pcre=/data0/pcre-8.38
#--with-zlib=/data0/zlib-1.2.8
#--with-openssl=/data0/openssl-1.0.1r
#--add-module=/data0/nginx-rtmp-module

./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=/data0/pcre-8.38 --with-zlib=/data0/zlib-1.2.8 --with-openssl=/data0/openssl-1.0.1r --add-module=/data0/nginx-rtmp-module

make
make install

 

 

#nginx.conf file configure

rtmp {
server {
listen 1935;

application live {
live on;
}
#application hls {
# live on;
# hls on;
# hls_path /tmp/hls;
#}
}
}

location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /tmp;
add_header Cache-Control no-cache;
}

 

#直播地址
rtmp://192.168.200.8/live/test1

原文链接: https://www.cnblogs.com/my-jin/p/5229281.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    Debian 8.2下的Nginx+rtmp-module 编译安装

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/229351

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月13日 下午2:18
下一篇 2023年2月13日 下午2:18

相关推荐