Unlimited Blade Works

Unaware of loss.Nor aware of gain.

导航

【图文】Mantis Bug Tracker 安装、配置说明

Mantis官方网站:http://www.mantisbt.org/

参考文档:《Mantis安装配置手册(For_Mantis_Bug_Tracking_1.1.8).pdf》 Edited by KongLingfeng

一、安装配置

1.所需软件环境

官网的要求

Software (for MantisBT 1.1.x)

  • PHP 4.3.0 and higher
  • MySQL database 4.1.1 and higher (MS SQL and DB2 are also supported).
  • Web server (Apache, IIS, etc.)

Software (for MantisBT 1.2.x)

  • PHP 5.2.0 and higher
  • MySQL database 4.1.1 and higher (MS SQL, DB2, and PostgreSQL are also supported).
  • Web server (Apache, IIS, etc.)

我安装的环境是

Ubuntu10.04 + Apache2.2.14 + MySQL5.1.41-3ubuntu12.7+ PHP5.3.2-1ubuntu4.5

公司的环境:

Apache2.2.10(Unix) + MySQL5.0.67 Sourcedistribution + PHP5.2.6

安装的版本是MantisBT1.2.3。

mantisbt-1.2.3.tar.gz可在官网下载。http://www.mantisbt.org/download.php

2.安装过程

环境搭建这里不在叙述。

在mysql里新建一个mantis数据库,新建一个账户mantis用来管理该数据库。

登录进mysql后

mysql> create database mantis defaultcharacter set utf8 collate utf8_general_ci;
mysql> grant all privileges on mantis.*to 'mantis'@'localhost' identified by '密码';

将mantisbt-1.2.3.tar.gz解压,放到网站目录下

此处网站目录/usr/local/apache/htdocs/

修改Apache配置文件httpd.conf

增加

Alias /mantisbt "/usr/local/apache/htdocs/mantisbt1.2.3/"
<Directory "/usr/local/apache/htdocs/mantisbt1.2.3/">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

修改后重启Apache服务

$ apachectl -k restart

在浏览器中输入网址,http://机器IP/mantisbt/admin/install.php

看到以下界面,如果提示权限不足,可以查看看一下文件夹的权限

 

说明:
Type of Database:   默认数据库是MySQL
Hostname (for Database Server):   MySQL装在本机,可以默认
Username (for Database),
Password (for Database)         : 数据库的用户名及密码(刚才创建的用户名和密码)
Database name (for Database)       刚才创建的数据库名mantis
Admin Username (to create Database ifrequired),
Admin Password (to create Database ifrequired):         数据库管理员用户名及密码
Print SQL Queries instead of Writing to theDatabase    选上此项,输出SQL但不写到数据库,因为输出的SQL语句中要修改

点击install/Upgrade Database

将Installing Database部分拷出来
删掉Database Creation Suppressed, SQL Queries follow
删掉SYSTEM WARNING: Invalid argument supplied for foreach()
修改language       VARCHAR(32) NOT NULL DEFAULT 'english',
为   language      VARCHAR(32) NOT NULL DEFAULT 'chinese_simplified',

保存为mantis_init_db.sql

以mantis用户登录mysql

mysql> use mantis
mysql> source /home/XXX/mantis_init_db.sql

完成数据库的建立

此时再次按照刚才的方式填写,执行install/Upgrade Database(可以不执行,仅是检查数据库建立是否正确)

最后显示

表示建立成功,下面建立配置文件。

二、配置

在mantis目录下新建配置文件config_inc.php

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

此处只是简单写了下配置文件,各参数含义以及详细配置可以参看config_defaults_inc.php,如果要修改,建议拷到config_inc.php中修改。

$ cp config_inc.php.simple config_inc.php

然后修改

# --- Database Configuration ---
$g_hostname      = 'localhost';
$g_db_username   = 'mantis';
$g_db_password   = '密码';
$g_database_name= 'mantis';
$g_db_type       = 'mysql';
 
# ---Email Configuration ---
$g_phpMailer_method           =PHPMAILER_METHOD_SMTP;
$g_smtp_host                            ='mail.xxx.com.cn:25';  
$g_smtp_username                 ='xxx@xxxx.com.cn';                                 
$g_smtp_password                 ='密码'; 
$g_administrator_email = ' xxx@xxxx.com.cn ';
$g_webmaster_email     = ' xxx@xxxx.com.cn ';
$g_from_name                    = 'Mantis Bug Tracker';
$g_from_email          = ' xxx@xxxx.com.cn ';        #the "From: " field in emails
$g_return_path_email   = ' xxx@xxxx.com.cn';  # thereturn address for bounced mail
$g_email_receive_own    = OFF;
$g_email_send_using_cronjob= OFF;
$g_enable_email_notification= ON;

增加一句设置语言为中文

$g_default_language= 'chinese_simplified';

浏览器中输入http://机器IP/mantisbt/

自动会跳转到登录页面

默认的用户名是administrator,密码是root

然后可以修改管理员密码,并将mantisbt下的admin目录移除。

安装完成

注册一个新用户

如果之前配置Email部分正确,

管理员会收到通知邮件

注册者会收到确认邮件

 

点击链接,完成注册

 

 最后新用户登录进入

 

 至此安装完成。

posted on 2010-12-01 15:41  飞鸿无月  阅读(12681)  评论(4编辑  收藏  举报