rtmp服务器创建和设置
1,安装ubuntu 16.4 依赖
sudo apt-get update sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev libgoogle-perftools-dev libperl-dev libtool libpcrecpp0v5 openssl -y
2,安装nginx1.14.2
2.1 下载软件
wget http://nginx.org/download/nginx-1.14.2.tar.gz
2.2 解压软件到当前目录
tar xvf nginx-1.14.2.tar.gz
3,下载nginx-rtmp-module
git clone https://github.com/adwpc/nginx-rtmp-module.git
4,配置nginx
./configure --sbin-path=/usr/local/nginx/nginx --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-stream --with-mail=dynamic --add-module=../nginx-rtmp-module
5,修改makefile文件,查找并删除“-Werror“字符串
vim nginx-1.14.2/objs/Makefile
6,编译并安装Nginx
make make install
7,修改nginx.conf文件,添加rmtp支持
rtmp { server { listen 1935; application live { live on; } application hls { live on; hls on; hls_path temp/hls; hls_fragment 8s; } } }
8,运行nginx
cd /usr/local/nginx/ ./nginx
9,如果提示创建temp/hls失败,手动创建temp文件夹后,再次运行nginx
相关推荐
nginxs 2020-11-14
Guanjs0 2020-11-13
小木兮子 2020-11-11
yserver 2020-11-11
ssihc0 2020-11-11
windle 2020-11-10
HanksWang 2020-11-10
liuchen0 2020-11-10
Freshairx 2020-11-10
ccschan 2020-11-10
liwf 2020-11-10
Guanjs0 2020-11-09
AderStep 2020-11-09
zrtlin 2020-11-09
mqfcu 2020-11-10
windle 2020-10-29