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;

Mysql8授权如下:

create user 'mantis'@'%' IDENTIFIED BY 'Midd@2024';

grant all privileges on *.* to 'root'@'%' WITH GRANT OPTION;

FLUSH PRIVILEGES;


3 安装php5.6或php7

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

安装php7

yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum-config-manager --enable remi-php74

yum install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mycypt php-mbstring php-curl php-xml php-pear php-bcmath php-json php-redis

4 安装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开机启动

5 安装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

6 初始化配置

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

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

默认mantis不能手动修改密码,需要手动修改配置文件:var/www/html/mantis的config_defaults_inc.php

找到 $g_send_reset_password

修改前:$g_send_reset_password = ON;

修改后:  $g_send_reset_password = OFF;

$g_hostname = '47.92.242.4:13306';     # 设置对应的ip地址,如果数据库端口改了,加上端口

config_defaults_inc.php 里其他配置信息根据实际进行修改


默认管理员:administrator 密码root

如果服务器是阿里云,要开放服务器对应的端口

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容