阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Nginx视频点播安装配置

114次阅读
没有评论

共计 2153 个字符,预计需要花费 6 分钟才能阅读完成。

创建用户 useradd www

安装 linux 批量部署
yum groupinstall -y “Development Tools” “Development Libraries”

安装 zlib  nginx 运行需要的函数库安装 openssh 支持安全通信
yum install zlib* openssl* - y 安装与 perl 兼容的正则表达式库模块 tar fvxz pcre-8.33.tar.gz./configure makemake install 安装 libunwind 库 tar zxf libunwind-1.1.tar.gz cd libunwind-1.1CFLAGS=-fPIC ./configuremake CFLAGS=-fPICmake CFLAGS=-fPIC installecho ‘/usr/local/lib’ > /etc/ld.so.conf.d/usr_local_lib.confldconfig 安装 gperftools CPU 分析器 tar zxf gperftools-2.1.tar.gz cd gperftools-2.1./configure makemake installldconfig
 安装伪流模块
tar zxf nginx_mod_h264_streaming-2.2.7.tar.gz 注释 nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.c 158 行的 if 代码

下载 nginx 视频模块

wget https://github.com/arut/nginx-rtmp-module.git

nginx-rtmp-module

安装 nginx-1.5.1

tar fvxz nginx-1.5.1.tar.gz

cd nginx-1.5.1

编译

./configure –prefix=/usr/local/nginx –with-http_stub_status_module  –with-http_gzip_static_module–with-http_ssl_module –with-zlib=/zkx/zlib-1.2.3 –with-pcre=/zkx/pcre-8.33–user=www –group=www –with-http_sub_module –with-http_flv_module–add-module=/zkx/nginx_mod_h264_streaming-2.2.7 –with-http_dav_module–with-http_addition_module –add-module=/zkx/nginx-accesskey-2.0.3–add-module=/zkx/nginx-rtmp-module/

make && make install

将视频和 html 页面放到指定路径下

/usr/local/nginx/vod/flvs

打开 nginx 配置文件进行配置

vi /usr/local/nginx/conf/nginx.conf

配置 server 段

 server {

      listen      80;

      server_name  localhost;

 

      #charset koi8-r;

 

      #access_log logs/host.access.log  main;

 

      location ~* \.(gif|jpg|jpeg|png|bmp|swf|ico|html|js|as)$ {

          root  /usr/local/nginx/vod/flvs;

      #    index  index.html index.htm;

    expires 30d;

 }

 

      location ~* \.(flv|mp4)$ {

        root /usr/local/nginx/vod/flvs;

        expires 1h;

      }

Nginx 的详细介绍 :请点这里
Nginx 的下载地址 :请点这里

相关阅读

CentOS 6.2 实战部署 Nginx+MySQL+PHP http://www.linuxidc.com/Linux/2013-09/90020.htm

使用 Nginx 搭建 WEB 服务器 http://www.linuxidc.com/Linux/2013-09/89768.htm

搭建基于 Linux6.3+Nginx1.2+PHP5+MySQL5.5 的 Web 服务器全过程 http://www.linuxidc.com/Linux/2013-09/89692.htm

CentOS 6.3 下 Nginx 性能调优 http://www.linuxidc.com/Linux/2013-09/89656.htm

CentOS 6.3 下配置 Nginx 加载 ngx_pagespeed 模块 http://www.linuxidc.com/Linux/2013-09/89657.htm

CentOS 6.4 安装配置 Nginx+Pcre+php-fpm http://www.linuxidc.com/Linux/2013-08/88984.htm

Nginx 搭建视频点播服务器(仿真专业流媒体软件)http://www.linuxidc.com/Linux/2012-08/69151.htm

正文完
星哥说事-微信公众号
post-qrcode
 
星锅
版权声明:本站原创文章,由 星锅 2022-01-20发表,共计2153字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中