• 首页
  • IT技术
  • 生活
  • ISSUE
  • SVN
Bernie Yu

复刻生活

在群晖NAS上搭建MantisBT Bug跟踪系统

Posted on 2015年7月10日
  1. 启用WEB服务
    进入群晖的管理后台,打开控制页面,在里面打开WEB服务
    201506261549467
  2. 安装MariaDB数据库,配置好root账户的密码
  3. 安装MantisBT
    打开套件中心,找到MantisBT,进行安装。安装过程中要输入Mysql (MariaDB)的root账号和密码,安装过程中会自动创建MantisBT所需要的库表
    20150710110313
  4. 配置MantisBT
    • 打开http://synology_address/mantisbt,默认用户名:adminstrator,初始密码:root
    • 现在数据库是用root登录的,为了数据库安全,在数据库里新建mantis用户,仅拥有对mantis库的权限。然后修改config_inc.php:
      $g_hostname = 'localhost';
      $g_db_type = 'mysql';
      $g_database_name = 'mantis';
      $g_db_username = 'mantis';
      $g_db_password = 'mantis';
      
    • 修改默认语言为简体中文:在config_inc.php中添加:
      $g_default_language= 'chinese_simplified';
    • mantis默认新用户都是要邮件激活的,因此还需要添加邮件支持。修改config_defaults_inc.php,把发信人修改为真正使用的发件邮箱地址(有些邮箱服务器会校验发件人地址和真实发件地址,不匹配有可能造成发信失败)
      $g_administrator_email	= 'mantis@host.com';
      $g_webmaster_email	= 'mantis@host.com';
      $g_from_email			= 'mantis@host.com';
      $g_return_path_email	= 'mantis@host.com';

      继续修改发件的smtp信息

      $g_phpMailer_method		= PHPMAILER_METHOD_SMTP;
      $g_smtp_host			= 'smtp.exmail.qq.com';
      $g_smtp_username = 'mantis@host.com';
      $g_smtp_password = 'password';
      $g_smtp_connection_mode = 'ssl';
      $g_smtp_port = 465;
    • 登录到mantis里,新建管理员用户。然后以新建用户登录后,就可以禁用administrator,以保证安全。
    • Tips:
      • 在library\phpmailer下是邮件发送组件,可以新建一个mailtest.php,然后在浏览器打开这个页面测试邮件发送是否正常:
        <?php
        /**
         * @author [pooy] <[pooy@pooy.net]>
         * @blog  http://www.pooy.net
         */
        require 'class.phpmailer.php';
         
        $mail = new PHPMailer;
        $mail->SMTPDebug = 1;
        $mail->IsSMTP();                                      // Set mailer to use SMTP
         
        $mail->Host = 'smtp.exmail.qq.com';  // Specify main and backup server
        $mail->SMTPAuth = true;                               // Enable SMTP authentication
        $mail->Username = 'mantis@host.com';                            // SMTP username
        $mail->Port = 465;
        $mail->Password = 'password';                           // SMTP password
        $mail->SMTPSecure = 'ssl';                            // Enable encryption, 'ssl' also accepted
        $mail->From = 'mantis@host.com';
         
        $mail->FromName = 'Mailer Testing';
        $mail->AddAddress('reciver@host.com');   
        $mail->WordWrap = 50;                                 // Set word wrap to 50 characters
        $mail->IsHTML(true);                                  // Set email format to HTML
         
        $mail->Subject = 'Here is the subject';
        $mail->Body    = 'This is the HTML message body <b>in bold!</b>';
        $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
         
        if(!$mail->Send()) {
           echo 'Message could not be sent.';
           echo 'Mailer Error: ' . $mail->ErrorInfo;
           exit;
        }
         
        echo 'Message has been sent';
        // To load the Chinese version
        $mail->SetLanguage('cn', '/path_to_mantisbt/library/phpmailer/language');
        ?>
      • 在scripts下的send_eamils.php,可以在控制台执行,测试在config_defaults_inc.php里的邮件配置是否能正常发送邮件
        php -q /path_to_mantisbt/scripts/send_emails.php
Posted in: IT技术, Synology | Tagged: bug tracking, mantis, Synology
← 在群晖Nas上搭建Git服务器
[转] lsyncd实时同步搭建指南——取代rsync+inotify →
2015年7月
一 二 三 四 五 六 日
« 六   十 »
 12345
6789101112
13141516171819
20212223242526
2728293031  

标签

Android awstats bug tracking chrome database EXSi ffmpeg ffplay fpm GeoIP git hls HTML5 iOS ipkg JavaScript JSON linux lsyncd mantis MariaDB mysql N54l nginx php rtmp SVN svnlook Synology Video vps WordPress yamdi 同步 字幕 安全控件 安装 实用信息 录制 摄像头 浏览器 生活 直播 迅雷 黑群晖

近期文章

  • VPS从DirectSpace迁移到vultr
  • 查看阻止电脑进入休眠的程序
  • HDCN,纪念
  • [转] lsyncd实时同步搭建指南——取代rsync+inotify
  • 在群晖NAS上搭建MantisBT Bug跟踪系统

分类目录

  • Android
  • Database
  • Git
  • IT技术
  • Linux
  • SVN
  • Synology
  • WEB
  • WordPress
  • 未分类
  • 生活

文章归档

  • 2016年5月
  • 2015年12月
  • 2015年10月
  • 2015年7月
  • 2015年6月
  • 2015年5月
  • 2015年4月
  • 2015年3月

链接·工具

  • 百度云观测
  • 360云监控
  • 草料网二维码生成
  • 工信部投诉
  • 快递投诉
  • 北京社保查询
  • 北京公积金查询
  • 执业医师查询
  • 在线查毒:VirusTotal
  • 在线查毒:VirSCAN

Copyright © 2023 Bernie Yu.

Theme by ThemeHall.