Linux29--测试环境搭建-Mantis
Mantis缺陷跟踪系统服务器搭建
Mantis缺陷跟踪系统介绍
Mantis是一个B/S结构,基于PHP研发的开源缺陷跟踪系统,以Web操作的形式提供项目管理及缺陷跟踪服务,主要特点有:开源免费、易于安装、易于操作支持任何平台
下载Mantis软件包
https://www.mantisbt.org

下载XAMPP软件包
https://www.apachefriends.org/index.html

安装lrzsz工具
yum -u install lrzsz

上传mantisbt-2.25.1.tar.gz到/opt目录中
cd /opt
rz
mantisbt-2.25.1.tar.gz

上传xampp到/opt目录中
rz
xampp-linux-x64-7.4.19-0-installer.run

验证软件包是否上传成功
ls

对xampp软件包增加执行权限
chmod u+x xampp-linux-x64-7.4.19-0-installer.run
ls -l

执行xampp软件包
./xampp-linux-x64-7.4.19-0-installer.run


查看xampp服务状态 停止 启动 重启
/opt/lampp/lampp status 查看状态
/opt/lampp/lampp restart 重启
/opt/lampp/lampp stop 停止
/opt/lampp/lampp start 启动

修改配置文件(端口占用可操作)
vi /opt/lampp/etc/httpd.conf
搜索 "Listen 80" 并将其更改为其他端口(例如,Listen 8888 --- 大概是第40行)

vi /opt/lampp/etc/extra/httpd-ssl.conf
搜索 "Listen 443" 并将其改为其他端口(例如,Listen 8443 --- 大概是第39行)

vi /opt/lampp/lampp
搜索端口 "testport 80" 改为"testport 8888",在搜索端口"testport 443"改为"testport 8443" --- 大概在197和214行)
vi /opt/lampp/etc/extra/httpd-xampp.conf --远程访问设置
搜索 "Require local" 注释掉,在其下面添加一行 Require all granted ,保存退出,重启服务即可
重启xampp(端口占用可操作)
/opt/lampp/lampp restart

验证配置文件是否修改成功(端口占用可操作)
netstat -anp | grep 8888
netstat -anp | grep 8443

解压mantisbt-2.25.1.tar.gz
cd /opt
tar -xvf mantisbt-2.25.1.tar.gz

移动mantisbt-2.25.1目录到htdocs目录中并重命名为mantisbt
cd /opt
ls
mv mantisbt-2.25.1 /opt/lampp/htdocs/mantisbt
cd /opt/lampp/htdocs
ls

重启xampp
/opt/lampp/lampp restart

查看防火墙状态
systemctl status firewalld

查看防火墙配置文件
cat /etc/firewalld/zones/public.xml

添加配置数据到防火墙配置文件中
firewall-cmd --zone=public --add-port=8888/tcp --permanent
注意端口号为设置后的,如果未进行设置请使用默认端口号80

重新加载防火墙数据
firewall-cmd --reload

浏览器通过固定格式访问mantisbt
http://服务器IP地址:端口号/mantisbt
ifconfig
http://172.166.0.151/mantisbt
如果出现Access forbidden! You don’t have permission to access the requested object. It is either read-protected or not readable by the server
使用此命令进行更改
chmod 755 /opt/lampp/htdocs/mantisbt
单击Install/Upgrade Database
提示信息
Please add the following lines to '/opt/lampp/htdocs/mantisbt/config/config_inc.php' before continuing:
<?php
$g_hostname = 'localhost';
$g_db_type = 'mysqli';
$g_database_name = 'bugtracker';
$g_db_username = 'root';
$g_db_password = '';
$g_default_timezone = 'Europe/Berlin';
$g_crypto_master_salt = 'W7zWYUaUpo2GSBbPK4yV+Uukz6uF6ff/ekiA0tWonrw=';
进入/opt/lampp/htdocs/mantisbt/config目录
cd /opt/lampp/htdocs/mantisbt/config
ls

复制config_inc.php.sample文件
cp config_inc.php.sample config_inc.php
ls

编辑config_inc.php文件
vi config_inc.php

编辑config_inc.php文件
$g_db_username = 'root';
$g_crypto_master_salt ='W7zWYUaUpo2GSBbPK4yV+Uukz6uF6ff/ekiA0tWonrw=';
浏览器通过固定格式访问mantisbt
http://IP:端口号/mantisbt
用户为:administrator
密码为:root
本文来自博客园,作者:暄总-tester,转载请注明原文链接:https://www.cnblogs.com/sean-test/p/15472337.html

浙公网安备 33010602011771号