http://blog.csdn.net/xst686/article/details/9763995

加入流媒体扩展后要重启 httpd

flv 流媒体

<textarea style="line-height: 15px ! important; font-size: 12px ! important; -moz-tab-size: 4; width: 548px; height: 51px;" class="crayon-plain print-no" readonly="readonly" data-settings="">wget http://people.apache.org/~pquerna/modules/mod_flvx.c /usr/local/apache/bin/apxs -c -i&nbsp;mod_flvx.c</textarea>
1
2
wgethttp://people.apache.org/~pquerna/modules/mod_flvx.c
/usr/local/apache/bin/apxs-c-i mod_flvx.c

httpd.conf  加入

<textarea style="line-height: 15px ! important; font-size: 12px ! important; -moz-tab-size: 4; width: 507px; height: 50px;" class="crayon-plain print-no" readonly="readonly" data-settings="">LoadModule flvx_module modules/mod_flvx.so AddHandler flv-stream .flv</textarea>
1
2
LoadModuleflvx_module modules/mod_flvx.so
AddHandler flv-stream.flv

mp4 流媒体

<textarea style="line-height: 15px ! important; font-size: 12px ! important; -moz-tab-size: 4; width: 846px; height: 107px;" class="crayon-plain print-no" readonly="readonly" data-settings="">wget http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz tar -zxvf apache_mod_h264_streaming-*.tar.gz cd&nbsp;apache_mod_h264_streaming-* ./configure --with-apxs=/usr/local/apache/bin/apxs make make install</textarea>
1
2
3
4
5
6
wgethttp://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz
tar -zxvfapache_mod_h264_streaming-*.tar.gz
cd apache_mod_h264_streaming-*
./configure--with-apxs=/usr/local/apache/bin/apxs
make
make install

httpd.conf  加入

<textarea style="line-height: 15px ! important; font-size: 12px ! important; -moz-tab-size: 4; width: 602px; height: 53px;" class="crayon-plain print-no" readonly="readonly" data-settings="">LoadModule h264_streaming_module modules/mod_h264_streaming.so AddHandler h264-streaming.extensions .mp4</textarea>
1
2
LoadModuleh264_streaming_module modules/mod_h264_streaming.so
AddHandler h264-streaming.extensions.mp4

配置Nginx、Apache服务器支持flv流媒体拖动播放

http://www.php1.cn/article/59985.html

nginx下配置flv拖动

首先,下载nginx源码包,以0.8.54版本为例

wget  http://nginx.org/download/nginx-0.8.54.tar.gz

重编译之前,停掉nginx服务。查看一下nginx原来的编译参数

/usr/local/nginx/sbin/nginx  ?V

在原来的参数基础上添加flv的支持

0.8.54版本为例,进行编译

./configure --user=www --group=www  --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module  --with-http_gzip_static_module --with-ipv6 --with-http_flv_module

make  && make install

编译完成后,在nginx.conf文件里添加flv支持

location ~ \.flv$  {

flv;

}

启动nginx,使用curl ?I 来查看是否成功。

主要查看的是 Content-Length的数值。和加上参数start 之后进行对比。

例如:

curl -I  http://video.zhangyuc.com/flv/110718/video.flv

Content-Length: 1218888

对比

curl -I  http://video.zhangyuc.com/flv/110718/video.flv?<strong>start=12345</strong>

Content-Length: 1206556

以上示例只列出Content-Length的值。

假如加上参数之后,Content-Length值依旧和之前相同,则表示配置没有成功

apache下配置flv拖动

Windows服务器下配置拖动,一共需要两步

第一步,下载mod_flvx.so并放到apache目录下的modules文件夹下

下载地址:

http://www.mosalov.com/files/mod_flvx.so

第二步,在apache的配置文件中,添加以下内容,重启apache服务

LoadModule  flvx_module  modules/mod_flvx.so

AddHandler flv-stream .flv

linux服务器下配置拖动,需要下载mod_flvx.c文件后进行编译

第一步,下载mod_flvx.c,并进行编译。

wget  https://github.com/osantana/mod_flvx/blob/master/mod_flvx.c

使用apxs进行编译,编译前,请检查apxs版本

apxs -c -i  ./mod_flvx.c

第二步,在apache的conf.d目录下创建mod_flvx.conf文件,并写入以下内容

LoadModule flvx_module  /usr/lib/apache2/modules/mod_flvx.so
AddHandler flv-stream  .flv

配置完成后重启即可

centos 6.4 Apache 配置 flv mp4.h264 流媒体拖动的更多相关文章

  1. centos 6.5 apache配置web应用&防火墙设置(入门级)

    硬件:centos 6.5 服务器 , Dell R420 , 两个网口,一个给公网,一个给内网. 软件:apache 2.2 配置了virtualhost以后,用curl在本地可以访问.但是其他机器 ...

  2. CentOS 5上Apache配置虚拟主机范例

    昨天实践了下在CentOS 5上通过Apache直接配置虚拟主机,服务器没有安装面板软件,所以只能通过SSH远程连接操作了.Apache安装在/etc/httpd目录下,这个即是Apache的根目录, ...

  3. nginx+jwplayer配置flv/MP4点播系统, 视频拖动支持

    一 配置nginx 1. 下载 nginx 最新版 http://nginx.org/ 2. 安装依赖库, 以ubuntu为例 apt-get install libpcre3 libpcre3-de ...

  4. CentOS下的apache配置支持php

    修改Apache的配置文件httpd.conf(vi /etc/httpd/conf/httpd.conf) DirectoryIndex index.html index.php #添加index. ...

  5. centos LAMP第二部分apache配置 下载discuz!配置第一个虚拟主机 安装Discuz! 用户认证 配置域名跳转 配置apache的访问日志 配置静态文件缓存 配置防盗链 访问控制 apache rewrite 配置开机启动apache tcpdump 第二十节课

    centos    LAMP第二部分apache配置  下载discuz!配置第一个虚拟主机 安装Discuz! 用户认证 配置域名跳转  配置apache的访问日志  配置静态文件缓存  配置防盗链 ...

  6. CentOS 6.6安装配置LAMP服务器(Apache+PHP5+MySQL)

    准备篇: CentOS 6.6系统安装配置图解教程 http://www.osyunwei.com/archives/8398.html 1.配置防火墙,开启80端口.3306端口 vi /etc/s ...

  7. CentOS下Apache配置多域名或者多端口映射

    CentOS下Apache默认网站根目录为/var/www/html,假如我默认存了一个CI项目在html文件夹里,同时服务器的外网IP为ExampleIp,因为使用的是MVC框架,Apache需开启 ...

  8. CentOS 7.0系统安装配置LAMP服务器(Apache+PHP+MariaDB)

    CentOS 7.0接触到的用户是比较少的,今天看了站长写了一篇关于centos7中安装配置LAMP服务器的教程,下面我把文章稍加整理一下转给大家学习交流,希望例子能给各位带来帮助哦.   cento ...

  9. CentOS 6.4安装配置LAMP服务器(Apache+PHP5+MySQL)

    这篇文章主要介绍了CentOS 6.4安装配置LAMP服务器(Apache+PHP5+MySQL)的方法,需要的朋友可以参考下 文章写的不错,很详细:IDO转载自网络: 准备篇: 1.配置防火墙,开启 ...

随机推荐

  1. BroadcastReceiver学习笔记

    1.在代码中注册与在AndroiManifest.xml注册的区别 (a)在代码中注册可以控制注册与注销的时间.比如在onCreate-onDestory, onStart-onStop, onRes ...

  2. sql STUFF用法

    sql STUFF用法 1.作用 删除指定长度的字符,并在指定的起点处插入另一组字符. 2.语法 STUFF ( character_expression , start , length ,char ...

  3. 一些好用的nginx第三方模块

    一些好用的nginx第三方模块 转自;http://macken.iteye.com/blog/1963301  1.Development Kit https://github.com/simpl/ ...

  4. cocos2d-x 基本数学

    转自:http://cjhworld.blog.163.com/blog/static/207078036201331510141222/ 数学函数: ccp(x, y); // 以坐标x,y创建一个 ...

  5. 对Prepared Statement 是否可以防止 SQL Injection 的实验

    代码: import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; im ...

  6. PowerShell查询sql server

    function Invoke-SQL1: function Invoke-SQL { param( [string] $DBServer, [string] $Database, [string] ...

  7. DSC配置

    #配置Remote Desktop Services服务为 自启动,并运行 Configuration Myservice{ # A Configuration block can have zero ...

  8. BZOJ 2002: [Hnoi2010]Bounce 弹飞绵羊 LCT

    2002: [Hnoi2010]Bounce 弹飞绵羊 Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOn ...

  9. BZOJ 2298: [HAOI2011]problem a 动态规划

    2298: [HAOI2011]problem a Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOnli ...

  10. To Noob Json是什么鬼?

    转载请注明出处王亟亟的大牛之路 供应商A:那我们数据怎么交互啊?HTTP吧?那内容呢?JSON?XML? 小菜鸟B:JSON什么鬼? 为了菜鸟们避免以上情况楼主写一发JSON的博文,废话不多!開始! ...