参考:
一、ubuntu环境准备
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
二、nginx源码编译
wget https://nginx.org/download/nginx-1.16.1.tar.gz
git clone https://github.com/arut/nginx-rtmp-module.git
./configure --prefix=/opt/nginx --add-module=../nginx-rtmp-module --with-http_ssl_module
make
sudo make install
三、配置
wget -o init-deb.sh http://library.linode.com/assets/660-init-deb.sh
sudo mv init-deb.sh /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx
sudo /usr/sbin/update-rc.d -f nginx defaults
sudo service nginx start
vi /usr/local/nginx/conf/nginx.conf
vi /usr/local/nginx/conf/nginx.conf.default
#注意:这两处的配置文件都需要更改,此乃大坑
#在文件后添加,其它详细配置自行添加
rtmp{
server{
listen 1935;
application live{
live on;
}
}
}
service nginx restart
posted on 2019-12-26 11:38
lfc 阅读(3536)
评论(0) 编辑 收藏 引用