如果宅|网络工程师培训

Centos7 安装 MantisBT

如果宅|网络工程师培训 http://www.ifzhai.com 2017-07-03 14:18 出处:PinG 作者:PinG 编辑:PinG
螳螂BUG跟踪系统,是一个基于网页的系统,支持多种数据库,MySQL, MS SQL 或者PostgreSQL,该软件开源,是根据GNU组织GPL条款发布。
(如果本文中的图片看不清,可按住键盘Ctrl键+鼠标滚轮上键)



一、安装

1、安装apache

# yum install -y httpd

# systemctl start httpd

检查一下apache状态

# systemctl status httpd

httpd.service - The Apache HTTP Server

   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)

   Active: active (running)

2、安装MariaDB数据库

# yum install -y mariadb mariadb-server

开启数据库服务

# systemctl start mysqld

查看一下数据库的状态

# systemctl status mysqld

mysqld.service - MySQL Server

   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)

   Active: active (running)

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

4、配置MariaDB

# 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!


进入mysql

# 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;

5、安装Mantis

#wget https://excellmedia.dl.sourceforge.net/project/mantisbt/mantis-stable/2.4.1/mantisbt-2.4.1.tar.gz

#tar -xpf mantisbt-2.4.1.tar.gz

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

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

6、配置虚拟主机

# $EDITOR /etc/httpd/conf.d/mantis.conf

<VirtualHost *:80>

        ServerAdmin admin@example.com

        DocumentRoot "/var/www/html/mantis"

        ServerName example.com

        <Directory "/var/www/html/mantis/">

                Options FollowSymLinks

                AllowOverride All

                Options MultiViews FollowSymlinks

                AllowOverride All

                Order allow,deny

                Allow from all

        </Directory>

        TransferLog /var/log/httpd/mantis_access.log

        ErrorLog /var/log/httpd/mantis_error.log

</VirtualHost>

重启HTTPD服务

# systemctl restart httpd

7、网页配置

http://example.com/mantis/admin/install.php





(转载请注明出处:如果宅www.ifzhai.com)

0