1,安装环境包
yum install screen -y
tar -cvf /www/web/lnmp/public_html/lnmp1.2-full.tar /www/web/lnmp/public_html/lnmp1.2-full
tar cvf /www/web/lnmp/public_html/lnmp1.2-full.tar lnmp1.2-full
tar cvf /www/web/lnmp/public_html/lnmp1.2-full.gz lnmp1.2-full
tar xvf FileName.tar
执行:screen -S lnmp 创建screen会话
1,安装环境包
tar -xf filename.tar.gz
或者tar -xvf filename.tar.gz
wget -c http://lnmp.ssc.gs/lnmp1.2-full.gz && tar -xvf lnmp1.2-full.gz && cd lnmp1.2-full && ./install.sh lnmp
wget -c http://lnmp.ssc.gs/lnmp1.2-full.gz && tar zxf lnmp1.2-full.gz && cd lnmp1.2-full && ./install.sh lnmp
(如果网络掉线,可以重新连接,再执行 screen -r lnmp 就会看到你的lnmp安装进程。)
2,安装视频解码包
执行:screen -S ffmpeg 创建screen会话
wget -c http://lnmp.ssc.gs/ffmpeginstaller.8.0.tar.gz && tar zxf ffmpeginstaller.8.0.tar.gz && cd ffmpeginstaller.8.0 && ./install.sh ffmpeg
wget -c http://mirror.ffmpeginstaller.com/old/scripts/ffmpeg8/ffmpeginstaller.8.0.tar.gz && tar zxf ffmpeginstaller.8.0.tar.gz && cd ffmpeginstaller.8.0 && ./install.sh ffmpeg
(如果网络掉线,可以重新连接,再执行 screen -r ffmpeg 就会看到你的ffmpeg安装进程。)
3,
////////////////////
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
mv CentOS6-Base-163.repo CentOS-Base.repo
yum update
rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
#64位系统 rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
安装 Install ffmpeg 等模块
yum install -y automake autoconf libtool libgcc gcc gcc-c++ libstdc++ libstdc++-devel compat-glibc compat-libstdc++-33 libevent libevent-devel ffmpeg ffmpeg-devel
yum install mplayer mencoder flvtool2 yamdi
//////////////
4.安装 FFMPEG-PHP
yum install ffmpeg-devel
cd /usr/local/src
wget http://lnmp.ssc.gs/source/ffmpeg-php/ffmpeg-php-0.6.0.tbz2
tar jxvf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
/www/php/bin/phpize
./configure --enable-shared --with-php-config=/www/php/bin/php-config
./configure --with-ffmpeg=/usr/local/bin/ffmpeg
make clean
make
make install
////////////////////////
//编译出错请执行
sed -i 's/PIX_FMT_RGBA32/PIX_FMT_RGB32/g' ffmpeg_frame.c
make
报错:
make: *** [ffmpeg_movie.lo] Error 1
解决:
vim ffmpeg_movie.c
row 311: list_entry *le; 改为zend_rsrc_list_entry *le;
row 346: list_entry new_le;改为 zend_rsrc_list_entry new_le;
row 360: hashkey_length+1, (void *)&new_le, sizeof(list_entry),改为hashkey_length+1, (void *)&new_le,sizeof(zend_rsrc_list_entry),
///////////////////////
替换
php.ini
wget http://lnmp.ssc.gs/php.ini
cd /usr/local/php/etc/
mv /usr/local/php/etc/php.ini /usr/local/php/etc/php.main
wget http://lnmp.ssc.gs/php.ini
//
///
4,1. NeroAACCodec install
cd /usr/local/src/
mkdir NeroAACCodec
cd NeroAACCodec
wget http://ftp6.nero.com/tools/NeroAACCodec-1.5.1.zip;unzip NeroAACCodec-1.5.1.zip
unzip
install -m 0755 linux/neroAacEnc /usr/bin/
//////////////////////////
4,2. Install mediainfo
#MediaInfo is a convenient unified display of the most relevant technical and tag data for video and audio files.
# cd /usr/local/src
For x86_64 Centos6
# wget http://downloads.sourceforge.net/zenlib/libzen0-0.4.29-1.x86_64.CentOS_6.rpm
# rpm -ivh libzen0-0.4.29-1.x86_64.CentOS_6.rpm
# wget http://sourceforge.net/projects/mediainfo/files/binary/libmediainfo0/0.7.64/libmediainfo0-0.7.64-1.x86_64.CentOS_6.rpm
# rpm -ivh libmediainfo0-0.7.64-1.x86_64.CentOS_6.rpm
# wget http://sourceforge.net/projects/mediainfo/files/binary/mediainfo/0.7.64/mediainfo-0.7.64-1.x86_64.CentOS_6.rpm
# rpm -ivh mediainfo-0.7.64-1.x86_64.CentOS_6.rpm
5,安装加优化插件
cd /root/lnmp1.2-full
./addons.sh
./addons.sh install eaccelerator
./addons.sh install opcache
http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat
http://cumulusclips.org/docs/install-ffmpeg-x264-on-centos/
6,修复XVID SUPPORT
Install MPLAYER (MENCODER)
MENCODER is a free command line video decoding, encoding and filtering tool released under the GNU General Public License.
# cd /usr/local/src
# wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2
# tar jxvf all-20110131.tar.bz2
# mv /usr/local/src/all-20110131 /usr/local/lib/codecs/
# chmod -R 755 /usr/local/lib/codecs/
# mkdir /usr/local/src/tmp
# chmod 777 /usr/local/src/tmp
# export TMPDIR=/usr/local/src/tmp
# wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc4.tar.bz2
# tar jxf MPlayer-1.0rc4.tar.bz2
# cd MPlayer-1.0rc4
# make clean
#./configure && make && make install && ldconfig
//////////////
10. Compile Mencoder/Mplayer
cd /usr/local/src/
##Download source code
wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.1.1.tar.xz
##install binary codecs
wget https://www.mplayerhq.hu/MPlayer/releases/codecs/essential-amd64-20071007.tar.bz2
mkdir -p /usr/local/lib/codecs
tar -xjf essential-amd64-20071007.tar.bz2
yes | cp -a essential-amd64-20071007/* /usr/local/lib/codecs/
ln -sf /usr/local/lib/codecs /usr/lib/codecs && ln -sf /usr/local/lib/codecs /usr/local/lib/win32 && ln -sf /usr/local/lib/codecs /usr/lib/win32
##unpack source code
tar -xJf MPlayer-1.1.1.tar.xz
##compile and install
cd MPlayer-1.1.1
./configure --prefix=/usr/local/mplayer \
--extra-cflags="-I/usr/include" \
--extra-cflags="-I/usr/local/x264/include" \
--extra-ldflags="-L/usr/lib" \
--extra-ldflags="-L/usr/local/x264/lib"
gmake && gmake install clean
--------------------------------
/usr/local/bin/ffmpeg
/usr/local/bin/mplayer
/usr/local/bin/mencoder
/usr/bin/flvtool2
/usr/local/bin/MP4Box
/usr/local/bin/yamdi
chown -R mysql:mysql /usr/local/mysql/
chmod -R 755 /usr/local/mysql/