在 Ubuntu Server 14.04 上安裝 ClipBucket
參考網站:
How to install the transcoding tools on Ubuntu 14.04 – ViMP – Video CMS
1. 安裝所須套件
# apt-get install apache2 php5 mysql-server php5-mysql gpac php5-cli php5-gd php5-curl libx264-dev libtheora-dev libfaac-dev libmp3lame-dev libvorbis-dev libxvidcore-dev build-essential yasm checkinstall
[@more@]2.安裝所須套件
# apt-get install make automake g++ bzip2 unzip patch subversion
3. 下載 win codecs of the MPlayer 及安裝
# wget http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-amd64-20071007.tar.bz2
# tar xvjf essential-amd64-20071007.tar.bz2
# mkdir /usr/local/lib/codecs
# cp -Rvp essential-amd64-20071007/* /usr/local/lib/codecs/
4. 修改 /etc/ld.so.conf
# vim /etc/ld.so.conf
加入下面二行
/usr/lib
/usr/local/lib
讓設定生效
# ldconfig
5. 安裝所須套件
# apt-get install libsdl1.2-dev zlib1g-dev libfaad-dev libfaac-dev libgsm1-dev libtheora-dev libvorbis-dev libspeex-dev libopencore-amrwb-dev libopencore-amrnb-dev libxvidcore-dev libxvidcore4 libmp3lame-dev libjpeg62 libjpeg62-dev
6. 安裝 x264
# wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/last_stable_x264.tar.bz2
# tar xvjf last_stable_x264.tar.bz2
# cd x264-snapshot-20140610-2245-stable/
# ./configure –enable-shared –enable-pic
# make && make install
# cd ..
7. 安裝 libvpx
# wget http://webm.googlecode.com/files/libvpx-v1.2.0.tar.bz2
# tar xvjf libvpx-v1.2.0.tar.bz2
# cd libvpx-v1.2.0
# ./configure –enable-shared –enable-pic
# make
# make install
# cd ..
8. 安裝 MPlayer/mencoder
# wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.1.tar.gz
# tar xvzf MPlayer-1.1.tar.gz
# cd MPlayer-1.1/
# ./configure
# make && make install
# ldconfig
# cd ..
9. 安裝 ffmpeg
# wget http://ffmpeg.org/releases/ffmpeg-2.2.1.tar.bz2
# tar xvjf ffmpeg-2.2.1.tar.bz2
# cd ffmpeg-2.2.1/
# ./configure –enable-gpl –enable-version3 –enable-shared –enable-nonfree –enable-postproc –enable-libfaac –enable-libmp3lame –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libtheora –enable-libvorbis –enable-libvpx –enable-libx264 –enable-libxvid
# make
# make install
# ldconfig
10. 安裝 qt-faststart
# cd tools
# make qt-faststart
# cp qt-faststart /usr/local/bin/
11. 安裝 flvtool2
# cd /usr/src
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.bz2
# tar xvjf ruby-1.8.6.tar.bz2
# cd ruby-1.8.6
# vim math.c
修改 math.c
修改第 37 行
#elif define(ERANGE)
成為
#elif defined(ERANGE)
# ./configure
# make
# make install
# cd ..
# wget https://ffmpeg-install-centos.googlecode.com/files/flvtool2-1.0.6.tgz
# tar xzf flvtool2-1.0.6.tgz
# cd flvtool2-1.0.6
# /usr/local/bin/ruby setup.rb config
# /usr/local/bin/ruby setup.rb setup
# /usr/local/bin/ruby setup.rb install
# cd ..
12. 下載 ClipBucket 及安裝
# cd /var/www/html
# wget http://downloads.sourceforge.net/project/clipbucket/ClipBucket%20v2/clipbucket-2.6-r738-security-fixed.zip
# unzip clipbucket-2.6-r738-security-fixed.zip
# mv clipbucket-2.6-r738-security-fixed/upload clipbucket
13. 更改檔案及目錄權限
# chmod 777 clipbucket/includes
# chmod 777 clipbucket/files
# chmod 777 clipbucket/files/conversion_queue
# chmod 777 clipbucket/files/logs
# chmod 777 clipbucket/files/original
# chmod 777 clipbucket/files/temp
# chmod 777 clipbucket/files/thumbs
# chmod 777 clipbucket/files/photos
# chmod 777 clipbucket/files/videos
# chmod 777 clipbucket/files/mass_uploads
# chmod 777 clipbucket/files/temp/install.me
# chmod 777 clipbucket/images
# chmod 777 clipbucket/images/avatars
# chmod 777 clipbucket/images/backgrounds
# chmod 777 clipbucket/images/collection_thumbs
# chmod 777 clipbucket/images/category_thumbs
# chmod 777 clipbucket/images/groups_thumbs
# chmod 777 clipbucket/includes/langs/en.lang
# chmod 777 clipbucket/cache
# chmod 777 clipbucket/cache/comments
# chmod 777 clipbucket/cache/userfeeds
# chmod 777 clipbucket/cb_install
14. 建立 ClipBucket 資料庫
# /usr/bin/mysqladmin -u root -p create ClipBucket
15. 修改 /etc/php5/apache2php.ini
# vim /etc/php5/apache2/php.ini
max_execution_time = 300
max_input_time = 600
memory_limit = 512M
post_max_size =2048M
upload_max_filesize=2048M
# 開啟這項才能看到 ClipBucket 安裝畫面
short_open_tag = On
date.timezone = “Asia/Taipei”
16. 重新啟動 Apache Web Server
# /etc/init.d/apache2 restart
17. 進行 ClipBucket 安裝
因為和之前的安裝方式相同,就不另外擷取圖片說明!
參考:頭城國小資訊組 | 在 CentOS 6.x 上安裝 ClipBucket