設定環境

  1. 安裝AppServ 至 C:\AppServ\
  2. 進入phpMyAdmin手動建立資料庫 mantis (utf8_gen)
  3. 修改 mysql.ini
    開啟 mysql.ini 後,在 [mysqld] 內新增下列敘述後存檔。
    max_allowed_packet=16M
  4. 修改 C:\Windows\php.ini
    開啟 php.ini 後,調整下列的值:
    memory_limit = 30M
    max_execution_time = 300
    max_input_time = 600
  5. 重新啟動 Apache

安裝/設定Mantis

  1. 下載最新版的 mantis
  2. 解開 mantis 到 appserv 安裝路徑下的 www 目錄
  3. 安裝 jpgraph
    1. 下載arialuni.ttf字型,並移到 c:\windows\fonts\ 內
    2. 建立 C:\AppServ\www\mantis\jpgraph 目錄
    3. 下載 jpgraph-2.3.tar.gz 解開後移到 C:\AppServ\www\mantis\jpgraph
    4. 修改 C:\AppServ\www\mantis\jpgraph\src\jpg-config.inc.php
      新增: DEFINE("TTF_DIR", "C:/windows/fonts/");
      mark: //DEFINE('CHINESE_TTF_FONT','bkai00mp.ttf');
      新增:DEFINE('CHINESE_TTF_FONT','arialuni.ttf');
    5. 修改 C:\AppServ\www\mantis\core\graph_api.php
      a. 把所有FS_BOLD改成FS_NORMAL, 因為此字型不支援style bold
      b. 找到 graph_get_font(), 在$t_font_map = array(...)內新增
      'chinese_big5' => FF_BIG5
    6. 修改 C:\AppServ\www\mantis\jpgraph\src\jpgraph_ttf.inc.php
      找到

      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;
  4. 修改 mantis\config_inc.php
    加入以下的資訊:

    //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 = 'C:/AppServ/www/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'; //不允許上傳的檔案類型
  5. 移除 C:\AppServ\www\mantis\admin 目錄

登入Mantis

  1. 開啟瀏覽器進入 http://localhost/mantis/admin/install.php
  2. 使用管理者帳號/密碼登入:administrator /root
arrow
arrow
    全站熱搜

    Neo Chao 發表在 痞客邦 留言(0) 人氣()