先安裝Ubuntu 20
養成好習慣,新系統裝完先更新
sudo apt update
sudo apt upgrade
安裝 apachec2 / marriadb (MantisBT 是優先支援MySql)
sudo apt -y install apache2 mariadb-server mariadb-client
wget MantisBT--自己找網址
tar xvf mantisbt-VER.tar.gz
html檔案建立並且設定權限
mysql>grant all privileges on *.* to 'root'@'localhost' identified by 'root' with grant option;(紅色字為密碼)
mysql>flush privileges;
重刷一次網頁
成功完成網站並且登入之後
會產生設定檔
/var/www/html/mantisbt/config/config_inc.php
大概長這樣 這些是你的設定檔
$g_hostname = 'localhost';
39 $g_db_username = 'mantisdbuser';
40 $g_db_password = '';
41 $g_database_name = 'bugtracker';
42 $g_db_type = 'mysqli';
$g_crypto_master_salt = XXXXXX
細節跟說明可以看官網導覽手冊以及/var/www/html/mantisbt/config_defaults_inc.php
注意,要更改設定,請從default檔案拷貝參數,然後進入config資料夾裡面編輯
當中最重要設定就是開啟email功能 擷取摘要
註解都可以不要 如果email功能(google/office365)有問題
請確認自己機器可以telnet該SMTP主機 以及google帳號有關閉雙重認證以及程式安全性問題
至少螳螂在此版本我沒碰到問題 可成功設定
/**
* select the method to mail by:
* PHPMAILER_METHOD_MAIL - mail()
* PHPMAILER_METHOD_SENDMAIL - sendmail
* PHPMAILER_METHOD_SMTP - SMTP
* @global integer $g_phpMailer_method
*/
$g_phpMailer_method = PHPMAILER_METHOD_MAIL;
/**
* Remote SMTP Host(s)
* Either a single hostname or multiple semicolon-delimited hostnames.
* You can specify for each host a port other than the default, using format:
* [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com").
* Hosts will be tried in the given order.
* NOTE: This is only used with PHPMAILER_METHOD_SMTP.
* @see $g_smtp_port
* @global string $g_smtp_host
*/
$g_smtp_host = 'localhost';
/**
* SMTP Server Authentication user
* NOTE: must be set to '' if the SMTP host does not require authentication.
* @see $g_smtp_password
* @global string $g_smtp_username
*/
$g_smtp_username = '';
/**
* SMTP Server Authentication password
* Not used when $g_smtp_username = ''
* @see $g_smtp_username
* @global string $g_smtp_password
*/
$g_smtp_password = '';
/**
* Allow secure connection to the SMTP server
* Valid values are '' (no encryption), 'ssl' or 'tls'
* @global string $g_smtp_connection_mode
*/
$g_smtp_connection_mode = '';
/**
* Default SMTP port
* Typical ports are 25 and 587.
* This can be overridden individually for specific hosts.
* @see $g_smtp_host
* @global integer $g_smtp_port
*/
$g_smtp_port = 25;
沒有留言:
張貼留言