Mantis 安装与配置

原文链接:http://www.cnblogs.com/beyondchina/p/3498086.html

特此感谢原文作者:beyondchina




1. 适用范围

a. 本文介绍基于 Windows 下的缺陷管理平台 Mantis。

2. 软件准备

a. 下载 EasyPHP:http://www.easyphp.org/easyphp-devserver.php

b. 下载 MantisBT:http://www.mantisbt.org/download.php

本文以 mantisbt-1.2.15 + EasyPHP-DevServer-13.1VC11 为演示版本,并在 Windows 7 64 位和 32 位操作系统上测试通过。

3. 安装 EasyPHP

a. 双击 EasyPHP-DevServer-13.1VC11-setup.exe 安装,安装完运行,右下脚托盘处出现E图标。

b. 启动 Apache 如遇丢失 MSVCR110.dll 错误(见 a1), 从网上下载 MSVCR110.dll,并将此文件复制到 C:\Windows\System32 目录。64 位操作系统复制到 C:\Windows\SysWOW64 目录。

c. 启动 Apache 如遇端口被占用错误(见 b1),打开配置文件:C:\Program Files (x86)\EasyPHP-DevServer-13.1VC9\binaries\apache\conf\httpd.conf, 查找 Listen 127.0.0.1:80,将 80 端口改为可用的端口号,如:9494,保存后,重启EasyPHP。

查看端口是否被占用: netstat -aon|findstr "端口号"。

d. 如果在打开 Local Web 或者 Administration 页面的时候发现加载很慢,可尝试修改 hosts 文件(见 c1)。

a1.


b1.

---------------------------
Apache
---------------------------
Apache port (80) is used by  System ! Close this application and relaunch EasyPHP. Apache port can be changed via the administration page.
---------------------------
确定  
---------------------------

c1.

文件位置: C:\Windows\System32\drivers\etc

修改前:

# localhost name resolution is handled within DNS itself.
# 127.0.0.1       localhost
# ::1             localhost

修改后:

# localhost name resolution is handled within DNS itself.
   127.0.0.1       localhost
# ::1             localhost

4. 安装配置 mantis

A. 解压 mantisbt-1.2.15.zip。

B. 复制文件夹到 C:\Program Files\EasyPHP-DevServer-13.1VC11\data\localweb 目录下。

C. 右键 Windows 托盘的(EasyPHP) 图标 ,打开 Local Web(或者浏览器中输入: http://127.0.0.1/)。 

D. 打开 mantisbt-1.2.15(或者浏览器中输入: http://127.0.0.1/mantisbt-1.2.15/login_page.php)

E. 在页面上点击 Install/Upgrade Database 按钮进行数据库安装,如果安装过程出现 d1错误,清空 Password (for Database),Admin Username (to create Database if required) 和 Admin Password (to create Database if required) 里面的内容即可。

F. 如遇 d2 错误,Username (for Database) 填上 root 即可解决问题。

Note: MySQL 的默认用户是 root,密码为空。

F. 查看是否可打开 mantis 登录页面(Example: http://127.0.0.1/mantisbt-1.2.15/login_page.php)。

G. 配置完成的 Mantis 只有一个默认的系统管理员用户:administrator,密码: root。

d1.

BAD
Does administrative user have access to the database? ( Access denied for user 'root'@'localhost' (using password: YES) ) 

d2.

BAD
database username is blank

5. 修改显示语言(默认显示为英语)

修改配置文件: C:\Program Files\EasyPHP-DevServer-13.1VC11\data\localweb\mantisbt-1.2.15\config_defaults_inc.php

修改前: $g_default_language  = 'english';

修改后: $g_default_language  = 'chinese_simplified';

6. 配置邮件服务器

修改配置文件 config_defaults_inc,只需修改以下变量,就可发送邮件成功。

修改前:

$g_from_email = 'noreply@example.com';

$g_return_path_email = 'admin@example.com';

$g_phpMailer_method = PHPMAILER_METHOD_MAIL;

$g_smtp_host = 'localhost';

$g_smtp_username = '';

$g_smtp_password = '';

修改后:

$g_from_email = 'liangjunjia@126.com';

$g_return_path_email = 'liangjunjia@126.com';

$g_phpMailer_method = 2;

$g_smtp_host = 'smtp.126.com';

$g_smtp_username = 'liangjunjia@126.com';

$g_smtp_password = 邮箱密码;

Note: 这边示例使用的是 126 作为邮件服务器,可使用第三方(比如163,sina,Gmail...)或自己搭邮件服务器。

7. 用 Administrator 注册新用户时设置密码

在 Mantis 目录下 config_defaults_inc.php 文件中找到 $g_send_reset_password

然后设置成:$g_send_reset_password = OFF  即可。

修改前:

复制代码
    /**
     * If ON, users will be sent their password when their account is created
     * or password reset (this requires mail settings to be correctly configured).
     * If OFF, then the Administrator will have to provide a password when
     * creating new accounts, and the password will be set to blank when reset.
     * @global int $g_send_reset_password
     */
    $g_send_reset_password    = ON;
复制代码

修改后:

复制代码
    /**
     * If ON, users will be sent their password when their account is created
     * or password reset (this requires mail settings to be correctly configured).
     * If OFF, then the Administrator will have to provide a password when
     * creating new accounts, and the password will be set to blank when reset.
     * @global int $g_send_reset_password
     */
    $g_send_reset_password    = OFF;
复制代码

8. 配置局域网访问

A. 修改配置文件: C:\Program Files (x86)\EasyPHP-DevServer-13.1VC9\binaries\conf_files\httpd.conf

修改前:Listen 127.0.0.1:80

修改后:Listen 192.168.0.103:80

Note:192.168.0.103 为 Mantis 服务器的 IP 地址。

B. 验证配置是否成功

在局域网的任一电脑中输入:http://192.168.0.103/mantisbt-1.2.15/login_page.php,如能打开,配置成功。

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
请按照以下步骤在Ubuntu上安装Mantis: 1. 首先,确保你的系统已更新并安装了Apache和MySQL。 2. 使用以下命令安装PHP7.0及其相关组件:sudo apt-get install php7.0 php7.0-mysql php7.0-curl php7.0-xmlrpc php7.0-json php7.0-gd php7.0-mbstring php7.0-common php7.0-cli 3. 安装Mantis所需的附加软件包:sudo apt-get install git 4. 克隆Mantis的代码库到你的本地系统:git clone https://github.com/mantisbt/mantisbt.git 5. 进入Mantis的代码目录:cd mantisbt 6. 为Mantis创建一个数据库:mysql -u root -p -e "CREATE DATABASE mantis;" 7. 导入Mantis的数据库架构:mysql -u root -p mantis < sql/mysql/mantis_create_tables.sql 8. 为Mantis创建一个MySQL用户:mysql -u root -p -e "GRANT ALL PRIVILEGES ON mantis.* TO 'mantis'@'localhost' IDENTIFIED BY 'password';" 9. 复制并重命名`config_inc.php.sample`文件:cp config/config_inc.php.sample config/config_inc.php 10. 使用文本编辑器打开`config/config_inc.php`文件,并修改以下配置项: - `$g_hostname`:将其设置为`localhost` - `$g_db_name`:将其设置为`mantis` - `$g_db_username`:将其设置为`mantis` - `$g_db_password`:将其设置为之前为MySQL用户设置的密码 - `$g_crypto_master_salt`:将其设置为一个随机的字符串 11. 配置Apache,将Mantis的根目录指向`/path/to/mantisbt`。 12. 重启Apache服务器:sudo service apache2 restart 13. 现在,你可以通过浏览器访问`http://localhost/mantisbt`来安装和配置Mantis

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值