BUG管理工具——Mantis安装配置

配置环境: CentOS6.5(所有操作在root用户下面操作)

1. 关闭防火墙, service iptables stop(防止防火墙捣乱,或者还得手动添加端口号的麻烦)

2. Disable SELinux:  

# vi /etc/sysconfig/selinux

change the enforcing status to disables, as below:

SELINUX=disabled

保存然后退出

 

3. 通过yum来安装必要的安装包(包括php,mysql,Apache

# yum install httpd php php-pdo php-mysql php-gd php-mbstring mysql mysql-server

 

4. 提前设置好时区(防止以后在访问页面的时候提醒用户时区问题,默认情况下时区是UTC,当检查到系统时区和页面不再同一个时区时就会有warning

# vi /etc/php.ini  

vi的情况下从上往下: 在查看的模式下,直接输入"/"+ "查询字段" 从下往上: 在查看模式下,直接输入"?" + "查询字段")

date.timezone = Asia/Shanghai

保存退出

 

5. 开启数据库

# service mysqld start

# mysql -uroot -p (进入数据库)

默认情况下,MySQL root用户的初始密码为空,不需要输入直接进入就OK,然后现在可一给root设置一个密码:

#mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpasswd');

创建一个数据库,Mantis的默认数据库名是"bugtracker",我们可以直接先在mysql中创建,然后分配相对应的权限(user指的是登陆mysql的用户名,password指的是该用户名的密码)

> create database DBName;
> GRANT ALL ON DBName.* to user@localhost IDENTIFIED BY 'password';
> flush privileges;
> quit

 

6. 下载最新的Mantis的安装包,http://www.mantisbt.org/download.php

可以通过ftp工具将安装包上传到CentOS系统中去,或者直接通过

#wget http://124.202.164.5/files/21390000060570D2/downloads.sourceforge.net/project/mantisbt/mantis-stable/1.2.19/mantisbt-1.2.19.zip

解压下载好的安装包,

unzip -o mantisbt-1.2.19.zip

然后将下载好的Mantis安装包移动 /var/www/html/mantis

#mv  mantisbt-1.2.19  /var/www/html/mantis

 

7. 改变mantis文件夹用户的权限:

1. # chown -R apache.root mantis

2. # chown -R apache:apache mantis

3. # setenforce 0

(不加2,3这两项可能在访问页面的时候出现403无权限访问的错误)

 

 

8. Enable index.phpApache

# vim /etc/httpd/conf/httpd.conf

添加: DirectoryIndex index.php index.html

保存退出

 

9. 启动Apache

#service httpd start

 

10. 接下来你可以通过浏览器访问Mantis页面http://ip-address/mantis

如果报错可以直接访问http://ip-address,看是否出现Apache的测试界面来检查是否是Apache出现问题

 

11. sample file替换config_inc.php(可以参考下面的配置文件解释)

# cd /var/www/html/mantisbt

# mv config_inc.php config_inc.php.bak

# mv config_inc.php.sample config_inc.php

记得更新数据库的链接信息

然后重启httpd#service httpd restart

 

 

更改Mantis到中文版本(默认情况是英文版):

 /var/www/html/mantis 目录下面更改

# vi config_defaults_inc.php 

$g_default_language             = 'chinese_simplified';

 

配置文件解释:

Mantis的设置是这样保存的:在 config_defaults_inc.php中保存Mantis的默认设置,用户自己的设置信息保存在config_inc.php中。如果某个选项在config_inc.php中有设置,则系统使用

config_inc.php
中的设置,否则使用config_defaults_inc.php的系统默认设置;config_inc.php.sample则是Mantis给出的一个用户设置文件例子。
      
我们需要修改 config_inc.php文件中的设置,设置很简单,各个参数的意义可以参见config_defaults_inc.php,这里对每个参数都有详细的解释;Sample中给出的一些设置是一定需要修改的,比如MySQL数据库的连接参数,管理员的邮箱的;其他的要根据你的实际情况进行修改。

原文地址:https://www.cnblogs.com/taoSir/p/4816339.html