centos下安装nginx
来源:互联网 发布:java协程 编辑:程序博客网 时间:2024/05/17 02:45
1.安装nginx
1.解压安装包
分别解压nginx,pcre,openss,nginx-rtmp-module,nginx_mod_h264_streaming到/root/work/nginx_download目录下,进入nginx解压后的目录nginx-1.6.2
zlib 为了gzip压缩
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
2.安装nginx
./configure\
--prefix=/root/work/nginx_download/nginx\
--with-pcre=../pcre-8.36\
--with-http_stub_status_module\
--with-http_ssl_module\
--add-module=../nginx_mod_h264_streaming-2.2.7\
--add-module=../nginx-rtmp-module-master\
--with-debug --with-openssl=../openssl-1.0.1j
make && make install
安装成功后,/root/work/nginx_download/nginx\下会有相关软件生成
出错解决方法:http://blog.csdn.net/vblittleboy/article/details/40616405
3.配置nginx
请将文件安装包\nginx\配置文件\nginx_rtmp.conf拷贝到nginx/conf下
4.启动nginx
./sbin/nginx -c conf/nginx_rtmp.conf
正常运行后,可以发现有三个nginx进程
5.推流
利用ffmpeg可以将视频文件已rtmp格式推送到nginx服务器中。
推送流命令如下:./ffmpeg -re -i 7.mp4 -c copy -f flv rtmp://192.168.1.102/hls/1
6.观看效果
在/tmp/app下存在切片生成的ts流,通过hls协议就可以以点播的形式实现直播技术。
可以在pc上以及安卓系统中通过rtmp协议观看。
也可以在ios系统上通过hls协议观看。
相比,hls协议观看延迟要大些,大概延迟在1分钟左右。
- centOs下安装Nginx
- centos下安装nginx
- CentOS下Nginx安装
- centos下安装nginx
- CentOS下安装Nginx
- centos下安装nginx
- CentOS下Nginx安装
- centos下安装nginx
- Centos下安装Nginx
- centos下安装nginx
- centos下安装nginx
- CentOS 下安装Nginx
- centos下安装nginx
- centos下安装nginx
- Centos 下安装 Nginx
- CentOS 下安装 Nginx
- centos下安装nginx
- centos下安装nginx
- Spring cache 配置代理 改为aspectj
- 新年新气象,新的一年新的开始,给自己定个小小的目标,以此为证
- spring-boot配置文件-security(中文翻译)
- JS中的this指向相关
- 自定义控件实践——单选/多选文本标签流
- centos下安装nginx
- hibernate联合主键
- C++所有容器的共同操作
- 告别2016,展望2017
- 外链推广资源
- Android 完全退出当前应用程序的四种正确方法
- esayUI datagrid根据不同的选择构造不同的表头
- 基于Project的项目管理(一)编制进度计划、保存基准
- [树形DP 费用流手动增广] Codeforces Gym 101190 NEERC 16 M. Mole Tunnels