美文网首页
CentOS7下Mantis安装与配置

CentOS7下Mantis安装与配置

作者: wangpf2011 | 来源:发表于2018-12-27 20:01 被阅读14次

    Mantis是一个基于PHP技术的轻量级的开源缺陷跟踪系统,以Web操作的形式提供项目管理及缺陷跟踪服务。由于其安装简单、使用方面,备受广大开发和测试人员青睐。下面主要讲解下Mantis再CentOS7上的安装配置过程。

    一、安装apache

    安装apache httpd:

    yum install httpd -y  //安装httpd

    systemctl start httpd  //启动httpd

    systemctl enable httpd  //配置自启动

    httpd默认是80端口,如果服务器80端口被占用,可以通过修改/etc/httpd/conf/httpd.conf文件改变httpd的端口。

    vim /etc/httpd/conf/httpd.conf  -->  Listen 9900

    二、安装php

    首先检查服务器环境是否安装php,Mantis要求php版本大于5.5,演示环境php选择7.1版本。

    1、准备工作

    安装EPEL repo,否则会在执行第二步时报出异常error: Failed dependencies:epel-release >= 7 is needed by webtatic-release-7-3.noarch。

    yum -y install epel-release

    2、默认情况下,PHP 7在CentOS存储库中不可用,需要首先安装Webtatic存储库。

    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

    3、安装php7.1

    yum install php71w php71w-cli php71w-mysqli php71w-mbstring -y

    三、下载并解压Mantis

    wget https://excellmedia.dl.sourceforge.net/project/mantisbt/mantis-stable/2.4.0/mantisbt-2.4.0.zip

    unzip mantisbt-2.4.0.zip

    mv mantisbt-2.4.0 /var/www/html/mantis

    systemctl restart httpd  //重启httpd

    执行完上述命令,重启httpd,然后在浏览器中访问http://xx.xx.xx.xx:9900/mantis,会出现如下界面,填写数据库相关信息(Hostname、Username、Password、Database name),点击【Install/Upgrade Database】初始化数据库。

    四、配置Mantis

    数据库初始化完毕后,需要根据之前数据库相关信息配置mantis的数据库。

    cd /var/www/html/mantis/config

    rm -rf  config_inc.php

    cp config_inc.php.sample config_inc.php

    vim config_inc.php

    详细配置信息如下:

    相关文章

      网友评论

          本文标题:CentOS7下Mantis安装与配置

          本文链接:https://www.haomeiwen.com/subject/kuvdlqtx.html