Mantis安装与常用设置

Mantis安装与常用设置  

2013-12-19 15:25:17|  分类:          

一、准备:
  1. 安装环境:win7 64bit;
  2. 适用于windows的xampp:http://www.apachefriends.org/zh_cn/xampp-windows.html
  3. MantisBT 1.2.15:http://www.aditus.nu/jpgraph/jpdownload.php
  4. jpgraph-3.5.0(图形插件):http://jpgraph.net/download/;(适用于当前使用的php版本)

二、安装Mantis:

  1. 安装xampp,安装路径为D:\xampp;(主要安装mysql、Apache和PHP)
  2. 为mysql设置密码;
  3. 启动Mysql和Apache;

u  如果Apache不能正常启动,一般是80或443端口被占用,可通过netstat -ano 命令查看;

u  如果80端口被占用,修改D:\xampp\apache\conf目录下的httpd.conf文件,找到以下内容:

Listen 80

ServerName localhost:80

将80改成其它未使用的端口号;

u  如果是443端口被占用,修改D:\xampp\apache\conf\extra目录下的httpd-ssl.conf文件,找到Listen  446,将446修改为其它端口号。

  1. 解压MantisBT 1.2.15,并将文件夹改名为mantis,拷贝到D:\xampp\htdocs 目录下;
  2. 打开浏览器,输入地址http://localhost:[端口]/mantis,进入mantis安装界面,按提示安装;安装完成后使用默认用户名(administrator)和密码(root)登录。

三、常用设置:

  1. 局域网内访问Mantis:

在D:\xampp\apache\conf目录下的httpd.conf中修改IP设置,找到Listen 127.0.0.1:80修改为Listen [本机IP]:80(端口80根据实际调整)。

  1. 修改默认语言为简体中文:

打开mantis目录下的config_defaults_inc.php文件,找到 $g_default_language =  ‘english’;修改为’chinese_simplified’

  1. 默认时区设置:

 

修改mantis目录下的config_defaults_inc.php文件,找到$g_default_timezone = ' '; 修改为$g_default_timezone = 'Asia/Shanghai';

四、图形插件安装:

  1. 安装jpgraph:解压已下载的jpgraph-3.5.0压缩文件,复制其子目录src至mantis\library目录下,改名为jpgraph;
  2. 修改文件mantis\library\jpgraph\jpgraph_ttf.inc.php

找到:

elseif( $aFF === FF_SIMSUN ) {

            // Do Chinese conversion

            if( $this->g2312 == null ) {

                include_once 'jpgraph_gb2312.php' ;

                $this->g2312 = new GB2312toUTF8();

            }

            return $this->g2312->gb2utf8($aTxt);

        }

修改为:

elseif( $aFF === FF_SIMSUN ) {

            // Do Chinese conversion

        return $aTxt;

        }

  1. 安装MantisGraph插件:登录mantis——管理——插件管理,安装MantisGraph插件;

4.         修改文件mantis\plugins\MantisGraph\pages\config.php:(以utf-8格式保存,否则添加的中文显示不出来)

$t_current_font_selected = array(

'simsun' => false,   //增加

   'arial' => false,

//----------------------------------------------------------------------------------

Sans-serif:<br />

<label><input type="radio" name="font" value="simsun"<?php echo print_font_checked( 'simsun' )?>/>宋体</label><br />  //增加

<label><input type="radio" name="font" value="arial"<?php echo print_font_checked( 'arial' )?>/>Arial</label><br />

//----------------------------------------------------------------------------------

5.         修改文件mantis\plugins\MantisGraph\pages\config_edit.php

if ( plugin_config_get( 'font' ) != $f_font ) {

   switch ( $f_font ) {

            case 'simsun':  //增加

            case 'arial':

//----------------------------------------------------------------------------------

6.         修改文件mantis\plugins\MantisGraph\core\graph_api.php

$t_font_map = array(

            'simsun' => 'simsun.ttf',   //增加

            'arial' => 'arial.ttf',

//----------------------------------------------------------------------------------

         $t_font_map = array(

                     'simsun' => FF_SIMSUN,  //增加

                     'arial' => FF_ARIAL,

//----------------------------------------------------------------------------------

7.         修改mantis\config_defaults_inc.php文件:(以下内容在配置文件中未找到,自行添加的)

/*****************************

    * Mantis JPGRAPH Addon *

    *****************************/

   /** jpgraph settings */

   $g_use_jpgraph = ON;

   $g_jpgraph_path='D:/xampp/htdocs/mantis/library/jpgraph/';

   $g_jpgraph_antialias = ON;

   $g_graph_font='simsun';

   $g_graph_window_width=800;

   $g_graph_bar_aspect=0.9;

   $g_graph_summary_graphs_per_row=2;

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

   $g_font_per_captcha='simsun.ttf';

8.         设置并启用Jpgraph:

u  登录mantis——管理——插件管理——点击“Mantis图形1.0”进入设置界面;

u  要使用的图形库:JpGraph:字体:宋体;

u  点击“更改配置”即可。

 

posted @ 2017-06-01 10:38  sky20080101  阅读(595)  评论(1)    收藏  举报