官方下载地址:http://www.mantisbt.org/
mantis(螳螂)是一个基于php/MySQL/web的缺陷跟踪系统
首先,mantis 需要LAMP环境,步骤略。
将mantis解压到/usr/local/apache/htdocs目录下。
生成:mantis配置文件:
[root@www src]# tar xzvf mantisbt-1.2.3.tar.gz -C /usr/local/apache/htdocs/
[root@www src]# cd /usr/local/apache/htdocs/mantis
[root@www src]# cp config_inc.php.sample config_inc.php
3.配置mantis文件
[root@www src]# vi config_inc.php
$g_hostname = "localhost";
$g_db_username = "root";
$g_db_password = "123456";
$g_database_name = "bugtracker";
$g_db_type = "mysql";
:wq
建立Mysql 数据库
/usr/local/mysql/bin/mysql -u root -p
mysql> create datebase bugtracker ;
mysql> grant all privileges on *.* to root@localhost identified by 'Ajz123*()';
mysql>flush privileges;
mysql>quit
[root@www mantisbt]# /usr/local/mysql/bin/mysql -uroot -p bugtracker < /usr/local/apache/htdocs/mantisbt/library/adodb/session/adodb-sessions.mysql.sql
这需要倒数据库,用命令行不行的话,就是网页形式的。 在/adimin/install.php 这个文件就是安装文件,安装完成后把这个文件删除掉。
[root@www mantisbt]# /usr/local/apache/bin/apachectl -k restart #重新启动Apache
访问Http://localhost/mantis/admin/install.php进行安装,,一直next,next. 注意,有个多选框,不要钩选。
重新打开浏览器:http://localhost/mantis
使用默认的管理员帐号、密码:
user: administrator
passwd: root
汉化方法:
在mantis目录下找到config_defaults_inc.php
里面有一项是 $g_default_language = 'english';
将english修改成 $g_default_language = 'chinese_simplified';
保存文件。
4.设置使用PHPMailer发送邮件
在config_inc.php文件中添加
$g_phpMailer_method = 2; # PHPMailer 以 SMTP 方式发送 Email
$g_smtp_host = 'mail.XXX.com'; # SMTP 服务器
$g_smtp_username = 'zhangsan@XXX.com'; # 邮箱登录用户名
$g_smtp_password = 'zhangsanpasswd'; # 邮箱登录密码
$g_administrator_email = 'zhangsan@xxx.com';
$g_webmaster_email = 'zhangsan@xxx.com';
$g_from_name = 'xxx.com';
$g_from_email = 'zhangsan@xxx.com';
$g_return_path_email = 'zhangsan@xxx.com';
$g_email_receive_own = OFF;
$g_email_send_using_cronjob = OFF;
$g_hostname = 'localhost';
$g_db_username = 'root';
$g_db_password = '';
$g_database_name = 'bugtracker';
$g_db_type = 'mysql';
$g_allow_signup = ON;
$g_allow_anonymous_login = OFF;
$g_anonymous_account = '';
# --- Email Configuration ---
$g_phpMailer_method = PHPMAILER_METHOD_SMTP; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host = '192.168.1.4'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_username = '***@***.com'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_password = '******'; # used with PHPMAILER_METHOD_SMTP
#$g_use_phpMailer = ON;
#$g_phpMailer_path = '/usr/local/phpmailer/';
#$g_phpMailer_method = 2;
$g_default_language = 'chinese_simplified';
$g_webmaster_email = '***@***.com';
$g_from_name = 'Mantis Bug Tracker';
$g_from_email = '***@***'; # the "From: " field in emails
$g_return_path_email = '***@***'; # the return address for bounced mail
$g_email_receive_own = OFF;
$g_email_send_using_cronjob = OFF;