使用EasyPHP 安裝mantis
1. 簡介
EasyPHP是在Windows平台上啟動並執行軟體包,包括Apache伺服器,MySQL資料庫,PHP,以及phpMyAdmin工具。
mantis是基於php/MySQL/web 的問題跟蹤系統。
2. 下載
EasyPHP 1.8的為http://easyphp.org/telechargements.php3。EasyPHP 1.8包括:
1) Apache 1.3.33(Win32)
2) PHP 4.3.10
3) phpMyAdmin 2.6.1
4) MySQL 4.1.9
mantis 1.0.5的為http://www.mantisbt.org/download.php。
3. 安裝
1)直接運行下載的EasyPHP安裝檔案easyphp1-8_setup.exe,EasePHP的預設安裝目錄為C:\Program Files\EasyPHP1-8。
2)將C:\Program Files\EasyPHP1-8下phpmyadmin檔案夾移到C:\Program Files\EasyPHP1-8\www下。
3)將下載的mantis_1.0.5.tar.gz檔案直接解壓到C:\Program Files\EasyPHP1-8\www下。
4)安裝結束,先通過開始菜單 - 程式 - EasyPHP運行EasyPHP,再通過http://localhost:80/運行phpmyadmin和mantis_1.0.5。
4. 配置
1)更改Apache ServerAdmin設定
在C:\Program Files\EasyPHP1-8\apache\conf下的httpd.conf檔案中尋找ServerAdmin,將ServerAdmin admin@localhost 改為ServerAdmin (有效郵件地址)。
2)更改MySQL的root口令
運行phpmyadmin,編輯使用者 'root'@'localhost'許可權,更改密碼為'admin'。執行後需要修改C:\Program Files\EasyPHP1-8\www\phpmyadmin下config_inc.php檔案,將root使用者的password由''改為 'admin'。
3)配置mantis
運行mantis_1.0.5,第一次將自動進入admin頁面,要求建立 bugtracker資料庫。成功後將進入登陸頁面,使用administrator/root登入,mantis 便開始工作。(注意:配置mantis成功後,應該刪除C:\Program Files\EasyPHP1-8\www\mantis_1.0.5下的admin目錄;同時禁止administrator賬戶或改變 administrator賬戶的預設口令。)
4)郵件伺服器配置
在C:\Program Files\EasyPHP1-8\apache下的php.ini檔案中尋找SMTP,將SMTP = localhost改為你的發件伺服器,如SMTP = smtp.sina.com.cn;尋找sendmail_from,將前面的分號去掉,並在後面填上郵件地址:sendmail_from = (有效郵件地址)。
在C:\Program Files\EasyPHP1-8\www\mantis_1.0.5\config_inc.php檔案中添加
$g_smtp_host='smtp.sina.com.cn';
$g_smtp_username='帳號';
$g_smtp_password='密碼';
$g_phpMailer_method =2;
5)中文顯示
在C:\Program Files\EasyPHP1-8\www\mantis_1.0.5\config_inc.php檔案中添加
$g_default_language='auto';
6)檔案上傳
在C:\Program Files\EasyPHP1-8\www\mantis_1.0.5\config_inc.php檔案中添加
$g_allow_file_upload=ON;
$g_file_upload_method=DISK;
並且在C:\下建立upload目錄。(注意最好不要用中文目錄名,目錄名中間也不要帶空格。)
當你以管理員身份登入,建立項目時,在上傳檔案路徑那一項填上C:\upload即可。
7)其他問題
配置完成後,鍵入http://localhost/mantis_1.0.5/login_page.php 就可以開啟mantis登入頁面了。但要使網內其他使用者也能訪問伺服器,應該把httpd.conf檔案的Listen後的地址(預設為127.0.0.1:80)改為伺服器位址。這樣就可以從其他用戶端訪問了。