centos6 安装 mantisbt-1.2.8 —— (5)Mantisbt-1.2.8在contos上的安装
一、下載Mantisbt-1.2.8 1
二、利用yum 云安裝 php mysql apache httpd的步驟 1
三、安裝mantis詳細圖文教程(安裝1.2.8版本-centos6.4) 1
1、 將mantis解壓到/var/www/html目錄下 1
2、 訪問mantisbt目錄下的index.php文件 2
3、 生成數(shù)據(jù)庫 4
四、 配置mantis 8
一、下載Mantisbt-1.2.8
Mantisbt的下載地址: http://www.mantisbt.org/builds.php
http://www.duote.com/soft/31166.html
下載好的壓縮包(mantisbt-1.2.8) |
鏈接: https://pan.baidu.com/s/1uDpnZp8QRWbNzVQe-vWnJQ 密碼: e5sc |
?
二、利用yum 云安裝 php mysql apache httpd的步驟
http://www.weiruoyu.cn/?p=2021
1、安裝mysql
2、安裝apache
3、安裝php
詳情見本目錄下《四、在CentOS6.4中安裝配置LAMP環(huán)境》
三、安裝mantis詳細圖文教程(安裝1.2.8版本-centos6.4)
http://www.weiruoyu.cn/?p=529
實際安裝參照文檔:
http://blog.51cto.com/77jiayuan/1559697
*注意*mantis解壓到/var/www/html目錄下
1、將mantis解壓到/var/www/html目錄下
重命名:mv mantisbt-1.2.17? mantisbt
修改權(quán)限:chmod 755 mantisbt
2、訪問mantisbt目錄下的index.php文件
打開虛擬機中的火狐瀏覽器
瀏覽器中輸入:http://127.0.0.1/mantisbt/admin/index.php
?
*問題1*:CentOS 下開啟PHP錯誤提示
? | |
*問題2*:Warning: require_once(): open_basedir?restriction in effect. File(/usr/share/php/Auth/Yubico.php) is not within the allowed path(s): (/var/www/hm.
|
??????????????????????????????????????????????????????????????????????????????????
3、生成數(shù)據(jù)庫
http://blog.51cto.com/77jiayuan/1559697
創(chuàng)建數(shù)據(jù)庫mantis,并對相應(yīng)的用戶分配權(quán)限。
mysql> 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 'sqlroot' with grant option;
打開網(wǎng)頁http://服務(wù)器IP/mantis/admin/install.php
Type of Database:?? 默認數(shù)據(jù)庫是MySQL
Hostname (for Database Server):?? MySQL裝在本機,可以默認
Username (for Database)?? : 數(shù)據(jù)庫的用戶名(剛才創(chuàng)建的用戶名和密碼)
Password (for Database)?? : 數(shù)據(jù)庫的用戶名密碼(剛才創(chuàng)建的用戶名和密碼)
Database name (for Database)?????? 剛才創(chuàng)建的數(shù)據(jù)庫名mantis
Admin Username (to create Database ifrequired):?? 數(shù)據(jù)庫管理員用戶名及密碼
Admin Password (to create Database ifrequired):?? 數(shù)據(jù)庫管理員用戶名及密碼
Print SQL Queries instead of Writing to theDatabase??? 選上此項,輸出SQL但不寫到數(shù)據(jù)庫,因為輸出的SQL語句中要修改
點擊install/Upgrade Database
將上圖頁面中的Installing Database部分拷出來
刪掉Database Creation Suppressed, SQL Queries follow
刪掉SYSTEM WARNING: Invalid argument supplied for foreach()
修改language?????? VARCHAR(32) NOT NULL DEFAULT 'english',
為?? language????? VARCHAR(32) NOT NULL DEFAULT 'chinese_simplified',
保存為mantis_init_db.sql
以mantis用戶登錄mysql
mysql> use mantis
mysql> source /home/XXX/mantis_init_db.sql
完成數(shù)據(jù)庫的建立
此時再次按照剛才的方式填寫,執(zhí)行install/Upgrade Database(可以不執(zhí)行,僅是檢查數(shù)據(jù)庫建立是否正確)
?
四、配置mantis?
1、配置mantisbt:
http://www.weiruoyu.cn/?p=529?
移動到http的目錄下,如果默認使用yum安裝,http的目錄在/var/www/html
若是用yum安裝的lamp環(huán)境以下/usr/local/apache/htdocs/路徑應(yīng)該為/var/www/html
# mv manti/?/usr/local/apache/htdocs/
#cd /usr/local/apache/htdocs/mantis
#chmod ?777 /usr/local/apache/htdocs/mantis
#cp config_inc.php.sample config_inc.php
#vi?config_inc.php
在config_defaults_inc.php中,對大多數(shù)配置項都有說明。以下是一些主要配置項的說明:
1)?????? 配置 MySQL 數(shù)據(jù)庫連接
主要配置項:
$g_hostname????? = “l(fā)ocalhost”;
#如果MySQL的端口不是默認端口3306,可以設(shè)置為 localhost:portNumber
$g_db_username?? = “mantis”;
$g_db_password?? = “123456″;
$g_database_name = “mantis”;
$g_db_type = ‘mysql’;
2)?????? 配置郵件服務(wù)
主要配置項:
$g_phpMailer_method?????? = 2;??? #使用SMTP服務(wù)
$g_smtp_host? = ‘smtp.126.com’;
$g_smtp_username = ‘weirruoyu’;
$g_smtp_password = ’123456′;
$g_administrator_email? = ‘weirruoyu@126.com’;
$g_webmaster_email????? = ‘weirruoyu@126.com’;
$g_from_email?????????? = ‘weirruoyu@126.com’;
$g_return_path_email??? = ‘weirruoyu@126.com’;
注:由于現(xiàn)在大多數(shù)SMTP服務(wù)器都要求身份驗證,因此建議將郵件地址與SMTP的用戶名匹配。否則可能無法發(fā)送郵件。
3)?????? 配置文件上傳
主要配置項:
$g_allow_file_upload? = ON;
$g_file_upload_method = DISK;
注:
a)?????? 在Mantis目錄下新建目錄如 upload ,再在mantis建立的項目中把文件上傳路徑設(shè)置為“upload”(通過Web方式)。這樣上傳的文件就會存放在upload目錄中。
b)?????? 上傳文件的大小受到 Mantis 和 PHP 的雙重限制,需要修改:
/webapps/mantis/config_inc.php 中 $g_max_file_size = 100000000; # 100 MB
/usr/local/lib/php.ini中upload_max_filesize = 100M 和 post_max_size = 100M
c)?????? 給用于存儲上傳文件的目錄增加可寫權(quán)限。
4)?????? 配置語言
添加下面配置,添加在”$g_db_type ? ? ? = ‘mysql’;”下面即可
$g_default_language = ‘chinese_simplified’;
注:Mantis的語言包在/webapps/mantis/lang/中。Mantis的漢化不夠徹底,部分配置項在中文語言包中沒有。可以對比中、英文語言包,將沒有的部分補齊。
如果打開界面還沒有中文,請更改頁面設(shè)置:
?
設(shè)置mysql:
創(chuàng)建數(shù)據(jù)庫:
mysql> create database mantis;
Query OK, 1 row affected (0.00 sec)
授權(quán)
mysql> grant all privileges on mantis.* to mantis@localhost identified by ’123456′;
Query OK, 0 rows affected (0.04 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
4.頁面配置(先忽略這不,直接打開http://192.168.128.135/mantis,如果不行打開下面的地址)
瀏覽器中輸入:http://192.168.128.135/mantis/admin/install.php
按照提示下一步操作
5.測試:(默認管理員賬號:“administrator”,默認密碼:“root”)
自己用郵箱注冊一個賬號,看是否發(fā)送,然后按照用戶名和密碼會進入界面如下圖
進入后界面:
安裝過程報錯解決(正常情況下沒有出現(xiàn)以下兩點錯誤)
錯誤1:登陸上面提示:
SYSTEM WARNING:date()[function.data]:It isnotsafe tothe system‘s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We sekected. We selected ‘UTC‘ for ‘8.0/no DST‘instead
解決:在config_inc.php文件夾里面添加一行
1 | putenv(“TZ=Asia/Shanghai”);即可 |
?
報錯2:Warning:?Admin directory should be removed.
把mantis下的文件夾admin改名即可,或者刪除
解決:#mv admin/ admin.bak
?
配置后的默認設(shè)置如下 |
[mantisbt的頁面測試 ?用戶名以及密碼] {user:administrator ???password:root} ? g_database_name數(shù)據(jù)庫的名字:mantis ? g_db_username?? = “mantis”; g_db_password?? = “mantis″; Admin Username ?: ?root; Admin Password ?:ASDFGH; g_smtp_host :smtp.126.com; g_smtp_username: jieer; g_smtp_password:jieer; g_administrator_email? = ‘jieer@126.com’; $g_webmaster_email????? = ‘jieer@126.com’; $g_from_email?????????? = ‘jieer@126.com’; $g_return_path_email??? = ‘jieer@126.com’; |
參考的網(wǎng)址:見文本內(nèi)部。
總結(jié)
以上是生活随笔為你收集整理的centos6 安装 mantisbt-1.2.8 —— (5)Mantisbt-1.2.8在contos上的安装的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: centos6 安装 mantisbt-
- 下一篇: centos 7 安装 mantisbt