CentOS7下部署Mantis

1 删除系统老包 

rpm -qa | grep -e php -e mysql   -- 查找原来系统上的php和mysql,再都删除:rpm -e xxxx.rpm

2 安装数据库mariadb

设置密码,确保root能登录成功,创建数据库maridb

yum -y install mariadb*

systemctl start mariadb

mysql_secure_installation

create database mantisdb default character set utf8 collate utf8_general_ci;

grant all privileges on mantisdb.* to 'mantis'@'%' identified by 'mantis';

grant all privileges on mantisdb.* to 'root'@'%' identified by 'root' with grant option;

FLUSH PRIVILEGES;

3 安装php5.6

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

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

yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel  php56w-intl php56w-mbstring php56w-mysql

安装apache服务

(1)更新文件  #yum -y update

(2)安装apache  #yum install httpd

(3)修改配置信息  #vi /etc/httpd/conf/httpd.conf

(1)把里面的 AllowOverride None 全部修改为 AllowOverride All

(2)顺便在 DirectoryIndex index.html 后面加上 index.htm index.php index.shtm

(3)直接修改/etc/httpd/conf/httpd.conf中修改DocumentRoot和Directory处的路径为/var/www/html

(4)重启apache服务   #systemctl restart httpd.service #重启apache

(5)让配置立即生效    setenforce 0 #使配置立即生效

(6)根据需要开启或关闭防火墙

systemctl stop firewalld.service //关闭firewall

systemctl start firewalld.service //开启firewall

systemctl disable firewalld.service //禁止firewall开机启动

4 安装Mantis

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

2、解压并移动:

unzip mantisbt-2.4.0.zip

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

chmod -R 777 /var/www/

重启httpd   #systemctl restart httpd.service

setenforce 0

5 初始化配置

浏览:http://your ip:port/mantis  (http://172.17.x.x/mantis/login_page.php)  会进入配置页,根据实际情况配置


说明:并不需要使用Mantis,闲来想这个项目来练手研究接口自动化测试,发现就部署Mantis挺合适

你可能感兴趣的:(CentOS7下部署Mantis)