1,源码包:wget http://nginx.org/download/nginx-1.15.0.tar.gz,
2,扩展:git clone https://github.com/arut/nginx-rtmp-module.git,
3,解压nginx: tar xf nginx-1.15.0.tar.gz
4,编译./configure --with-http_ssl_module --add-module=../nginx-rtmp-module 出错执行下面的,
5,安装插件:yum install git gcc make pcre-devel openssl-devel
6,make
make install
安装:make && make install,
7,systemctl stop firewalld
8,启动:nginx: /usr/local/nginx/sbin/nginx
浏览器 执行自己的ip 出现Welcome to nginx 证明 成功
9,修改配置文件/usr/local/nginx/conf/nginx.conf
[root@fxh /usr/local/nginx/conf]#vi nginx.conf
加:rtmp{
server{
listen 1935;
application hls{
live on;
record off;
}
}
}
location /hls {
#server hls fragments
types{
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
alias /temp/hls;
expires -1;
}
10,下载paly.htmlwen已经配置好的文件
11,/usr/local/nginx/sbin/nginx -s stop
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
12,下载obs