Mantis Installation Guide (for 1.1.8)

来源:互联网 发布:html2canvas.js demo 编辑:程序博客网 时间:2024/05/20 10:20
一、软件准备

1、操作系统:

Windows XP SP3

2、安装软件:

xampp-win32-1.7.1-installer.exe

Mysqlcc0.9.4

Mantis1.1.8

JpGraph3.0.6

二、安装xampp

1、 下载完xampp后,进行安装,安装目录自定,如安装在D:/Program Files/xampp,如图1所示。

1 输入安装路径

2、 下一步,选择SERVICE SECTION,如图2所示。

2 选择安装服务项

 

3、 注意:默认apache端口为80mysql3306,如果端口被占用了,需要设置端口,一般IIS会占用apache80端口,最好把IIS服务停掉。

 

4、 安装完成后,如图3所示,apachemysql就自动启动了。

3 安装完成

5、 点击上图Apache那行的Admin按钮,弹出XAMPP页面,选择中文,如图4所示。

4 选择中文页面

6、 点击左边"安全",出现XAMPP安全页面,如图5所示。

5 XAMPP安全

7、 点击图中http://localhost/security/xamppsecurity.php链接,设置mysqlroot的密码,如图6所示,密码设置成功。

6 MySQL密码设置成功

三、安装Mysqlcc

1、 双击安装文件,一路next后,安装完成。

2、 打开Mysqlcc软件,如图7所示,是Mysqlcc软件的界面。

7 MySQL控制台界面

 

3、 name中填root,在hostname中填localhost,在Password中输入刚刚设置的root密码。为了测试是否可以连接成功,可以先点击Test按钮,测试一下,如果提示连接成功,点Add按钮即可。

 

4、 在左边选中Databases点右键,选择新建数据库,新建一个mantis数据库,如图8所示。

8 新建mantis数据库

 

5、 新建完mantis数据库后,在下面的User Administration右键新增加一个用户,用户名和密码最好都为mantis并且为该用户指定数据库Mantis与权限All Privileges,点击Add,如图9所示。

9 增加Mantis数据库用户及权限

 

四、安装及配置Mantis

1、 解压Mantisxampp目录下,如D:/Program Files/xampp/mantis

2、 设置Mantis目录别名和权限,打开D:/Program Files/xampp/apache/conf/httpd.conf文件,在文件最后添加如下内容:

Alias /mantis "D:/Program Files/xampp/mantis/"

Options Indexes
AllowOverride None
Order allow,deny
Allow from all

注意:"D:/Program Files/xampp/mantis/"目录中的"/"是反斜杠。

 

3、在XAMPP Control Panel Application中重启一次Apache服务器上面的设置才会生效。

 

4、打开IE输入http://localhost/mantis/admin/install.php,即打开mantis安装页面,如图10所示。

10 安装Mantis配置页面

 

5、 在图10中填写好所有选项后,点击按钮,安装结果如图11所示。

11 安装结果

 

注意:Installing Database没有插入成功,要把SQL拷贝出来,如图12所示。

12 数据库没有安装成功

 

6、 打开http://localhost/xampp/页面,点击工具下的phpMyAdmin,进入页面输入mysql的用户名和密码。

 

7、 选中mantis数据库,然后点击右边的,并将刚才拷贝的SQL脚本粘贴在执行窗口中,如图13所示,注意:去掉第一行Database Creation Suppressed, SQL Queries follow

拷贝出来的sql脚本默认使用的日期为1970-01-01,也可以自己先粘贴到文本文档中,使用替换功能将时间更新到当前时间,再粘贴回脚本执行窗口。

13 重新安装数据库

 

8、 点击"执行"按钮,数据库插入成功,结果如图14所示。

14 数据库插入成功

9、 执行成功后打开http://localhost/mantis/login_page.php,就进入到登陆页面了。默认用户名为administrator,密码为root

10、安装成功之后,建议将"D:/Program Files/xampp/mantis/"中的admin文件夹删除。

 

五、设置:Mantis为中文

1、修改Mantis中的默认配置文件config_defaults_inc.php,找到如下内容,对照修改,或者把以下内容拷到config_inc.php中也可以。

2、配置文件加载顺序:先加载config_defaults_inc.php,后加载config_inc.phpconfig_inc.php中的值会覆盖config_defaults_inc.php

################################
# Mantis Language Settings
################################

# --- 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_gb2312';

# list the choices that the users are allowed to choose
$g_language_choices_arr = array(
'auto',
'bulgarian',
'catalan',
'chinese_simplified_gb2312',
'chinese_traditional',
'croatian',
'czech',
'danish',
'dutch',
'english',
'estonian',
'finnish',
'french',
'german',
'hebrew',
'hungarian',
'icelandic',
'italian',
'japanese',
'korean',
'latvian',
'lithuanian',
'norwegian',
'polish',
'portuguese_brazil',
'portuguese_standard',
'romanian',
'russian',
'serbian',
'slovak',
'slovene',
'spanish',
'swedish',
'turkish',
'ukrainian'
);

# Browser language mapping for 'auto' language selection
$g_language_auto_map = array(
'bg' => 'bulgarian',
'ca' => 'catalan',
'zh-cn, zh-sg, zh' => 'chinese_simplified_gb2312',
'zh-hk, zh-tw' => 'chinese_traditional',
'cs' => 'czech',
'da' => 'danish',
'nl-be, nl' => 'dutch',
'en-us, en-gb, en-au, en' => 'english',
'et' => 'estonian',
'fi' => 'finnish',
'fr-ca, fr-be, fr-ch, fr' => 'french',
'de-de, de-at, de-ch, de' => 'german',
'he' => 'hebrew',
'hu' => 'hungarian',
'hr' => 'croatian',
'is' => 'icelandic',
'it-ch, it' => 'italian',
'ja' => 'japanese',
'ko' => 'korean',
'lt' => 'lithuanian',
'lv' => 'latvian',
'no' => 'norwegian',
'pl' => 'polish',
'pt-br' => 'portugese_brazil',
'pt' => 'portugese_standard',
'ro-mo, ro' => 'romanian',
'ru-mo, ru-ru, ru-ua, ru' => 'russian',
'sr' => 'serbian',
'sk' => 'slovak',
'sl' => 'slovene',
'es-mx, es-co, es-ar, es-cl, es-pr, es' => 'spanish',
'sv-fi, sv' => 'swedish',
'tr' => 'turkish',
'uk' => 'ukrainian'
);

# Fallback for automatic language selection
$g_fallback_language = 'english';

 

六、Mantis中邮件配置

以下内容可以在config_defaults_inc.php中找到。

建议把该内容拷到config_inc.php中。

#############################
# Mantis Email Settings
#############################

# --- email variables -------------
$g_administrator_email =
'xxxx@xxx.com';
$g_webmaster_email =
'xxxx@xxx.com';

# the 'From: ' field in emails
$g_from_email =
'xxxx@xxx.com';

# the return address for bounced mail
$g_return_path_email =
'xxxx@xxx.com';

# allow email notification
# note that if this is disabled, sign-up and password reset messages will
# not be sent.
$g_enable_email_notification = ON;
# select the method to mail by:
# 0 - mail()
# 1 - sendmail
# 2 - SMTP
$g_phpMailer_method = 2;
#smtp发送邮件

# This option allows you to use a remote SMTP host. Must use the phpMailer scrīpt
# Name of smtp host, needed for phpMailer, taken from php.ini
$g_smtp_host = 'mail.xxx.com:25';
#加上端口号25

# These options allow you to use SMTP Authentication when you use a remote
# SMTP host with phpMailer. If smtp_username is not '' then the username
# and password will be used when logging in to the SMTP server.
$g_smtp_username = 'xxxxx';
$g_smtp_password = 'xxxxx';

邮件系统的配置建议用smtp方式。一般公司都有自己的邮件服务器,建议让管理员给你开一个mantis的专用信箱。

 

注意:还需要配置一个地方,在D:/Program Files/xampp/apache/conf目录下在找到httpd.conf,打开后搜索到listen,把Listen 80修改为listen IP:80IP就是你服务器的地址。还要修改D:/Program Files/xampp/php/php.ini,把SMTP = localhost修改为SMTP = IPIP为你服务器IP

这样修改的好处是邮件发送的时候是直接以IP地址发送链接的,而不是以localhost发送的。

 

七、Mantis中上传附件设置

1、 mantis目录下新建一个upload文件夹。

2、 mantis页面新建项目时,配置好附件上传的路径,如图15所示。

15 创建新项目

 

3、 打开config_inc.php文件,搜索到Mantis File Upload Settings。设置如下:

$g_allow_file_upload = ON;

$g_file_upload_method = DISK; #设置为上传到硬盘上。

$g_max_file_size = 5000000; # 5 MB,设置附件的大小限制

$g_allowed_files = 'txt,jpg,jepg,gif,bmp,doc'; #设置允许上传的附件类型

$g_disallowed_files = ' '; #设置不允许上传的附件类型

$g_absolute_path_default_upload_folder = 'D:/Program Files/xampp/mantis/upload'; #设置默认的上传路径

$g_preview_attachments_inline_max_size=99999; #99999数值是与字节计算的,如果上传的任何小于这个字节大小的bmp, png, gif, jpg格式的图片文件直接显示。

 

八、安装及配置JpGraph

1、 最新的JpGraph可以到网站http://www.aditus.nu/jpgraph/jpdownload.php下载。

2、 下载JpGraph后,解压到…/mantis/core/目录下,名称为jpgraph,当前最新版的JpGraph3.0.6已自带有jpgraph_gb2312.php的文件,不需要修改即可显示中文。

3、 但要在Mantisconfig_inc.phpconfig_defaults_inc.php中修改配置内容:

############################
# Mantis JPGRAPH Addon
############################

# --- jpgraph settings --- #
# Initial Version from Duncan Lisset
#
# To use the Jpgraph addon you need the JPGRAPH package from
# http://www.aditus.nu/jpgraph/index.php
# You can place the package whereever you want, but you have
# to set the var in jpgraph.php eg.
# (DEFINE('DIR_BASE','/www/mantisbt/jpgraph/');)

$g_use_jpgraph = ON;
$g_jpgraph_path = 'D:/Program Files/xampp/mantis/core/jpgraph/src/' ;#
注意src后面加/,该目录就是你放jpgraph的目录。

#注意:这里需要指定src/jpgraph.php的路径.页面出错时会有提示的.

# use antialiasing - Enabling anti-aliasing will greatly improve the visual apperance of certain graphs.

# Note: Using anti-aliasing makes line drawing roughly 8 time slower than normal lines

$g_jpgraph_antialias = ON;

# what truetype font will the graphs use. Allowed values are 'arial', 'verdana', 'courier', 'book', 'comic', 'times',
# 'georgia', 'trebuche', 'vera', 'veramono', or 'veraserif'. Refer to the jpgraph manual for details.
# NOTE: these fonts need to be installed in the TTF_DIR as specified to jpgraph
$g_graph_font = 'simsun';

# what width is used to scale the graphs.
$g_graph_window_width = 800;
# bar graph aspect ration (height / width)
$g_graph_bar_aspect = 0.9;

# how many graphs to put in each row in the advanced summary page
$g_graph_summary_graphs_per_row = 2;

$g_system_font_folder = 'c:/winnt/fonts/';

$g_font_per_captcha = 'simsun.ttf';

4、 添加几个BugMantis上面后,再来查看图形报表是否配置成功。

5、 如果配置成功则出现下面页面,点击"统计报表",如图16所示。

16 统计报表

 

九、其他参数说明

$g_show_version      = OFF;      # 不在页面下部显示 Mantis的版本号

$g_default_language     = 'chinese_simplified';    # 默认语言为简体中文

$g_show_project_menu_bar  = ON;          # 显示项目选择栏

$g_show_queries_count    = OFF; # 在页脚不显示执行的查询次数

$g_default_new_account_access_level = DEVELOPER;      # 默认用户级别

$g_window_title     = 'Mantis Bug 跟踪管理系统'; # 浏览器标题

$g_page_title      = 'Mantis Bug 跟踪管理系统'; # 页面标题栏

$g_short_date_format = 'Y-m-d'; # 短日期格式,Y 大写表示 4 位年

$g_normal_date_format = 'Y-m-d H:i'; # 普通日期格式

$g_complete_date_format    = 'Y-m-d H:i:s';         # 完整日期格式

$g_show_realname = ON; #在报告中显示真实姓名

$g_default_home_page = 'view_all_bug_page.php'; #登录后显示的页面设置

$g_show_attachment_indicator = ON; #显示已上传附件指示

$g_show_project_menu_bar = ON; #在菜单栏中显示当前用户的所有项目

 

十、Mantis时间设置

config_inc.phpconfig_defaults_inc.php中添加以下内容:

#时区设置

putenv("TZ=Asia/Shanghai");

 

十一、Mantis中增加Bug状态

Mantis提供的Bug状态为"新建""打回""保留""已确认""已指派""已解决""已关闭"7种,但我们还需要多增加一种"继续跟踪"的状态,显示效果如图17所示。

17 Bug状态

1、打开config_default_inc.php文件,找到$g_status_enum_string字段,增加一个60:keepfollowed,的选项,如图18所示。

18 增加字段

 

2、在D:/Program Files/xampp/mantis/lang目录中打开strings_chinese_simplified_gb2312.txt文件,找到$s_status_enum_string字段,将对应的中文意思添加上去。

19 添加中文意思

 

3、注意:如果还没有创建任何项目,那么该字段就会自动加入了工作流中了,但是如果不是在刚新安装的Mantis中配置的话,需要将该字段添加到工作流中才可以在修改Bug状态时看到该状态字段。

 

4、添加工作流如下:

打开"管理à配置管理à工作流",如图20所示,将"继续跟踪"所有选项勾选上即可。

20 工作流配置

 

5、其它配置可以参考图18、图19进行修改,如:Bug的严重状态我已经修改为了五种。

 

十二、突破xptcp/ip最大连接数

为了突破SP2TCP并发连接数限制,正确地方法是修改Windows XP SP2的系统文件Tcpip.sysTcpip.sysWindows XP SP2重要的系统文件,位于"C:/Windows/system32/drivers目录下。该文件由于平时受到系统保护,所以正常情况下你是无法替换它的,必须在安全模式或纯DOS模式下才能替换,建议你使用以下专门工具、来替换"Tcpip.sys"文件,操作步骤如下:

1、从网上http://www.onlinedown.net/soft/34037.htm下载替换工具(仅为30KB),用它来修改系统文件Tcpip.sys最大安全并发连接限制,然后备份一下C:/Windows/system32/drivers/Tcpip.sys文件。

2、双击打开下载文件ZIP压缩包,运行其中的替换工具EvID4226Patch.exe,随之将弹出一个命令行提示符窗口,首先显示Windows当前的TCPIP.SYS文件版本,以及并发连接的限制数值(默认为10),接着询问你是否将连接数限制在50?如图21所示,你可以选择"Yes/No/Change",如果你输入"Y",则会将并发连接数改为"50"

3、如果想改为其他数(例如150),可以在提示符后输入"c",然后输入最大的并发连接数(例如150)回车,如图22所示。

4、最后在提示符下输入"Y"并回车,如图23所示,这样就替换了TCPIP.SYS文件。

5Tcpip.sys文件被替换后,随之会弹出系统文件保护对话框,你可以点击"取消"按钮,如图24所示。

6、在接下来弹出的对话框点击""按钮,如图25所示,重新启动后,TCPIP.SYS文件的替换就大功告成了!

7、现在你的最大并发连接数已超过10个,达到了150个,因此Windows XP SP2的多线程访问速度得到了提升,当你用FlashGetBT等多线程下载时,就不会感到网络带宽的限制了。

21 显示TCPIP.SYS版本

22 修改最大连接数为150

23 执行修改

24 点击"取消"按钮

25 点击""按钮

 

原创粉丝点击