码迷,mamicode.com
首页 > 其他好文 > 详细

Nginx 学习笔记(五)nginx-vod-module 模块

时间:2017-11-22 17:51:58      阅读:1228      评论:0      收藏:0      [点我收藏+]

标签:服务   提示   启用   tail   ted   ror   emc   ati   fail   

nginx-vod-module

一、编译

./configure --user=www --group=www --prefix=/usr/local/openresty --with-debug --with-luajit --with-file-aio --with-threads --with-cc-opt="-O3" --with-http_v2_module --with-http_realip_module --with-http_mp4_module --with-stream --with-http_gzip_static_module --with-http_ssl_module --with-openssl=/usr/local/ssl --with-openssl-opt="enable-tlsext" --without-http_redis2_module --with-http_iconv_module --with-http_stub_status_module --with-http_xslt_module --add-dynamic-module=/home/www/build/nginx-ts-module --add-dynamic-module=/home/www/build/nginx-rtmp-module --add-dynamic-module=/home/www/build/nginx-module-vts --add-module=/home/www/build/ngx_cache_purge-2.3 --add-dynamic-module=/home/www/build/nginx-vod-module 

推荐设置:

  1. --with-file-aio - 启用异步I / O支持,强烈建议,仅与本地和映射模式相关
  2. --with-threads(nginx 1.7.11+) - 使用线程池(也需要vod_open_file_thread_pool在nginx.conf中)启用异步文件,仅与本地和映射模式相关
  3. --with-cc-opt="-O3"- 启用额外的编译器优化(与nginx默认值相比,mp4解析时间和帧处理时间减少了大约8%-O

调试设置:

  1. --with-debug- 启用调试消息(也需要传入nginx.conf debug中的error_log指令)。
  2. --with-cc-opt="-O0" - 禁用编译器优化(用gdb进行调试)

移植文件

cp -f /home/www/build/openresty-1.13.6.1/build/nginx-1.13.6/objs/ngx_http_vod_module.so /usr/local/openresty/nginx/modules/ngx_http_vod_module.so

cp -f /home/www/build/openresty-1.13.6.1/build/nginx-1.13.6/objs/nginx  /usr/local/openresty/nginx/sbin/nginx

重启服务

sudo service nginx restart 
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

》》今天发现了一个好办法,通过以上启动服务器是不报错的,直接启动不起来,不管什么错误都是提示以上错误信息,今天终于找到办法了,那就是运行Nignx二进制文件,会有错误日志输出哦

sudo ../../sbin/nginx
nginx: [emerg] unknown directive "vod_mode" in /usr/local/openresty/nginx/conf/vhost/nginx.vod.module.conf:3

遇到的错误:

nginx: [emerg] unknown directive "vod_moov_cache" in /usr/local/openresty/nginx/conf/vhost/nginx.vod.module.conf:7

待解决??

一、基本的网址结构

nginx-vod-module URL的基本结构是: http://<domain>/<location>/<fileuri>/<filename>

 (1)编译没有启用异步I / O支持(裸奔ngx-vod-module),播放一个MP4文件

技术分享图片

结论:打开的很慢,很卡

 

Nginx 学习笔记(五)nginx-vod-module 模块

标签:服务   提示   启用   tail   ted   ror   emc   ati   fail   

原文地址:http://www.cnblogs.com/tinywan/p/7879559.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!