日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

centos6 安装 mantisbt-1.2.8 —— (5)Mantisbt-1.2.8在contos上的安装

發(fā)布時間:2025/10/17 编程问答 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 centos6 安装 mantisbt-1.2.8 —— (5)Mantisbt-1.2.8在contos上的安装 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

一、下載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錯誤提示

解決辦法-->http://www.luoxiao123.cn/php-display-error-tip.html1. 打開php.ini文件。
以我的ubuntu為例,這個文件在: /etc/php5/apache2 目錄下。
2. 搜索并修改上下行,把Off值改成On

display_errors =?Off

3. 搜索下行

error_reporting =?E_ALL &?~E_NOTICE或者搜索:

error_reporting =?E_ALL &?~E_DEPRECATED修改為

error_reporting =?E_ALL |?E_STRICT

4. 修改Apache的 httpd.conf,
以Ubuntu 為例, 這個文件在:/etc/apache2/ 目錄下,這是一個空白文件。
添加以下兩行:

php_flag display_errors ???????on

php_value error_reporting ??????2039

5. 重啟Apache,就OK了。
重啟命令: :

sudo /etc/init.d/apache2 restart

?

?

*問題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.

解決辦法-->https://www.viphper.com/1407.html

#vim /etc/php.ini 中修改open_basedir將 PHP 所能打開的文件限制在指定的目錄樹,包括文件本身),注釋掉

最近用lnmp的一鍵安裝包配置了開發(fā)環(huán)境,在事件運行項目時碰到了此類錯誤:Warning: require_once(): open_basedir restriction in effect,經(jīng)過反復(fù)查找原因后發(fā)現(xiàn)是open_basedir的問題。

0pen_basedir解釋:將 PHP 所能打開的文件限制在指定的目錄樹,包括文件本身。

首先查看了php.ini的open_basedir,發(fā)現(xiàn)open_basedir是關(guān)閉的。

1.?;?open_basedir,?if?set,?limits all file operations to the defined?directory

2.?;?and?below.??This?directive makes most sense if?used in?a per-directory

3.?;?or?per-virtualhost web server configuration file.

4.?;?http://php.net/open-basedir

5.?;open_basedir =?

然后在檢查nginx的fasecgi.conf 配置了open_basedir $document_root指向的是網(wǎng)站跟目錄。

修改前:

1.?fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";

修改后:

1.?fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/home/wwwroot/:/tmp/:/proc/";

由于網(wǎng)站都放在了/home/wwwroot/下,所以將權(quán)限指定了此目錄下面。

?


??????????????????????????????????????????????????????????????????????????????????

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.iniupload_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”);即可

?

報錯2Warning:?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)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。