Mantis是一个基于PHP技术的轻量级的开源bug跟踪系统,以Web操作的形式提供项目管理及缺陷跟踪服务
在ubuntu下安装步骤:
一.先安装lamp
sudo apt-get install apache2 libapache2-mod-php5
sudo apt-get install mysql-server
sudo apt-get install php5-mysql php5 php5-gd php5-mdb2-driver-mysql
修改配置
1.apache2
在/etc/apache2/httpd.conf中添加
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
2.php5
在/etc/php5/apache2/php.ini中添加
extension=mysql.so
extension=gd.so
然后配置apache端口未8001
sudo /ect/init.d/apache2 restart
测试apache 访问 IP:PORT/index.html(192.168.1.104:8001/index.html)
测试php
cd /var/www
sudo vim a.php
输入<?php phpinfo(); ?>
然后访问192.168.1.104:8001/1.php
lamp 安装完毕
二。安装mantis
1.下载mantis
将压缩包解压至/var/www,并将文件夹改名为mantis,然后修改权限
sudo chmod 777 -R mantis
2.建立mysql数据库
mysql -u root -p,进入mysql提示符
mysql> create database bugtracker;
mysql> grant all privileges on bugtracker.* to root@localhost identified by 'password';
mysql> flush privileges;
mysql> \q
3.创建mantis配置文件
sudo cp /var/www/mantis/config_inc.php.sample /var/www/mantis/config_inc.php
编辑这个文件
添加 $g_default_language = 'chinese_simplified';
4.创建数据库
mysql -uroot -p bugtracker < /var/www/mantis/library/adodb/session/adodb-sessions.mysql.sql
5.重启apaches服务,访问http://IP/mantis/install.php并根据提示安装。
6.访问http://IP/mantis,用默认的管理员账号密码登陆
user :administrator
pass:root
7.邮箱设置
由于各种操作都需要邮件通知,所以需要配置一下发邮件
sudo apt-get install sendmail ,安装一个邮件代理
编辑/var/www/mantis/config_inc.php
修改加入如下:
$g_hostname = '192.168.1.104';
$g_db_username = 'root';
$g_db_password = '数据库密码';
$g_database_name = 'bugtracker';
$g_db_type = 'mysql';
# --- Anonymous Access / Signup ---
$g_allow_signup = ON;
$g_allow_anonymous_login = OFF;
$g_anonymous_account = '';
# --- Email Configuration ---
$g_phpMailer_method = PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_user_phpMailer =ON;
$g_phpMailer_method =2;
$g_enable_email_notification = ON;
$g_smtp_host = 'smtp.exmail.qq.com'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_username = 'shengxj@smvp.cn'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_password = '邮箱的密码'; # used with PHPMAILER_METHOD_SMTP
$g_administrator_email = 'shengxj@smvp.cn';
$g_webmaster_email = 'shengxj@smvp.cn';
$g_from_email = 'noreply@smvp.cn'; # the "From: " field in emails
$g_return_path_email = 'shengxj@smvp.cn'; # the return address for bounced mail
$g_phpMailer_path = '/var/www/mantis/library/phpmailer/';
$g_from_name = 'smvp bug tracker';
$g_default_language = 'chinese_simplified';
安装完毕~~~~~~