- 首先將apt的來源加入multimedia支援
debian:# vi /etc/apt/sources.list
add
deb http://www.debian-multimedia.org stable main
save&exit - 增加multimedia的gpgkey,並更新apt列表,安裝gpgkey前請先檢查bzip2安裝了沒
debian:~# wget http://debian-multimedia.org/gpgkey.pub -O - | apt-key add - && apt-get install debian-multimedia-keyring
debian:~# apt-get update - 安裝套件mplayer、mencoder、ruby、flvtools2、php5-cli、php5-gd
debian:~# apt-get install mplayer mencoder ruby php5-cli php5-gd
debian:~# wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
debian:~# tar zxvf flvtool2-1.0.6.tgz
debian:~# cd flvtool2-1.0.6
debian:~/flvtool2-1.0.6# ruby setup.rb config;ruby setup.rb setup;ruby setup.rb install
debian:~# /etc/init.d/apache2 restart - 到osTube網站註冊,並下載osTube_2.2_Community_Edition_osTube_community_edt_2.2.tar.gz
debian:~# mkdir /var/www/ostube
debian:~# tar zxvf osTube_2.2_Community_Edition_osTube_community_edt_2.2.tar.gz -C /var/www/ostube - 建立ostube的mysql資料庫,並將指定資料庫使用者權限
- 打開瀏覽器,輸入ostube的網址http://www.myurl.org/ostube開始進行安裝
安裝到 "Error! (one last setting needed..)"時
debian:/var/www/ostube# touch includes/config.php
debian:/var/www/ostube# chmod 777 includes/config.php
按下F5重整繼續安裝,出現Congratulations就代表安裝完成 - 設定檔案上傳的位置及上傳的大小限制,單位為byte,1GB =1024 MB = 1048576 KB = 1073741824 Byte,並將ostube/cgi-bin下的所有檔案複製到/usr/lib/cgi-bin
debian:~# cd /var/www/ostube/cgi-bin/
debian:~# vi uu_default_config.pm (照上面的修改)
fix
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/',
max_upload => 509715200,
save&exit
debian:/var/www/ostube# cp cgi-bin/* /usr/lib/cgi-bin/ - 修正convert.php,將下列程式碼加上註解#
debian:/var/www/ostube# vi convert.php
fix
if (!$mplayer_rc1) {
#$conversionString = str_replace("-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames ", "", $conversionString);
} - 中文化
懶人法
debian:/var/www/ostube# rm -rf languages/english/english.ini
debian:/var/www/ostube# wget http://203.68.253.130/~yungzai/ostube2.2/english_2.2.ini;mv english_2.2.ini languages/english/english.ini
debian:/var/www/ostube# wget http://203.68.253.130/~yungzai/ostube2.2/admin.ini;mv admin.ini languages/english/admin.ini
debian:/var/www/ostube#iconv -f BIG5 -t UTF-8 languages/english/admin.ini.1 > admin.ini
debian:/var/www/ostube# rm -rf languages/english/admin.ini.1
自建語系法(怕麻煩者勿用)
debian:/var/www/ostube# cd languages/
debian:/var/www/ostube/languages# cp -r english zh-TW
debian:/var/www/ostube/languages# cd zh-TW
debian:/var/www/ostube/languages/zh-TW# vi settings.php
fix
$settings['iso_code'] = "zh-TW";
$settings['title'] = "繁體中文";
$settings['locale'] = array('zh-TW','tw','Taiwan');
save&exit
debian:/var/www/ostube/languages/zh-TW# rm english.ini
debian:/var/www/ostube/languages/zh-TW# wget http://203.68.253.130/~yungzai/ostube2.2/english_2.2.ini;mv english_2.2.ini zh-TW.ini
debian:/var/www/ostube/languages/zh-TW# wget http://203.68.253.130/~yungzai/ostube2.2/admin.ini
debian:/var/www/ostube/languages/zh-TW#iconv -f BIG5 -t UTF-8 languages/english/admin.ini.1 > admin.ini
debian:/var/www/ostube/languages/zh-TW# rm -rf languages/english/admin.ini.1
debian:/var/www/ostube/languages/zh-TW# cd /var/www/ostube/templates/default/images
debian:/var/www/ostube/templates/default/images# cp -r english zh-TW
debian:/var/www/ostube/templates/default/images# cd zh-TW
debian:/var/www/ostube/templates/default/images/zh-TW# wget http://video.hlps.tcc.edu.tw/templates/default/images/zh-TW/zh-TW.gif
debian:~# cd /var/www/ostube/templates/default/mail
debian:/var/www/ostube/templates/default/mail# cp english -r zh-TW
由於新建一個語系,在分類上要先在English模式下,將中文的分類名稱加好再做轉換
或是將以下sql指令匯入資料庫
INSERT INTO `ost_channels2language` (`id`, `channel_id`, `channel_name`, `channel_desc`, `channel_language`) VALUES
(25, 11, '趣味', NULL, 'zh-TW'),
(26, 9, '運動', NULL, 'zh-TW'),
(27, 3, '競賽', NULL, 'zh-TW'),
(28, 5, '教育', NULL, 'zh-TW'),
(29, 4, '電影', NULL, 'zh-TW'),
(30, 1, '卡通', NULL, 'zh-TW'),
(31, 7, '新聞', NULL, 'zh-TW'),
(32, 8, '旅遊', NULL, 'zh-TW'),
(33, 6, '流行', NULL, 'zh-TW'),
(34, 12, '科技', NULL, 'zh-TW'),
(35, 10, '動物', NULL, 'zh-TW'),
(36, 2, '奇異', NULL, 'zh-TW');
在Configuration->General Settings->Default Language選擇為繁體中文,至於管理者的語系要到資料庫下ost_users資料表的users_language,將管理者的users_language改成zh-TW即可 - mysql中文utf8設定,增加@mysql_query("SET NAMES utf8", $this->connection);
debian:/var/www/ostube# vi includes/class.database.php
if(!$this -> connection = @mysql_connect($DBhost,$DBuser,$DBpass)) {
if($this->debug) die("Error: Can not connect to database - " . $DBhost);
unset($this);
return false;
} else {
@mysql_query("SET NAMES utf8", $this->connection);
$this->connected = true;
} - 因為中文化檔是澎湖的老師修改的,所以要對中文化檔的參數做修正
debian:~# vi /var/www/ostube/languages/zh-TW/zh-TW.ini
send2friend_subject
debian~# vi /var/www/ostube/languages/zh-TW/admin.ini
tosite - convert error debug
debian:~# cat /var/www/ostube/conversion.log
觀察錯誤訊息,再去對convert.php...等檔案做設定
2008年10月1日 星期三
osTube安裝設定
訂閱:
張貼留言 (Atom)
1 則留言:
多謝您的意見~
我移動linux主機後的顯示問題
會出現一堆????????
看見您的解決方法加入
mysql中文utf8設定,增加
@mysql_query("SET NAMES utf8", $this->connection);
果然就正常了^^
張貼留言