阿里云ubuntu18.04搭建Mantisbt服务器

0. 环境

mantisbt当前稳定版本为2.21.1,其安装需求如下:

http://www.mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.install.requirements

本文环境如下:

web server:Apache/2.4.29 (Ubuntu)

数据库      :MySQL 5.7.26

PHP          : PHP 7.2.19

apache2、mysql和php安装参考其部分章节:

阿里云ubuntu18.04搭建mediawiki服务器  ->  https://www.jianshu.com/p/d90bd85b5f74

1. 安装mantisbt

mkdir mantisbt; cd mantisbt

wget https://sourceforge.net/projects/mantisbt/files/mantis-stable/2.21.1/mantisbt-2.21.1.tar.gz/download

tar zxvf mantisbt-2.21.1.tar.gz 

mv mantisbt-2.21.1 /var/www/html/mantisbt

chown -R www-data:www-data /var/www/html/mantisbt/

2. 创建mantisbt数据库

mysql -u root -p

create database mantisbt;

grant all on mantisbt.* to mantisbt@localhost identified by 'mantisbt';

exit;

其中root 为mysql用户名,mantisbt为数据库密码

3. 创建Apache virtual host文件

nano /etc/apache2/sites-available/mantisbt.conf

ServerAdmin webmaster@localhost

DocumentRoot /var/www/html/mantisbt/

ServerName example.com

ServerPath "/mantisbt/"

Options +FollowSymLinks

AllowOverride All

ErrorLog /var/log/apache2/mantisbt.error.log

CustomLog /var/log/apache2/mantisbt.access.log common

使能该网站

a2ensite mantisbt

service apache2 restart

4. 登陆并配置完成安装

登陆网页并修改administrator用户的密码

http://example.com/mantisbt/

administrator/root

设置邮箱:

/var/www/html/mantisbt/config/config_inc.php

修改MantisBT/config_defaults_inc.php

$g_webmaster_email              = '[email protected]';

$g_from_email                  = '[email protected]';

$g_return_path_email    = '[email protected]';

$g_smtp_connection_mode = 'ssl';

$g_smtp_port = 465;

$g_enable_email_notification = ON;

修改MantisBT/config/config_inc.php

# --- Email Configuration ---

$g_phpMailer_method            = PHPMAILER_METHOD_SMTP; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL

$g_smtp_host                    = 'smtp.aliyun.com';                  # used with PHPMAILER_METHOD_SMTP

$g_smtp_username                = '[email protected]';                                  # used with PHPMAILER_METHOD_SMTP

$g_smtp_password                = '***';                                  # used with PHPMAILER_METHOD_SMTP

备注:

g_smtp_port配置为465需要在云服务器中增加465端口的安全组规则

配置g_send_reset_password可不使用邮箱验证设置密码

$g_send_reset_password = OFF

删除domains.txt文件中的qq.com删除以便能用qq邮箱创建账号

vendor/vboctor/disposable_email_checker/data/domains.txt

参考文档:

http://www.mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/

在Ubuntu 18.04系统上安装Mantis Bug Tracker[MantisBT] ->  https://ywnz.com/linuxyffq/4134.html

ubuntu 18.04上安装mantis bug tracker  ->  https://blog.csdn.net/shizao/article/details/89521372

MantisBT,Mantis添加用户不能用QQ邮箱问题  --> http://www.zhou2019.cn/news/detail/3114.html

你可能感兴趣的:(阿里云ubuntu18.04搭建Mantisbt服务器)