CentOS 6.6 MantisBT安装与配置指南

准备工作
- 确保服务器操作系统为CentOS 6.6
- 确保已安装Apache、MySQL和PHP
- 准备好MantisBT安装包
安装MantisBT
创建MantisBT安装目录
mkdir /var/www/mantisbt
解压MantisBT安装包
tar -zxvf mantisbt-1.2.17.tar.gz -C /var/www/mantisbt
配置数据库
进入MantisBT安装目录,编辑config/config.php文件,设置数据库连接信息:vi config/config.php
找到以下代码:

$db_type = 'mysqli'; $db_host = 'localhost'; $db_user = 'root'; $db_password = 'root'; $db_name = 'mantisbt';
根据实际情况修改数据库连接信息。
创建MantisBT数据库
mysql -u root -p
执行以下命令创建数据库:
CREATE DATABASE mantisbt;
运行安装脚本
cd /var/www/mantisbt php install.php
按照提示输入数据库连接信息,完成安装。
配置Apache

- 创建虚拟主机
编辑Apache配置文件,添加以下内容:<VirtualHost *:80> ServerAdmin admin@example.com ServerName example.com DocumentRoot /var/www/mantisbt ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> - 重启Apache服务
service httpd restart
配置PHP
- 编辑PHP配置文件
vi /etc/php.ini
- 修改以下配置项:
upload_max_filesize = 10M post_max_size = 10M
- 重启PHP-FPM服务
service php-fpm restart
MantisBT登录与使用
- 访问MantisBT安装后的地址:http://example.com/mantisbt
- 使用默认管理员账号和密码登录(默认账号:admin,密码:admin)
- 进行项目、用户等设置,开始使用MantisBT
FAQs
Q:为什么我无法登录MantisBT?
A:请检查config/config.php文件中的数据库连接信息是否正确,确保数据库已创建,且MantisBT安装目录有写权限。Q:如何更改MantisBT的默认管理员密码?
A:登录MantisBT后,进入“系统信息”页面,找到“用户列表”,选择“admin”用户,修改密码即可。
【版权声明】:本站所有内容均来自网络,若无意侵犯到您的权利,请及时与我们联系将尽快删除相关内容!
发表回复