mantis系統由windows移植到Linux平台__Linux

來源:互聯網
上載者:User

1 linux下安裝mantis

1.1 系統由windows平台轉換到linux平台

1.1.1 備份mysql資料庫
      
       #####################開啟DOS視窗##########################

      【開始】-【運行】-【cmd】

       #####################在mysql bin檔案夾中將bugtrackerDatabase Backup到.sql檔案中############################

       C:/mysql/bin> mysqldump -u[mysql使用者名稱] -p[mysql資料庫] bugtracker> D:/mantis.sql

1.1.2 備份windows下mantis檔案夾中所有檔案

      注意不要改變原有mantis檔案夾得名稱

1.1.3 準備linux伺服器

      使用的版本CentOS

1.1.4 更改mysql root的密碼

      # mysql -p

      Enter password:[預設為空白]

      mysql> update user set password=password('新密碼') where User='root';

      mysql> flush privileges

      退出重新登陸

      # mysql -p

      Enter password:[新密碼]

1.1.5 建立資料庫

      mysql> create datebase bugtracker;

      use bugtracker

1.1.6 匯入原有資料【mantis.sql】

      #####################例如mantis.sql檔案放在linux系統的/home/目錄下

      mysql> source /home/mantis.sql

1.1.7 將備份的mantis檔案夾放入/var/www/html/中

      註:我是先將其放入linux的ftp資源中然後通過如下命令匯入

      scp -r mantis-1.0.0a3 [linux伺服器]:/var/www/html/

1.1.8 httpd.conf檔案配置

      vi /etc/httpd/conf/httpd.conf     

      找到DocumentRoot "/var/www/html" 更改為DocumentRoot "/var/www/html/mantis-1.0.0a3" 目的:輸入ip地址後直接彈出登陸頁面

      找到   AddDefaultCharset UTF-8 更改為#AddDefaultCharset UTF-8 目的:解決mantis中文顯示為亂碼問題

1.1.9 更改mantis設定檔

      vi /var/www/html/mantis-1.0.0a3/config_inc.php

      找到$g_db_password 更改為$g_db_password = "步驟1.1.4中修改後的新密碼"

      找到$g_jpgraph_path   = 'c:/mantis-1.0.0a3/jpgraph-2.1.1/src/'更改為$g_jpgraph_path   = '/var/www/html/mantis-1.0.0a3/jpgraph-2.1.1/src/';

      找到$g_log_destination = 'file:c:/mantis-1.0.0a3/upload/mantis.log' 並注釋掉

1.1.10 修改jpgraph的設定檔

      vi /var/www/html/mantis-1.0.0a3/jpgraph-2.1.1/src/jpg-config.inc.php

      找到DEFINE("TTF_DIR","c:/windows/fonts/"); 更改為DEFINE("TTF_DIR","/var/www/html/mantis-1.0.0a3/font/")

1.1.11 在windows系統中拷貝simhei.ttf simsun.ttc

      在windows系統中的c:/windows/fonts/複製simhei.ttf simsun.ttc 到linux系統/var/www/html/mantis-1.0.0a3/font/目錄下


1.1.12 轉換完成 IP地址欄輸入http://linux系統IP/ 即可進入mantis登陸頁面

問題點匯總:

【問題】移植後mantis無法開啟並下載附件

【問題原因】資料庫中儲存的項目的路徑中存在"/"及"/",而linux下只認"/"

【解決方案】

登陸mysql資料庫,進入資料庫bugtracker,執行如下命令:

-------------------------------------------------------------------------------
update mantis_bug_file_table a set folder=replace(a.folder,'//','/'),diskfile=replace(a.diskfile,'//','/');

update mantis_project_table a set file_path=replace(a.file_path,'//','/');

update mantis_project_file_table a set folder=replace(a.folder,'//','/'),diskfile=replace(a.diskfile,'//','/');
-------------------------------------------------------------------------------

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.