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. Project: Individual Project - Word frequency program----11061192zmx

    Description & Requirements http://www.cnblogs.com/jiel/p/3311400.html 项目时间估计 理解项目要求: 1小时 构建项目逻辑: ...

  2. (原创)vagrant up 异常报错,出现 There was an error while executing `VBoxManage` 的解决方法

    最近在使用 vagrant homestead 时,不小心在虚拟机上使用了 exit 命令退出虚拟机,导致再使用 vagrant up 时出现以下错误: Bringing machine 'larav ...

  3. Python用特殊符号切割字符串并生成list(简单)

    采用re模块,可以指定字符进行切割,例如切割IP地址: import socket import re localIP = socket.gethostbyname(socket.gethostnam ...

  4. 3.x的触摸响应机制

    第一种是采用函数回调,主要是用于MenuItem [cpp] view plaincopy // a selector callback void menuCloseCallback(Object*  ...

  5. VB操作Excel

    在工程中添加引用:Microsoft Office 9.0 Object Library                    Microsoft Excel 9.0 Object Library   ...

  6. Android真机抓屏- Android Screen Monitor

    一般运行Android应用程序有两种方式一种是设置Android虚拟设备模拟器,通过Android  Virtual Manger进行管理,一种是插入USB数据线直接真机上进行调试,但是如果电脑配置比 ...

  7. Codeforces Round #268 (Div. 1) A. 24 Game 构造

    A. 24 Game Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/468/problem/A D ...

  8. Android中文乱码彻底解决

    以下是我研究的成果,希望对您有帮助: sb = new StringBuffer(); HttpEntity entity = response.getEntity(); InputStream is ...

  9. linux服务器命令

    清除屏幕数据:ctrl + l  :快速查找某个文件: find / -name 'httpd.conf'   (或php.ini) 重启Apache :   service httpd restar ...

  10. FBReaderJ 编译Jni

    最近要做一个电子书项目用到FBReaderJ 第一步,也是最难的一步,要编译他的Jni 文件,对于android开发还是小白的我,只能说难!好难!非常难!,于是乎百度了一下,找到几篇有价值性的文章 第 ...