差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:mantis [2016/12/09 23:46] jonathantech:mantis [2021/01/16 14:51] (目前版本) – 更換 Plugin jonathan
行 1: 行 1:
 +====== Mantis 問題控管系統安裝程序 ======
 +本安裝程序除 Mantis 本身安裝外,還包含 Mantis 與 dokuwiki 整合的詳細說明以及升級過程與中文相關的常見問題處理方式.
  
 +  * Mantis 官方網站 : http://www.mantisbt.org/
 +
 +===== - 安裝環境 =====
 +<columns>
 +<style box float-left>
 +<ditaa name=env_desc>
 +
 ++---------------------+           +---------------+
 +| 192.168.0.242                 | 192.168.0.240 |
 +|                                             |
 +| CentOS 6   +--------+           | CentOS 6      |
 +| Apache 2   |cPNK    |           +----------+    |
 +| PHP 7.0    |        |           |{s}          |
 +|            | Mantis |---------->| Percona  |    |
 ++----------+ |        |           |cGRE      +----+
 +|cBLU      +-+        |           | 5.6      |
 +| Dokuwiki | +--------+           +----------+        
 ++-----+----+     ^
 +      ^          :
 +      |          |
 +      +----------+
 +</ditaa>
 +</quote>
 +NEWCOL
 +  * OS : CentOS 6.8 64bit
 +  * Web : Apache 2.2.15
 +  * AP : PHP 7.0.13
 +  * DB : Percona 5.6.32
 +  * mantis : 1.3.4
 +  * dokuwiki : 2007-06-26b
 +</columns>
 +
 +===== - 安裝說明 =====
 +==== - 設定 Percona 內的 Mantis DB ====
 +  * @192.168.0.240
 +  * 建立的 DB : mantis 採用 utf8_bin
 +  * 建立 DB 的 user 帳號 mantisuser 密碼 yourpassword
 +  * 設定 mantisuser 可以由 192.168.11.250 使用 mantis 這 DB 的 SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER,CREATE TEMPORARY TABLES 權限
 +<code>
 +mysql -u root -p
 +
 +CREATE DATABASE mantis DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
 +GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER,CREATE TEMPORARY TABLES ON mantis.* TO [email protected] IDENTIFIED BY 'yourpassword';
 +quit
 +
 +mysqladmin -u root -p reload
 +</code>
 +
 +
 +
 +==== - 安裝與設定 mantis ====
 +  * @192.168.0.242
 +  * 下載與安裝 mantis 到 http://192.168.11.242/mantis/ 實際目錄 /var/www/html/mantis
 +<code>
 +su -
 +cd /var/www/html
 +wget http://downloads.sourceforge.net/project/mantisbt/mantis-stable/1.3.4/mantisbt-1.3.4.tar.gz
 +tar -zxvf mantisbt-1.3.4.tar.gz
 +rm -rf mantisbt-1.3.4.tar.gz
 +mv mantisbt-1.3.4 mantis
 +chown -R apache:apache mantis
 +</code>
 +  * http://192.168.0.242/mantis/
 +  * 再來就依據設定畫面設定 DB : Percona IP: 192.168.0.240 User:mantisuser Password:yourpassword
 +  * 安裝完成後要馬上執行以下兩點:
 +    - 刪除 /var/www/html/mantis/admin 目錄
 +    - 使用預設管理員帳號密碼 administrator/root 建立新的 Administrator 權限的帳號,然後透過 e-Mail 通知方式認證完成後,使用新的管理員權限帳號登入並刪除 administrator 這個預設帳號
 +  * 如果需要預設為正體(繁體)中文,可以直接更改系統設定檔 /var/www/html/mantis/config/config_inc.php 加入 $g_default_language 的定義<code php>
 +<?php
 +:
 +:
 +        # --- Language --------------------
 +        $g_default_language = "chinese_traditional";
 +
 +?>
 +</code>
 +
 +===== - mantis 與 dokuwiki/Subversion 整合說明 =====
 +<note>
 +請參考:\\
 +  * **[[tech:mantisdokuwiki]]**
 +  * **[[tech:svnmantis]]**
 +</note>
 +
 +
 +===== Mantis 正(繁)體中文升級注意事項 =====
 +<note>
 +  * 如果要升級的話可參考 [[http://www.mantisbt.org/manual/manual.installation.upgrading.php|Mantis Upgrading]] 說明
 +  * 因為 1.1.1 內的正(繁)體中文檔 UTF-8 已經由 chinese_traditional_utf8 更改成 chinese_traditional,所以如果之前是採用**正(繁)體中文檔 UTF-8** 當預設語系的話,在升級完成後需要檢查兩個地方:
 +    - config_inc.php 內的 $g_default_language 設定值要修正成 "chinese_traditional";<code php>
 +$g_default_language = "chinese_traditional";
 +</code>
 +    - mantis_user_pref_table 內的 language 欄位內容也要改成 chinese_traditional<code sql>
 +update mantis_user_pref_table 
 +  set language='chinese_traditional' 
 +  where language='chinese_traditional_utf8'
 +</code>
 +</note>
 +
 +===== 原有 PostgreSQL 資料移轉到 MySQL 的語法 =====
 +<note>
 +  * 因為原本 1.0.7 版在使用 PostgreSQL 都沒問題,但是升級到 1.1.1 之後發現會出現一堆和 Sequences 相關的問題.. 找了一下相關問題解決方案,似乎轉成 MySQL 比較快.. 
 +  * 所以我採用依照全新的方式直接安裝 1.1.1 到 MySQL,建立出正確的 DB Schema,然後在匯入 PostgreSQL 內的資料,以下是主要的匯出 PostgreSQL 匯入 MySQL 語法. Exp. 針對 **mantis_bug_table**
 +<code sh>
 +pg_dump -d -E UTF-8 -O -x --data-only -t mantis_bug_table -h localhost -U mantis mantis > mantis_bug_table.sql
 +vi mantis_bug_table.sql
 +(將前面幾行 SET 用來設定 PostgreSQL 的部份刪除)
 +cat mantis_bug_table.sql | mysql -u mantis -p  --default-character-set=utf8 mantis
 +</code>
 +</note>
 +{{tag>mantis 安裝}}