#安装库
$sudo apt-get install apache2-threaded-dev
#下载软件包
$cd ~
$wget http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz
$tar -zxvf apache_mod_h264_streaming-2.2.7.tar.gz
#编译安装软件包
$cd ~/mod_h264_streaming-2.2.7
$./configure --with-apxs=`which apxs2`
$make
$sudo make install
#编辑apache设置
$sudo vim /etc/apache2/httpd.conf
#添加下面内容
LoadModule h264_streaming_module /usr/lib/apache2/modules/mod_h264_streaming.so
AddHandler h264-streaming.extensions .mp4
#重启
$sudo /etc/init.d/apache2 restart
+===== 配置 =====++在httpd.conf中添加
LoadModule h264_streaming_module libexec/apache22/mod_h264_streaming.so+
AddHandler h264-streaming.extensions .mp4
>++===== 测试 =====++
在一个网站中放一个h.264编码的mp4文件。
然后用浏览器访问:
++[[http://web_url/h264.mp4?start=20]]++
如果正好是从20秒的位置开始播放,那就证明安装配置成功。
++{{tag>freebsd apache}}