未分类

Centos7 安装mantis2.13项目管理系统

1.安装/检查centos7

  1. cat?/etc/*release*??#检查系统版本??
  2. lsb_release?-a??#检查内核版本??
  3. cat?/proc/version??#检查版本??
  4. uname?-r??#检查用户?

?

2.安装apache

?

安装apache,并检查安装版本

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

?

httpd-tools-2.4.6-67.el7.centos.6.x86_64

httpd-2.4.6-67.el7.centos.6.x86_64

?

启动apache,并检查启动状态

# systemctl start httpd;systemctl status httpd

?

● httpd.service – The Apache HTTP Server

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

Active: active (running) since Tue 2018-04-10 00:31:43 EDT; 3min 42s ago

Docs: man:httpd(8)

man:apachectl(8)

Main PID: 1464 (httpd)

Status: “Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec”

CGroup: /system.slice/httpd.service

├─1464 /usr/sbin/httpd -DFOREGROUND

├─1465 /usr/sbin/httpd -DFOREGROUND

├─1466 /usr/sbin/httpd -DFOREGROUND

├─1467 /usr/sbin/httpd -DFOREGROUND

├─1468 /usr/sbin/httpd -DFOREGROUND

└─1469 /usr/sbin/httpd -DFOREGROUND

?

Apr 10 00:31:43 localhost.localdomain systemd[1]: Starting The Apache HTTP Server…

Apr 10 00:31:43 localhost.localdomain httpd[1464]: AH00558: httpd: Could not reliably dete…ge

Apr 10 00:31:43 localhost.localdomain systemd[1]: Started The Apache HTTP Server.

Hint: Some lines were ellipsized, use -l to show in full.

?

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

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

?

public (active)

target: default

icmp-block-inversion: no

interfaces: ens33

sources:

services: ssh dhcpv6-client

ports:

protocols:

masquerade: no

forward-ports:

source-ports:

icmp-blocks:

rich rules:

?

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

?

success

public (active)

target: default

icmp-block-inversion: no

interfaces: ens33

sources:

services: ssh dhcpv6-client

ports: 80/tcp

protocols:

masquerade: no

forward-ports:

source-ports:

icmp-blocks:

rich rules:

?

再浏览器中检查apache测试页面

?

?

?

3. 安装MariaDB数据库

安装MariaDB 数据库

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

Complete!

mariadb-5.5.56-2.el7.x86_64

mariadb-libs-5.5.56-2.el7.x86_64

mariadb-server-5.5.56-2.el7.x86_64

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

# systemctl start mariadb; systemctl status mariadb

mariadb.service – MariaDB database server

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

Active: active (running) since Tue 2018-04-10 01:25:45 EDT; 28ms ago

Process: 8992 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)

Process: 8913 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)

Main PID: 8991 (mysqld_safe)

CGroup: /system.slice/mariadb.service

├─8991 /bin/sh /usr/bin/mysqld_safe –basedir=/usr

└─9153 /usr/libexec/mysqld –basedir=/usr –datadir=/var/lib/mysql –plugin-dir=/…

?

?

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创建数据库

By default, a MariaDB installation has an anonymous user, allowing anyone

to log into MariaDB without having to have a user account created for

them. This is intended only for testing, and to make the installation

go a bit smoother. You should remove them before moving into a

production environment.

?

Remove anonymous users? [Y/n] Y

… Success!

?

Normally, root should only be allowed to connect from ‘localhost’. This

ensures that someone cannot guess at the root password from the network.

?

Disallow root login remotely? [Y/n] Y

… Success!

?

By default, MariaDB comes with a database named ‘test’ that anyone can

access. This is also intended only for testing, and should be removed

before moving into a production environment.

?

Remove test database and access to it? [Y/n] Y

– Dropping test database…

… Success!

– Removing privileges on test database…

… Success!

?

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

?

Reload privilege tables now? [Y/n] Y

… Success!

?

Cleaning up…

?

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

installation should now be secure.

?

Thanks for using MariaDB!

?

进入数据库

?

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

?

?

?

登陆mantis

下载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 mantis

?

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

?

?

$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,239 Comments