未分类

Centos7部署问题管理跟踪系统mantis2.13

安装/检查centos7

  1. private?static??T?getObj(Class?clazz)??
  2. ????{??
  3. ????????//判断类型??
  4. ????????if?(clazz?==?Student.class)??
  5. ????????{??
  6. ????????????return?(T)?new?Student();??
  7. ????????}??
  8. ????????else?if?(clazz?==?Teacher.class)??
  9. ????????{??
  10. ????????????return?(T)?new?Teacher();??
  11. ????????}??
  12. ????????return?null;??
  13. ????}??
  • cat /etc/*release*; cat /proc/version #检查系统版本

确认centos7完成。

安装apache

2.1 安装apache,并检查安装状态

yum install -y httpd; rpm -qa |grep httpd

2.2启动apache,并检查启动状态

# systemctl start httpd;systemctl status httpd

2.3 网页浏览器要访问apache测试页面,还需防火墙对apache打开80端口。

# firewall-cmd –state;firewall-cmd –list-all

80端口未打开

# firewall-cmd –zone=public –add-port=80/tcp –permanent;systemctl restart firewalld.service;firewall-cmd –list-all

2.4 再浏览器http://服务器主机IP/ 中检查apache测试页面

Apache安装完成。

3. 安装MariaDB数据库

3.1 安装MariaDB 数据库

# yum install -y mariadb mariadb-server; rpm -qa |grep mariadb

3.2 启动数据库,检查数据库状态

# systemctl start mariadb; systemctl status mariadb

3、安装PHP

MantisBT需要安装Php5.5以上版本,我这里安装PHP7,默认centos7中没有PHP7的安装源,需要安装一下源

# yum install -y epel-release

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

# yum install -y php71w php71w-mysqli php71w-cli php71w-mbstring; rpm -qa |grep php


4.配置mantis

4.1设置数据库root密码

# mysql_secure_installation

Remove anonymous users? Y

Success.

Disallow root login remotely? Y

Success.

Remove test database and access to it? Y

?– Dropping test database…

Success.

?– Removing privileges on test database…

Success.

Reload privilege tables now? Y

Success.

All done!

All done! If you’ve completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

4.2创建mantis数据库

# mysql -u root -p

MariaDB [(none)]> CREATE USER ‘mantisusr’@’localhost’ IDENTIFIED BY ‘Usr_strong_password1!’;

MariaDB [(none)]> CREATE DATABASE mantis_db;

MariaDB [(none)]> GRANT ALL PRIVILEGES ON mantis_db.* TO ‘mantisusr’@’localhost’ IDENTIFIED BY ‘Usr_strong_password1!’;

MariaDB [(none)]> FLUSH PRIVILEGES;

MariaDB [(none)]> EXIT;

4.3下载mantis

# wget https://jaist.dl.sourceforge.net/project/mantisbt/mantis-stable/2.13.1/mantisbt-2.13.1.zip

# unzip mantisbt-2.13.1.zip

# mv mantisbt-2.13.1 /var/www/html/mantis

# chown -R apache:apache /var/www/html/mantis/

4.4 浏览器登陆mantis

打开web浏览器登陆 http://192.168.11.163/mantis

关闭访问控制模块

setenforce 0; getenforce

$g_hostname               = 'localhost';
$g_db_type                = 'mysqli';
$g_database_name          = 'mantis_db';
$g_db_username            = 'mantisusr';
$g_db_password            = 'Usr_strong_password1!';
$g_default_timezone       = 'UTC';
$g_crypto_master_salt     = 'AD00pe4/rKaC9AKk7lPEddjqJ0RmAsWU2YjTYUK8JXA=';

Cd /var/www/html/mantis/config/

Cp config_inc.php.sample config_inc.php

Vi config_inc.php

root

rootpassword

1,561 Comments