Mantis是一个开源的php项目,免安装的,这里只需要安装好运行环境和做相应的配置即可使mantis正常工作起来
安装包等文件下载地址:
http://pan.baidu.com/s/1kT6HoZ9
1.Mantis运行环境的安装
Mantis的运行需要apache和Mysql数据库,可以单独下载安装,也可以使用xa
m
pp,这里使用xampp来安装环境
xampp是一个一键安装工具,包含apache、mysql、mail、tomcat等环境,按需安装,直接“下一步”点完即可
我这里安装在自己的C盘根目录下,即安装目录为C:\\xampp
安装过程中apache和mysql是必选的,安装完毕之后,做相关检查
1)apache的检查,启动apache,在浏览器输入localhost,如果呈现xampp的网页内容,即安装成功
2)mysql的检验,启动mysql,启动成功则说明安装成功
安装好之后,打开xampp软件,点击apache和mysql的actions按钮 start 启动服务
2.安装mantis
将下载好的mantis解压缩到xampp的htdocs目录下,并重命名成mantis,去掉版本号简洁一点
3.配置
1)
将mantis添加到apache服务中
找到并编辑xapmm/apache/conf/httpd.conf,
在最下边加入如下配置:
Alias /mantis "C:/xampp/htdocs/mantis/"
<Directory /mantis/>
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
重启apache,在浏览器输入localhost/mantis 可以正常显示mantis的初始系统配置页面,即成功
2)配置mantis显示中文,找到并编辑C:/
xampp/htdocs/mantis/config_inc.php,加入如下配置:
$g_default_language = 'chinese_simplified';
$g_fallback_language = 'chinese_simplified';
3)配置mantis邮件提醒功能,找到并编辑
C:/xampp/htdocs/mantis/config_inc.ph
p,加入如下配置:
$g_enable_email_notification = ON ;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'mail.sina.com';
$g_smtp_username = 'yourname@sina.com';
$g_smtp_password = 'your_passw0rd';
$g_administrator_email = 'yourname@sina.com';
$g_webmaster_email = 'yourname@sina.com';
$g_from_name = 'Mantis Bug Tracker';
$g_from_email = 'yourname@sina.com';
$g_return_path_email = 'yourname@sina.com';
$g_email_receive_own = OFF;
$g_email_send_using_cronjob = OFF;
$g_use_phpMailer = ON;
$g_phpMailer_path = 'c:/phpmailer/';
注意,这里使用了phpmailer,需要下载phpmailer,除了上边提供的下载地址外,最新地址:https://github.com/Synchro/PHPMailer/tree/phpmailer-5.2.0
另外需要注意的,我们本地测试服务器名称都是用localhost,但是部署到局域网上localhost是不能用的,那么这里需要改成ip:port的形式
1)xampp\apache\conf目录下在找到httpd.conf,打开后搜索到listen,把Listen 80修改为listen IP:80,IP就是你服务器的地址
2)【可选】修改php.ini,把SMTP = localhost修改为SMTP = IP,IP为你服务器IP。