在linux安裝apche並添加h264模組

來源:互聯網
上載者:User

gentoo:

*使用emerge安裝apache
  emerge apache

*編譯安裝h264 module
  cd /tmp
  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 /tmp/mod_h264_streaming-2.2.7
  ./configure --with-apxs=`which apxs2`
  make
  make install

*修改apache設定檔/etc/apache/httpd.conf
  LoadModule h264_streaming_module /usr/lib/apache2/modules/mod_h264_streaming.so
  AddHandler h264-streaming.extensions .mp4

*開啟apache
  /etc/init.d/apache start

centos5.5:

*配置yum源

修改/etc/yum.repos.d/CentOS-Base.repo

  [base]
  name=CentOS-$releasever - Base
  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  baseurl=http://centos.ustc.edu.cn/centos/$releasever/os/$basearch/
  gpgcheck=1
  gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  #released updates
  [updates]
  name=CentOS-$releasever - Updates
  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  baseurl=http://centos.ustc.edu.cn/centos/$releasever/updates/$basearch/
  gpgcheck=1
  gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  #packages used/produced in the build but not released
  [addons]
  name=CentOS-$releasever - Addons
  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
  baseurl=http://centos.ustc.edu.cn/centos/$releasever/addons/$basearch/
  gpgcheck=1
  gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  #additional packages that may be useful
  [extras]
  name=CentOS-$releasever - Extras
  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  baseurl=http://centos.ustc.edu.cn/centos/$releasever/extras/$basearch/
  gpgcheck=1
  gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  #additional packages that extend functionality of existing packages
  [centosplus]
  name=CentOS-$releasever - Plus
  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
  baseurl=http://centos.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
  gpgcheck=1
  enabled=0
  gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 

*安裝apache
  yum install httpd

*安裝apache進階環境
  yum install httpd-devel

*編譯安裝h264模組
  cd /tmp
  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 /tmp/mod_h264_streaming-2.2.7
  ./configure --with-apxs=`which apxs2`
  make
  make install

*修改apache設定檔/etc/httpd/conf/httpd.conf,添加
  LoadModule h264_streaming_module /usr/lib/httpd/modules/mod_h264_streaming.so
  AddHandler h264-streaming.extensions .mp4

*啟動apache
  service httpd restart

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.