一、下载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、 生成数据库 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环境》

三、安装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

修改权限: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的一键安装包配置了开发环境,在事件运行项目时碰到了此类错误:Warning: require_once(): open_basedir restriction in effect,经过反复查找原因后发现是open_basedir的问题。

0pen_basedir解释:将 PHP 所能打开的文件限制在指定的目录树,包括文件本身。

首先查看了php.ini的open_basedir,发现open_basedir是关闭的。

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指向的是网站跟目录。

修改前:

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/";

由于网站都放在了/home/wwwroot/下,所以将权限指定了此目录下面。

 


                                                                                  

3、生成数据库

http://blog.51cto.com/77jiayuan/1559697

创建数据库mantis,并对相应的用户分配权限。
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;

打开网页http://服务器IP/mantis/admin/install.php

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

Type of Database:   默认数据库是MySQL
Hostname (for Database Server):   MySQL装在本机,可以默认
Username (for Database)   : 数据库的用户名(刚才创建的用户名和密码)
Password (for Database)   : 数据库的用户名密码(刚才创建的用户名和密码)
Database name (for Database)       刚才创建的数据库名mantis
Admin Username (to create Database ifrequired):   数据库管理员用户名及密码
Admin Password (to create Database ifrequired):   数据库管理员用户名及密码
Print SQL Queries instead of Writing to theDatabase    选上此项,输出SQL但不写到数据库,因为输出的SQL语句中要修改
点击install/Upgrade Database

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

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

将上图页面中的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
完成数据库的建立
此时再次按照刚才的方式填写,执行install/Upgrade Database(可以不执行,仅是检查数据库建立是否正确)

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


四、配置mantis 

1、配置mantisbt

http://www.weiruoyu.cn/?p=529 

移动到http的目录下,如果默认使用yum安装,http的目录在/var/www/html
若是用yum安装的lamp环境以下/
usr/local/apache/htdocs/路径应该为/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中,对大多数配置项都有说明。以下是一些主要配置项的说明:

1)       配置 MySQL 数据库连接

主要配置项:

$g_hostname      = “localhost”;
#如果MySQL的端口不是默认端口3306,可以设置为 localhost:portNumber

$g_db_username   = “mantis”;

$g_db_password   = “123456″;

$g_database_name = “mantis”;

$g_db_type = ‘mysql’;

2)       配置邮件服务

主要配置项:

$g_phpMailer_method       = 2;    #使用SMTP服务

$g_smtp_host  = ‘smtp.126.com’;

$g_smtp_username = ‘weirruoyu’;

$g_smtp_password = ’123456′;

$g_administrator_email  = ‘[email protected]’;

$g_webmaster_email      = ‘[email protected]’;

$g_from_email           = ‘[email protected]’;

$g_return_path_email    = ‘[email protected]’;

注:由于现在大多数SMTP服务器都要求身份验证,因此建议将邮件地址与SMTP的用户名匹配。否则可能无法发送邮件。

3)       配置文件上传

主要配置项:

$g_allow_file_upload  = ON;

$g_file_upload_method = DISK;

注:

a)       Mantis目录下新建目录如 upload ,再在mantis建立的项目中把文件上传路径设置为“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)       给用于存储上传文件的目录增加可写权限。

4)       配置语言

添加下面配置,添加在”$g_db_type       = ‘mysql’;”下面即可

$g_default_language = ‘chinese_simplified’;

注:Mantis的语言包在/webapps/mantis/lang/中。Mantis的汉化不够彻底,部分配置项在中文语言包中没有。可以对比中、英文语言包,将没有的部分补齐。

如果打开界面还没有中文,请更改页面设置:

 

设置mysql

创建数据库:
mysql> create database mantis;
Query OK, 1 row affected (0.00 sec)

授权

mysql> grant all privileges on mantis.* to [email protected] 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”

自己用邮箱注册一个账号,看是否发送,然后按照用户名和密码会进入界面如下图

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

进入后界面:

安装过程报错解决正常情况下没有出现以下两点错误centos6 安装 mantisbt-1.2.8 —— (5)Mantisbt-1.2.8在contos上的安装

错误1:登陆上面提示:

SYSTEM WARNINGdate()[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

 

配置后的默认设置如下

[mantisbt的页面测试  用户名以及密码]

{user:administrator    password:root}

 

g_database_name数据库的名字: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’;


参考的网址:见文本内部。

相关文章: