软件:
FFmpeg 官方主页: http://ffmpeg.sourceforge.net
cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
FFmpeg-php 官方主页 http://ffmpeg-php.sourceforge.net
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ffmpeg-php login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ffmpeg-php co ffmpeg-php
Lame 下载地址
http://www.linuxpackages.net/sea ... ;name=lame&ver=
Apache v2.0.54 官方主页: http://www.apache.org
http://www.apache.org/dist/httpd/httpd-2.0.54.tar.gz
PHP v4.3.11 官方主页: http://www.php.net
http://cn.php.net/distributions/php-5.0.4.tar.gz
GD Library v2.0.33 官方主页: http://www.boutell.com/gd/
http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
FreeType v2.1.10 官方主页: http://www.freetype.org
http://savannah.nongnu.org/downl ... etype-2.1.10.tar.gz
Jpeg v6b 官方主页: http://www.ijg.org
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
LibPNG v1.2.8 官方主页: http://sourceforge.net/project/showfiles.php?group_id=5624
http://voxel.dl.sourceforge.net/ ... 1.2.8-config.tar.gz
zlib v1.2.2 官方主页: http://www.gzip.org/zlib/
http://www.zlib.net/zlib-1.2.2.tar.gz
开始安装:
1、解压缩,把所有源码压缩包放在一个目录中,解压缩所有 .tar.gz 和 .tar.bz2压缩包
for i in `ls *.gz`;do tar zxvf $i; done;
for i in `ls *.bz2`;do tar jxvf $i; done;
2、安装
##### lame #####
lame-CVS20050706-i686-1jto.tgz解压后
复制lame中./usr/include ./usr/bin ./usr/lib 三个文件夹到服务器对应地方
##### ffmpeg #####
cd ffmpeg
./configure --prefix=/usr/local --enable-memalign-hack --enable-mp3lame --enable-shared
make
make install
cd..
cp -r /usr/local/lib/libav*.so /usr/lib
注:
--prefix=/usr/local不得修改,否则ffmpeg-php安装不上
运行/usr/local/bin/ffmpeg –v测试是否安装成功
##### Apache2 #####
cd httpd-2.0.54
./configure --enable-so --prefix=/server/httpd --with-config-file-path=/server/httpd/conf
make
make install
cd ..
注:
运行/server/httpd/bin/httpd –k start http://192.168.1.xxx测试是否安装成功
测试完后要关闭/server/httpd/bin/httpd –k stop
##### FreeType #####
cd freetype-2.1.10
./configure --prefix=/usr/local/freetype
make
make install
cd ..
##### LibPNG #####
cd libpng-1.2.8
./configure --prefix=/usr/local/libpng --enable-shared --enable-static
make test
make install
cd ..
##### Jpeg #####
cd jpeg-6b
mkdir /usr/local/jpeg
mkdir /usr/local/jpeg/bin
mkdir /usr/local/jpeg/lib
mkdir /usr/local/jpeg/include
mkdir /usr/local/jpeg/man
mkdir /usr/local/jpeg/man/man1
./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
make
make install
cd ..
##### zlib #####
cd zlib-1.2.2
./configure
make
make install
cd ..
##### GD Library #####
cd gd-2.0.33
./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg --with-freetype=/usr/local/freetype --with-png --with-zlib
make
make install
cd ..
##### ffmpeg-php #####
按照官方的说法,可以在装php前安装ffmpeg-php
但是我没成功
运行不了phpize
因此此步在装了php后再进行
有点傻
##### PHP #####
cd php-4.3.11
./configure --prefix=/server/php --with-apxs2=/server/httpd/bin/apxs --with-gd=/usr/local/gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg --with-png --with-ttf --with-zlib --with-freetype-dir=/usr/local/freetype --with-config-file-path=/server/httpd/conf
make
make install
cp php.ini-dist /server/httpd/conf/php.ini
cd ..
##### ffmpeg-php #####
mv ffmpeg-php /path/to/php_sources/ext/ffmpeg
cd /path/to/php_sources
autoconf
./configure --prefix=/server/php --with-apxs2=/server/httpd/bin/apxs --with-gd=/usr/local/gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg --with-png --with-ttf --with-zlib --with-freetype-dir=/usr/local/freetype --with-config-file-path=/server/httpd/conf --with-ffmpeg=/user/local/include
make
make install
安装完毕
运行 /server/httpd/bin/httpd –k start
测试
<?
phpinfo();
?>
FFmpeg 官方主页: http://ffmpeg.sourceforge.net
cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
FFmpeg-php 官方主页 http://ffmpeg-php.sourceforge.net
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ffmpeg-php login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ffmpeg-php co ffmpeg-php
Lame 下载地址
http://www.linuxpackages.net/sea ... ;name=lame&ver=
Apache v2.0.54 官方主页: http://www.apache.org
http://www.apache.org/dist/httpd/httpd-2.0.54.tar.gz
PHP v4.3.11 官方主页: http://www.php.net
http://cn.php.net/distributions/php-5.0.4.tar.gz
GD Library v2.0.33 官方主页: http://www.boutell.com/gd/
http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
FreeType v2.1.10 官方主页: http://www.freetype.org
http://savannah.nongnu.org/downl ... etype-2.1.10.tar.gz
Jpeg v6b 官方主页: http://www.ijg.org
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
LibPNG v1.2.8 官方主页: http://sourceforge.net/project/showfiles.php?group_id=5624
http://voxel.dl.sourceforge.net/ ... 1.2.8-config.tar.gz
zlib v1.2.2 官方主页: http://www.gzip.org/zlib/
http://www.zlib.net/zlib-1.2.2.tar.gz
开始安装:
1、解压缩,把所有源码压缩包放在一个目录中,解压缩所有 .tar.gz 和 .tar.bz2压缩包
for i in `ls *.gz`;do tar zxvf $i; done;
for i in `ls *.bz2`;do tar jxvf $i; done;
2、安装
##### lame #####
lame-CVS20050706-i686-1jto.tgz解压后
复制lame中./usr/include ./usr/bin ./usr/lib 三个文件夹到服务器对应地方
##### ffmpeg #####
cd ffmpeg
./configure --prefix=/usr/local --enable-memalign-hack --enable-mp3lame --enable-shared
make
make install
cd..
cp -r /usr/local/lib/libav*.so /usr/lib
注:
--prefix=/usr/local不得修改,否则ffmpeg-php安装不上
运行/usr/local/bin/ffmpeg –v测试是否安装成功
##### Apache2 #####
cd httpd-2.0.54
./configure --enable-so --prefix=/server/httpd --with-config-file-path=/server/httpd/conf
make
make install
cd ..
注:
运行/server/httpd/bin/httpd –k start http://192.168.1.xxx测试是否安装成功
测试完后要关闭/server/httpd/bin/httpd –k stop
##### FreeType #####
cd freetype-2.1.10
./configure --prefix=/usr/local/freetype
make
make install
cd ..
##### LibPNG #####
cd libpng-1.2.8
./configure --prefix=/usr/local/libpng --enable-shared --enable-static
make test
make install
cd ..
##### Jpeg #####
cd jpeg-6b
mkdir /usr/local/jpeg
mkdir /usr/local/jpeg/bin
mkdir /usr/local/jpeg/lib
mkdir /usr/local/jpeg/include
mkdir /usr/local/jpeg/man
mkdir /usr/local/jpeg/man/man1
./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
make
make install
cd ..
##### zlib #####
cd zlib-1.2.2
./configure
make
make install
cd ..
##### GD Library #####
cd gd-2.0.33
./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg --with-freetype=/usr/local/freetype --with-png --with-zlib
make
make install
cd ..
##### ffmpeg-php #####
按照官方的说法,可以在装php前安装ffmpeg-php
但是我没成功
运行不了phpize
因此此步在装了php后再进行
有点傻
##### PHP #####
cd php-4.3.11
./configure --prefix=/server/php --with-apxs2=/server/httpd/bin/apxs --with-gd=/usr/local/gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg --with-png --with-ttf --with-zlib --with-freetype-dir=/usr/local/freetype --with-config-file-path=/server/httpd/conf
make
make install
cp php.ini-dist /server/httpd/conf/php.ini
cd ..
##### ffmpeg-php #####
mv ffmpeg-php /path/to/php_sources/ext/ffmpeg
cd /path/to/php_sources
autoconf
./configure --prefix=/server/php --with-apxs2=/server/httpd/bin/apxs --with-gd=/usr/local/gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg --with-png --with-ttf --with-zlib --with-freetype-dir=/usr/local/freetype --with-config-file-path=/server/httpd/conf --with-ffmpeg=/user/local/include
make
make install
安装完毕
运行 /server/httpd/bin/httpd –k start
测试
<?
phpinfo();
?>