1. # 安装需要的包
$ sudo yum install -y jpeg libpng freetype zlib gd curl libxml2 libxslt
2. # 修改apache配置文件
$ vim /etc/httpd/conf/httpd.conf
ServerName 服务器IP:80
$ 访问:http://ip
3. # 查看当前php版本
$ php -v
$ sudo yum remove -y php*
4. # 升级php版本
请参考这篇博文:https://blog.csdn.net/qq_34889607/article/details/81698293
5. # 修改php配置文件
$ sudo vim /etc/php.ini
date.timezone = "Asia/Shanghai"
6. # 启动apache服务
7. # 修改apache配置文件
$ vim /etc/httpd/conf/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .php
DirectoryIndex index.html default.php index.php
8. # 重启apache服务
9. # 测试php
$ sudo vim /var/www/html/info.php
<?php
phpinfo();
?>
访问:http://ip/info.php
10. # 编译安装mysql ---> 高于5.5.35版本
请参考这篇博文:https://blog.csdn.net/qq_34889607/article/details/79975205
11. # 创建数据库
> create database mantis default character set utf8 collate utf8_general_ci;
> grant all privileges on mantis.* to 'mantis'@'%' identified by 'mantis';
> grant all privileges on mantis.* to 'root'@'%' identified by 'root' with grant option;
12. # 下载mantisBT安装包,解压
$ sudo tar xf mantisbt-2.16.0-dev-master-1e14941.tar.gz
$ sudo mv mantisbt-2.16.0-dev-master-1e14941 /var/www/html/mantisbt
13. # 配置mantisBT
访问:http://ip/mantisbt/admin/install.php