搭建Mantis 缺陷管理系统

搭建Mantis 缺陷管理系统

By Snooper

错误必有!欢迎指正!

什么是Mantis

MantisBT is a free popular web-based bugtracking system (feature list). It is written in the PHP scripting language and works with MySQL, MS SQL, and PostgreSQL databases and a webserver. MantisBT has been installed on Windows, Linux, Mac OS, OS/2, and others. Almost any web browser should be able to function as a client. It is released under the terms of the GNU General Public License (GPL).

 


Mantis
是一个BUG管理系统。主要特点如下:

1、 php写的系统,安装方便,不用像 bugzilla 那样安装那么多perl支持;

2、 系统相对简单轻磅,使用简单;

3、 出色的多语支持,对于对日开发等公司非常合适;

 

界面图示:

 


      
 在线演示地址:
http://www.futureware.biz/mantisdemo

 

环境搭建及Mantis安装、配置

由于Mantis是用php写的系统,而要调试php程序当然要用到apache+php+mysql,而apache+php+mysql配置起来却又是很麻烦的事,这还不包括环境冲突、、、等等,这些又或者是那些导致配置失败的问题。但刚巧有这么一个套件可以省去这些以前是需要解决的问题,这个套件就是EasyPHP了。EasyPHP集成了:ApachePHPMySQLPhpMyAdmin

以上软件可参考文章最后的参考资料。

适用范围

本文介绍基于Windows下的Mantis BUG管理系统的搭建。

软件下载

Mantis下载地址:http://www.mantisbt.org/

EasyPHP下载地址:http://www.easyphp.org/

 

本文以mantis-1.1.0a4+ EasyPHP-3.1为演示版本,并测试通过。

安装EasyPHP

         安装EasyPHP很简单,双击下载到的EasyPHP-3.1.exe,然后一直默认点击Next即可安装完成。当然啦,在License Agreement页面是必须选择I Access The Agreement……

       软件默认目录:C:"Program Files"EasyPHP3.1 

 安装进度

       

      Installing…
      

            
      Completing!

 

EasyHPH成功安装!勾选上“Open Help”、“Launch EasyPHP”,点击“Finish”。可看到如下页面:
           
      若成功运行时,双击在
Windows托盘的 图标,可看到如下图所示,ApacheMySQL的右边都是显示“Started”并亮绿灯的。 
       
  
    已知问题

1、 Apache没有正常运行,可能是因为Apache的默认使用的80端口被占用(Apache端口修改方法请继续往下阅读);

2、 若找不到原因,请重新启动电脑,据说重新启动电脑可以解决80%的问题,希望你遇到的不是余下的20%中的

安装Mantis

1、 将下载到的mantis-1.1.0a4.rar解压到mantis文件夹;

2、 EasyPHP安装目录,打开C:"Program Files"EasyPHP3.1"www"

3、 mantis文件夹复制到C:"Program Files"EasyPHP3.1"www"下;

安装Phpmyadmin

1、 打开C:"Program Files"EasyPHP3.1

2、 phpmyadmin文件夹剪切到C:"Program Files"EasyPHP3.1"www"

建立Bug数据库

1、 右键Windows托盘的 图标,选择“Local Web”,(或者在IE地址中输入“http://127.0.0.1/”)可看到如下页面:

 

 

2、 点击选择“mantis”,进入页面:


3、 不用修改/填写任何值,直接点击页面最下方的“Install/Upgrade Database”按钮 

4、 成功后可看到如下页面:


² 
OK,到此为止,Mantis系统已经搭建成功了。下面立刻验证一下是否已配置成功!

      1、 再次右键Windows托盘的 图标,选择“Local Web”,(或者在IE地址中输入“http://127.0.0.1/”)可看到如下页面:


2、 
点击选择“mantis”(或可省略步骤,直接在IE地址中输入“http://127.0.0.1/mantis/login_page.php”),进入页面:

配置完成的
Mantis的只有一个默认的系统管理员用户:

账号:administrator

密码:root

 

就这么简单,一个Bug管理系统就配置完成了,Mantis已经可以投入使用啦!但——实际使用中还是会有问题产生,如:Mantis配置完成后,默认配置完成的系统是English版本的,且只支持English,不支持Chinese,具体表现在:若在任何一个字段中输入中文成功保存后,再显示出来就是乱码(而解决中文显示乱码的问题很是棘手,且根据情况的不同解决的方法也不同,在网上搜索一下就有一大堆。。。),具体解决方法请继续往下Look……

中文版配置

配置完成时,Mantis默认为English系统,而要使用中文版Mantis则需要修改配置文件。

² 配置方法:

打开Mantis目录(C:"Program Files"EasyPHP3.1"www"mantis"),用记事本打开config_defaults_inc.php 文件,找到如下代码片段:

         。。。。。。

# --- language settings -----------

 

# If the language is set to 'auto', the actual

# language is determined by the user agent (web browser)

# language preference.

$g_default_language                = 'english';

。。。。。。

english   改为 chinese_simplified
修改完成后的代码片段如下所示:

……

# --- language settings -----------

 

# If the language is set to 'auto', the actual

# language is determined by the user agent (web browser)

# language preference.

$g_default_language                = 'chinese_simplified';

……

 

² 验证配置是否成功:

再次在IE中登录Mantis系统“http://127.0.0.1/mantis/login_page.php”),进入页面:

 

 OK,成功了。登录后,也一样是全中文的界面: 

 

 

局域网访问

配置完成时,Mantis默认为只能够本机访问,若要在局域网内访问则需要修改Apache的配置文件。

² 配置方法:

打开apache目录(C:"Program Files"EasyPHP3.1"apache"conf"),用记事本打开httpd.conf 文件,找到如下代码片段:

         。。。。。。

#

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the <VirtualHost>

# directive.

#

# Change this to Listen on specific IP addresses as shown below to

# prevent Apache from glomming onto all bound IP addresses.

#

#Listen 12.34.56.78:80

Listen 127.0.0.1:80

 

。。。。。。

 

Listen 127.0.0.1:80下一行加入一段代码 Listen 192.168.1.101:80

192.168.1.101Mantis服务器的IP地址

修改完成后的代码片段如下所示:

……

#

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the <VirtualHost>

# directive.

#

# Change this to Listen on specific IP addresses as shown below to

# prevent Apache from glomming onto all bound IP addresses.

#

#Listen 12.34.56.78:80

Listen 127.0.0.1:80

Listen 192.168.1.101:80

 

……

 

² 验证配置是否成功:

在局域网任一电脑中通过IE登录Mantis系统

http:// 192.168.1.101/mantis/login_page.php即可正常访问。

端口被占用

Mantis配置完成时,访问Mantis系统可能会出现端口被占用的问题,常见的原因是IIS默认端口为80,而Mantis配置完成时,默认的端口也是80。因此需要修改Mantis的端口或者是IIS的端口才可正常访问Mantis

² 配置方法:

打开apache目录(C:"Program Files"EasyPHP3.1"apache"conf"),用记事本打开httpd.conf 文件,找到如下代码片段:

……

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the <VirtualHost>

# directive.

#

# Change this to Listen on specific IP addresses as shown below to

# prevent Apache from glomming onto all bound IP addresses.

#

#Listen 12.34.56.78:80

Listen 127.0.0.1:80

Listen 192.168.1.101:80

 

……

Listen 192.168.1.101:80修改为 Listen 192.168.1.101:8001 

修改完成后的代码片段如下所示:

……

#

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the <VirtualHost>

# directive.

#

# Change this to Listen on specific IP addresses as shown below to

# prevent Apache from glomming onto all bound IP addresses.

#

#Listen 12.34.56.78:80

Listen 127.0.0.1:80

Listen 192.168.1.101:8001

 

……

 

² 验证配置是否成功:

在局域网任一电脑中通过IE登录Mantis系统

http:// 192.168.1.101:8001/mantis/login_page.php即可正常访问。

中文显示乱码的解决方法

² 中文显示乱码具体表现:

1、 使用administrator登录后,依次选择“管理→项目管理→点击[创建新项目]

数据填写如下:

 

*项目名称:Public Project

状态:

查看状态:

上传文件存放路径:

说明:说明

 

2、 点击【添加项目】,添加成功,返回列表页面,中文会显示为乱码: 

 

解决中文显示乱码方法:

² 前提条件:

1)         已成功安装EasyPHP(具体请阅读“安装EasyPHP”)

2)         已经安装Phpmyadmin(具体请阅读“安装Phpmyadmin”)

 

² 解决思路

可能是MySQL数据库默认编码而造成的,因此重建数据库即可解决。

因此,具体步骤可分为两部分:

a)         删除数据库;

b)         重建数据库;

 

² 步骤:

 (一)   删除数据库

1、 再次右键Windows托盘的 图标,选择“Local Web”,(或者在IE地址中输入“http://127.0.0.1/”)可看到如下页面:

 


2、 点击选择“Phpmyadmi”(或可省略步骤,直接在IE地址中输入“http://127.0.0.1/ Phpmyadmi”),进入页面:

 


3、 选择菜单“数据库”,并勾选上数据库“bugtracker”:

 

      
 

4、 点击 图标,进入删除数据库页面:
 
系统会询问“你将要删除一个完整的数据库!你真的要:
DROP DATABASE ‘bugtracker’;
 

5、 点击“是”,删除成功:

 

       

(二)   重建数据库

1、 点击菜单“数据库”打开数据库列表页面:

 

      
 

2、 创建新数据库,填写如上图“bugtracker”、“utf8_general_ci”,点击“创建”,创建成功:

 

       

3、 打开Mantis目录(C:"Program Files"EasyPHP3.1"www"mantis"),删除config_inc.php文件;

 

4、 右键Windows托盘的 图标,选择“Local Web”,(或者在IE地址中输入“http://127.0.0.1/”)可看到如下页面:

 

 

5、 点击选择“mantis”,进入页面:

 

 

6、 不用修改/填写任何值,直接点击页面最下方的“Install/Upgrade Database”按钮

 

7、 成功后可看到如下页面:

 

 

       

² 验证是否成功解决乱码问题:

再次新建一个项目,在任意字段中包含有中文字符……再次打开项目列表时,中文乱码问题已经解决,可正常显示:

        

使用Mantis

Mantis的使用较为简单,大略可分以下几个步骤:

1)         建立一个项目(菜单:管理→项目管理→创建新建项目);

2)         打开成功建立的项目,进入项目编辑页面,为该项目添加“分类”、“版本”(如下图所示);

  

3)         Bug(菜单:报告问题:

  

4)         查看报表

5)         当然,还有权限配置,流程配置、、、等功能,详细可登录http://www.mantisbt.org/了解。

系统管理员

配置完成的Mantis的只有一个默认的系统管理员用户:

账号:administrator

密码:root

 

1、 打开http://127.0.0.1/mantis/login_page.php 进入页面:

 

 

2、 登录成功后可看到如下页面:

 

参考资料:

以下资料来源:网上收集

EasyPHP

EasyPHP 是一个完美的 APM Apache/PHP/MySQL)组合。虽然它包含的Apache/PHP/MySQL都不是最新的版本,但是却是最稳定的版本,而且也可以保证一般的 PHP web 应用的正常运行。并且安装完成之后不需要自己再做任何配置,只需要把准备发布的 PHP 应用copy  WWW 目录就可以了。

EasyPHP集成了: Apache, PHP, MySQL, PhpMyAdmin

该软件帮助你使用PHP管理数据、开发站点和应用程序。它是调试PHP程序的好东西。

猜你喜欢

转载自onlyor.iteye.com/blog/1705853