1
Ubuntu 18.04
2
mkdir nginx
cd nginx/
sudo apt update
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
3
sudo apt-get install nginx # 安装Nginx
sudo apt-get install libnginx-mod-rtmp # 安装libnginx-mod-rtmp
4
vim /usr/local/nginx/conf/nginx.conf
在最后添加:
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
}
}
}
5
sudo service nginx reload #不重启重新载入最新配置文件内容
sudo service nginx stop #停止服务
sudo service nginx restart #重启服务
6
ps -ef | grep nginx | grep -v grep #查看nginx启动
netstat -anp | grep nginx #查看端口
可恶的黑客