2/24/2008

黑社會読み物小舖 - Mantis



Issue or Bug Tracking System並不能保證產出的軟體就是100分, 但可以保證產出軟體的過程是有品質控管的.

我曾用過幾套Issue or Bug trakcing system, 如BugZilla, dotProject, Jira, GForgeGroup, 各有優缺點.
這幾天在survey Mantis, 主要原因是不用錢, 又能與wiki、SVN整合, 功能也算完整. 以下是我的安裝與設定筆記, 持續新增中.

Mantis

How to Install Mantis:

memo by saunier 20080224

1. install appserv-win32-2.5.9.exe (PHP+MySQL+Apache)
2. create database mantis (utf8_bin)
3. create database user for mantis
4. download mantis : http://www.mantisbt.org/download.php , InstantMantis-1.1.1.zip
unzip InstantMantis-1.1.1.zip
mv InstantMantis-1.1.1\root\mantis to C:\AppServ\www

5. If you want to use jpgraph function
(1) download arialuni.ttf, mv it into c:\windows\fonts\
(2) create C:\AppServ\www\mantis\jpgraph
(3) download jpgraph-2.3.tar.gz, unzip jpgraph-2.3.tar.gz, mv jpgraph-2.3\src to C:\AppServ\www\mantis\jpgraph
(4) modify C:\AppServ\www\mantis\jpgraph\src\jpg-config.inc.php
add:
DEFINE("TTF_DIR", "C:/windows/fonts/");
mark:
//DEFINE('CHINESE_TTF_FONT','bkai00mp.ttf');
add:
DEFINE('CHINESE_TTF_FONT','arialuni.ttf');
(5) modify C:\AppServ\www\mantis\core\graph_api.php
a. 把所有FS_BOLD改成FS_NORMAL, 因為此字型不支援style bold
b. find function graph_get_font(), 在$t_font_map = array(...)內新增
'chinese_big5' => FF_BIG5
(6) modify C:\AppServ\www\mantis\jpgraph\src\jpgraph_ttf.inc.php
find these:
elseif( $aFF === FF_CHINESE ) {
if( !function_exists('iconv') ) {
JpGraphError::RaiseL(25006);
//('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).');
}
return iconv('BIG5','UTF-8',$aTxt);
變更為
elseif( $aFF === FF_CHINESE ) {
/*if( !function_exists('iconv') ) {
JpGraphError::RaiseL(25006);
//('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).');
}
return iconv('BIG5','UTF-8',$aTxt);*/
return $aTxt;
(7) modify C:\Windows\php.ini
find extension=php_gd2.dll, 若前方有分號(;), 將分號移除
(optional) 可調整以下的值
max_execution_time = 60 ; Maximum execution time of each script, in seconds
memory_limit = 16M ; Maximum amount of memory a script may consume (8MB)

6. modify C:\AppServ\www\mantis\config_inc.php
add:
//Information
$g_window_title = 'TWM Mantis System';
$g_page_title = 'Welcome to TWM Issue Tracking System';
//Language
$g_default_language = 'chinese_traditional_utf8';
//Allow anonymous login, 是否允許anonymous申請帳號, ON or OFF
$g_allow_signup = OFF;
//Mail
$g_send_reset_password = OFF; //When set to ON, Mantis will email the users their new passwords when their accounts are reset. If set to OFF, the password will be reset to blank and no e-mail will be sent. Default is ON. 若SMTP尚未設定完成, 可將此參數設成OFF, 以利User登入後自行修改密碼.
#$g_phpMailer_method = 2;
#$g_smtp_host = 'TCCEXCH01.pcdc.com.tw'; // whatever you smtp server is
#$g_smtp_username = 'xxx';
#$g_smtp_password = 'xxx';
#$g_administrator_email = '';
#$g_webmaster_email = '';
#$g_from_email = '';
#$g_stop_on_errors = ON;
#$g_email_receive_own = OFF;
#$g_validate_email = OFF;
//Session and Cookie
#$g_cookie_time_length =
//Automatically redirect after short amount of time
#$g_wait_time = //自動轉向延遲時間
//Jpgraph Package, if you want to use jpgraph function
$g_use_jpgraph = ON;
$g_jpgraph_path = 'C:/AppServ/www/mantis/jpgraph/src/' //jpgraph plug-in folder
$g_graph_font= 'chinese_big5';
//Time and Date
$g_short_date_format = 'Y-m-d';
$g_normal_date_format = 'Y-m-d H:i';
$g_complete_date_format = 'Y-m-d H:i';
putenv('TZ=CCT-8'); //使用台北時間
//File Upload
$g_file_upload_method = DISK;
$g_absolute_path_default_upload_folder = 'D:/mantis/upload/';
$g_max_file_size = 5000000; //上傳檔案最大5MB, 與php.ini有關, 若有需要記得調整php.ini內的upload_max_filesize
$g_disallowed_files = 'php,php3,phtml,html,class,java,exe,pl'; //不允許上傳的檔案

7. restart Apache
8. http://localhost/mantis/admin/install.php
安裝完畢後, 請記得移除 admin 目錄, 也請記得新建管理者帳號, 移除administrator
9. 語系檔位於 C:\AppServ\www\mantis\lang\strings_chinese_traditional_utf8.txt
可自行更改不合適的中文詞句