一、LAMP 環境配置
1.安裝 Apache2:
sudo apt-get install apache2
2.安裝 PHP 模塊:
sudo apt-get install php5
3.安裝 Mysql
sudo apt-get install mysql-server
4.其他模塊安裝:
sudo apt-get install libapache2-mod-php5
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo apt-get install php5-gd
二、更改apache配置文件
1、編輯/etc/apache2/apache2.conf 文件
添加如下內容:
<Directory /home/*/mantisbt>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ServerName 127.0.0.1
2、進入/etc/apache2/sites-available 目錄
sudo cp 000-default.conf mantisbt.conf
修改 mantisbt.conf文件:
ServerAdmin webmaster@localhost
ServerName mantisbt.com
DocumentRoot /home/*/mantisbt
<Directory /home/*/mantisbt>
Options -Indexes +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
然後重啓apache服務。
三、安裝配置mantisbt
1、訪問http://127.0.0.1,按提示步驟安裝
注意:管理員初始帳號爲:administrator,密碼爲:root。
登陸前會有兩個提示:
Warning: You should disable the default 'administrator' account or change its password.
Warning: Admin directory should be removed.
即:更改管理員密碼、刪除Admin目錄
2、配置郵件
在mantisbt/目錄下有個config_inc.php文件,在該文件裏配置email項
# --- Email Configuration ---
$g_phpMailer_method = PHPMAILER_METHOD_SMTP; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host = ''; # used with PHPMAILER_METHOD_SMTP
$g_smtp_username = ''; # used with PHPMAILER_METHOD_SMTP
$g_smtp_password = '*****'; # used with PHPMAILER_METHOD_SMTP
$g_administrator_email = '';
$g_webmaster_email = '';
$g_from_email = ''; # the "From: " field in emails
$g_return_path_email = ''; # the return address for bounced mail
3、漢化:mantisbt本身帶有各種語言支持,僅需要更改一下配置文件的默認語言就行了
更改文件:config_defaults_inc.php
// $g_default_language = 'english';
$g_default_language = 'chinese_simplified';