Debian下mysql5+php5+apache2+mantis服务器升级

 

Debian下mysql5+php5+apache2+mantis服务器升级
Ø         安装所需软件:apt-get install xxx
mysql
libdbd-mysql-perl                               install
libmysqlclient15off                             install
mysql-client-5.0                                install
mysql-common                                    install
mysql-server-5.0                                install
php5-mysql                                      install
 
php
php5                                            install
php5-common                                     install
php5-mysql                                      install
phpmyadmin                                      install
 
apache2
apache2                                         install
apache2-mpm-prefork                             install
apache2-utils                                   install
apache2.2-common                                install
libapache2-mod-php5                             install
 
Ø         到如下地址下载最新版MANTIS
tar -xzf mantis-1.1.2.tar.gz    将文件解压到/var/www/
 
Ø         配置Mysql ,
/etc/mysql# vi my.cf
 
[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
default-character-set=utf8 #neo    解决中文显示问题
 
#
# * Basic Settings
#
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-external-locking
character-set-server=utf8 #neo        解决中文显示问题
collation-server=utf8_general_ci #neo 解决中文显示问题
 
Ø         创建Mantis数据库
/var/lib/mysql# mysql -u root
Mysql > create database bugtracker;
Mysql >exit
 
Ø         原Mantis服务器mysql数据导出:(mantis-0.91)
Mantis old#   旧的服务器
/var/lib/mysql# mysqldump -u root -x --databases bugtracker > xxxxx.sql
/var/lib/mysql# scp –r xxx.sql root@new_mantis_IPaddress:/var/lib/mysql/   将备份好的数据考进新的服务器
 
Ø         将备份好的数据导入新的数据库;
Mantis new#
/var/lib/mysql# mysql –u root < xxxx.sql
 
Ø         安装Mantis
http://server-ip/mantis/index.php
运行其中的
upgrade your installation
再运行
upgrade now
再运行
basic upgrade set(required)
再运行
Execute All
 
Ø         配置mantis邮件
# --- database variables ---------
 
        # set these values to match your setup
        $g_hostname      = "localhost";
        $g_db_username   = "root";
        $g_db_password   = "";
        $g_database_name = "bugtracker";
        $g_db_type       = "mysql";
 
        # --- email variables -------------
        $g_administrator_email = '[email protected]';
        $g_webmaster_email      = '[email protected]';
 
        # the "From: " field in emails
        $g_from_email           = '[email protected]';
 
        # the return address for bounced mail
        $g_return_path_email    = '[email protected]';
 
        # --- file upload settings --------
        # This is the master setting to disable *all* file uploading functionality
        #
        # The default value is ON but you must make sure file uploading is enabled
        # in PHP as well. You may need to add "file_uploads = TRUE" to your php.ini.
        $g_allow_file_upload    = ON;
        $g_file_upload_method   = DISK;   #附件存放到硬盘
?>
 
Ø         配置Mantis 附件存放位置
在config_inc.php中添加
 $g_allow_file_upload=ON;
 $g_file_upload_method=
DISK;
 
并且在mantis下面新建一个upload目录
Mantis new# cd /var/www/mantis
Mantis new# mkdir upload
Mantis new# chomd –R 775 upload/
Mantis new# chown –R www-data.www-data upload
当你以管理员身份登录,新建项目时,在上传文件路径那一项填上upload路径即可,如果要为每一个项目指定不同的目录,可以先在upload下建一个projectname,在上传文件路径那一项填上upload\projectname
 注意最好不要用中文目录名,目录名中间也不要带空格.
Ø         附件浏览功能
修改config_defaults_inc.php这个文件的如下地方:
############################
        # Bug Attachments Settings
        ############################
 
        # Specifies the maximum size below which an attachment is previewed in the bug
        # view pages. To disable this feature, set max size to 0.
        # This feature applies to: bmp, png, gif, jpg
        $g_preview_attachments_inline_max_size = 20000000;
 
Mantis服务器升级完成
 
mantis中增加参数值的方法

比如:问题状态增加一个,< VERIFIED>
mantis根目录下创建一个custom_contant_inc.php文件,在里面加上如下语句;
manits:/var/www/mantis# vi custom_constant_inc.php
<?php
define ( 'VERIFIED', 60 );
?>
 
mantis根目录下创建custom_strings_inc.php文件,里面添加以下语句;
manits:/var/www/mantis# cat custom_strings_inc.php
<?php
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:to_be_verified,80:resolved,90:closed';
$s_to_be_verified_bug_button = "Change Issue";
$s_to_be_verified_bug_title = "Change Issue";
$s_email_notification_title_for_status_bug_to_be_verified ="The following issue is ready TO_BE_VERIFIED";
?>
 
修改你的config_inc.php, 用于适配自定义状态,添加以下语句,为了防止混乱,可添加至文件最后
manits:/var/www/mantis# vi config_inc.php
# new to be verified
        $g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:to_be_verified,80:resolved,90:closed';
        # Status color additions
        $g_status_colors['to_be_verified'] = '#ACE7AE';
 
        $g_status_enum_workflow[NEW_] = '20:feedback,30:acknowledged,40:confirmed,50:assigned,60:to_be_verified,80:resolved';
        $g_status_enum_workflow[FEEDBACK] = '10:new,30:acknowledged,40:confirmed,50:assigned,60:to_be_verified,80:resolved';
        $g_status_enum_workflow[ACKNOWLEDGED] = '20:feedback,40:confirmed,50:assigned,60:to_be_verified,80:resolved';
        $g_status_enum_workflow[CONFIRMED] = '20:feedback,50:assigned,60:to_be_verified,80:resolved';
        $g_status_enum_workflow[ASSIGNED] = '20:feedback,60:to_be_verified,80:resolved,90:closed';
        $g_status_enum_workflow[VERIFIED] = '10:new,20:feedback,50:assigned,80:resolved,90:closed';
        $g_status_enum_workflow[RESOLVED] = '50:assigned,90:closed';
        $g_status_enum_workflow[CLOSED] = '50:assigned';
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章