1.环境配置
Web Server:Apache,The web server must support PHP。
数据库:MySQL (or one of its forks, e.g. MariaDB)。
2.数据库采用MariaDB,MariaDB安装方法见http://www.cnblogs.com/lclq/p/5760966.html
使用yum安装Apache及php扩展
yum -y install httpd php php-mysql php-pdo php-gd
启动Apache服务:systemctl start httpd.service
设置开机自启动服务:systemctl enable httpd.service
打开浏览器输入http://ip/ 出现Apache的测试页面OK。
如果服务正常启动但是还是无法访问,请关闭防火墙。
systemctl stop firewalld.service#停止firewall
systemctl disable firewalld.service#禁止firewall开机启动
3.下载安装mantis
1)进入到Apache部署目录:cd /var/www/html
2)下载安装包:wget https://sourceforge.net/projects/mantisbt/files/mantis-stable/1.3.3/mantisbt-1.3.3.tar.gz/download
下载之后的文件名为download
3)重名download文件:mv download mantisbt-1.3.3.tar.gz
4)解压缩并修改权限:
tar xvf mantisbt-1.3.3.tar.gz
chown -R root:root mantisbt-1.3.3
chmod 777 -R mantisbt-1.3.3
5)创建mantisbt的数据库:
create database mantis;
grant all privileges on mantis.* to username@host identified by password;
flush privileges;
6)安装mantis
在浏览器里输入http://ip/mantisbt-1.3.3,此时浏览器会跳转到http://ip/mantisbt-1.3.3/admin/install.php
按照实际情况输入hostname,databasename(即第5)步里面的mantis),username(即第5)步里面的user),password(即第5)步里面的password)。
其中数据库类型可以选择Mysqli。
填写好这些内容,点击install/update database即可。
4.配置mantis
cd /var/www/html/mantis/config
cp config_inc.php.sample config_inc.php
编辑config_inc.php文件:vi config_inc.php
将一下内容(页面中会有提示)添加到config_inc.php文件中:
# --- Database Configuration ---
$g_hostname = 'localhost';
$g_db_username = 'username'; #第三步设置的数据库用户名
$g_db_password = 'password'; #第三步设置的数据库用户密码
$g_database_name = 'databasename'; #第三步设置的数据库名称
$g_db_type = 'mysqli';
$g_crypto_master_salt = '***********'
$g_default_timezone = 'UTC';
$g_default_language = 'auto';
$g_fallback_language = 'chinese_simplified';
5.删除admin目录 重启服务
cd /var/www/html/mantis
rm -rf admin
systemctl restart httpd.service
6.登录
默认用户名和密码:administrator/root
mantis使用参见文档:http://www.mantisbt.org/docs/master-1.3.x/en-US/Admin_Guide/html-single/#admin.about