设为首页 加入收藏

TOP

Linux系统下搭建MantisBT环境以及Apache+PHP+MySql的安装(一)
2019-08-23 00:33:50 】 浏览:51
Tags:Linux 系统 搭建 MantisBT 环境 以及 Apache PHP MySql 安装

在Linux的系统下搭建MantisBT运行所需环境

MantisBT管理文档:http://www.mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/

MantisBT是一个基于网络的错误跟踪系统,是用PHP开发的,支持多种数据库后端,包括MySQL和PostgreSQL。MantisBT其实就是一个PHP脚本,可以在PHP支持的任何操作系统上运行

在文档 2.2.2 节服务器软件要求 中写到了关于环境的要求,并在?2.2.2.1节 版本兼容性表 中写到了各种软件的版本兼容性相关的内容(仔细看版本要求,不要安装到低版本了)

该文章中软件版本情况如下:
- MySql数据库版本:5.7.19
- Apache服务器版本:2.4.35
- PHP版本:7.2.11

安装MySql

安装mysql前准备:

1、确认该环境中是否已安装mysql,如果已安装,自行选择是否重装。

2、下载mysql安装包
在 http://www.mysql.com/downloads/mysql/#downloads 下载mysql安装包:
mysql-community-server-8.0.13-1.fc28.x86_64.rpm
mysql-community-client-8.0.13-1.fc28.x86_64.rpm
mysql-community-devel-8.0.13-1.fc28.x86_64.rpm
mysql-community-libs-8.0.13-1.fc28.x86_64.rpm
这里包名仅作参考,根据实际系统下载对应的安装包。

使用rpm –ivh命令来安装mysql,这里不说啦。

了解一下mysql数据库的基本操作用法:

想要进入mysql数据库,输入"mysql"即可进入数据库,因为刚安装的mysql是没有密码的:

[root~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3153
Server version: 5.7.19 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

 

查看有哪些数据库:

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.02 sec)

mysql>
mysql>

 

切换数据库:

mysql> use mysql;
Database changed
mysql>
mysql>

 

查看某个数据库中的所有表:

mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| engine_cost |
| event |
| time_zone_transition_type |
| user |
.......
+---------------------------+
31 rows in set (0.00 sec)

mysql>

 

如果此时想远程连接该数据库的话,还不行。需要改一点数据:

mysql> select Host,user from user where user='root';
+----------+------+
| Host | user |
+----------+------+
| localhost| root |
+------+------+
1 row in set (0.00 sec)
mysql>

将上面查询出来的Host字段的值”localhost“改为“%”

mysql> updates user set Host='%' where user='root';

 

mysql的启动、停止和重启:

[root~]# service mysqld start
[root~]# service mysqld stop
[root~]# service mysqld restart

 

安装Apache服务器

安装Apache前请停止并卸载Linux系统自带的httpd服务。

下载Apache安装包,httpd-2.4.35.tar.bz2,下载地址: http://httpd.apache.org/ 。

如果现在直接编译安装Apache的话,会出现几个依赖包的问题,接下来先安装这几个依赖包
在 http://apr.apache.org/download.cgi 下载apr-1.6.5.tar.gz、apr-util-1.6.1.tar.gz。版本可选着两个版本,也可自行选择。

安装apr:

[root~]# tar -zxf apr-1.6.5.tar.gz
[root~]# cd apr-1.6.5
[root@apr-1.6.5]# ./configure --prefix=/usr/local/apr
[root@apr-1.6.5]# make
[root@apr-1.6.5]# make install

 

安装apr-util:

[root~]# tar -zxf apr-util-1.6.1.tar.gz
[root~]# cd apr-util-1.6.1
[root@localhost apr-util-1.6.12]# ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config
[root@localhost apr-util-1.6.1]# make
[root@localhost apr-util-1.6.1]# make install

 

安装pcre, 由于没有在网上找到pcre源码包,就直接采用yum的安装方式:

yum -y install pcre

 

待三个依赖程序安装完成后,接下来安装ap

首页 上一页 1 2 3 下一页 尾页 1/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇laravel5.5源码笔记(二、服务提.. 下一篇[日常] MySQL数据库持久连接

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目