安裝步驟大致如下:
一、強化yum功能
- yum install yum-fastestmirror(加快yum下載速度)
- yum install yum-priorities
- vim /etc/yum/pluginconf.d/priorities.conf
- 在 [main]下新增enabled=1 (預設已寫上)
- cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
- vim /etc/yum.repos.d/CentOS-Base.repo
- 在[base], [addons], [updates], [extras]項目下新增 priority=1
- 在[centosplus],[contrib]項目下新增 priority=2
- vim /etc/yum/pluginconf.d/priorities.conf
- /etc/init.d/yum-updatesd restart
二、下載相關套件並安裝(請自行對應)
- i386 wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
- x86_64 wget http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
- 安裝金鑰
- rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt (備份檔案)
- rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm (以i386為例)
三、檢查更新
- yum check-update
四、安裝 mencoder
- yum install mencoder
- /usr/bin/mencoder -oac help (檢查一下)
Available codecs:
copy - frame copy, without re-encoding (useful for AC3)
pcm - uncompressed PCM audio
mp3lame - cbr/abr/vbr MP3 using libmp3lame (這個是重點)
lavc - FFmpeg audio encoder (MP2, AC3, ...)
twolame - Twolame MP2 audio encoder
faac - FAAC AAC audio encoder
五、安裝 FLVTool2
- yum -y install flvtool2
六、安裝 mplayer
- yum install mplayer*
- /usr/bin/mplayer -vo help (檢查一下)
MPlayer 1.0rc1-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 5)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Available video output drivers:
xv X11/Xv
x11 X11 ( XImage/Shm )
xover General X11 driver for overlay capable video output drivers
gl X11 (OpenGL)
gl2 X11 (OpenGL) - multiple textures version
dga DGA ( Direct Graphic Access V2.0 )
sdl SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
svga SVGAlib
aa AAlib
caca libcaca
directfb Direct Framebuffer Device
dfbmga DirectFB / Matrox G200/G400/G450/G550
xvidix X11 (VIDIX)
cvidix console VIDIX
null Null video output
xvmc XVideo Motion Compensation
mpegpes Mpeg-PES to DVB card
yuv4mpeg yuv4mpeg output for mjpegtools
png PNG file
jpeg JPEG file
gif89a animated GIF output
tga Targa output
pnm PPM/PGM/PGMYUV file
md5sum md5sum of each frame
七、調整php.ini
- vi /etc/php.ini
max_execution_time = 300
max_input_time = 600
memory_limit = 160M
post_max_size = 100M
upload_max_filesize = 80M
error_reporting = E_ALL & ~E_NOTICE (預設為 E_ALL)
display_errors = On
八、安裝ostube (請參考 阿欣部落)
- ostube官網: http://www.ostube.de/en/ostube
- ostube2.2中文版
- 安裝完畢後
- vim ostube/cgi-bin/ uu_default_config.pm
upload_dir => $ENV{'DOCUMENT_ROOT'} . '/ostube/media/tmp/',
redirect_url => 'http://' . $ENV{'SERVER_NAME'} . '/ostube/upload.php',
path_to_upload => 'http://'. $ENV{'SERVER_NAME'} . '/ostube/uploads/',- cp -a ostube/cgi-bin/* /var/www/cgi-bin/
九. ostube的移機
- 將資料庫與網頁移至新的主機。
- 網頁伺服器設定
AllowOverride All -->wordpress MU用得到
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch -->必須讓ostube執行CGI程式
Order allow,deny
Allow from all - 改變media資料夾存取權限(所有的影音視訊都放在此)
- 進入後台管理介面
- 組態設定/一般設定(設定連結網頁與絕對位址)
- 組態設定/路徑設定/暫存檔儲存庫 (例如 /xx/ostube22/install/)