Mantis的config_inc.php的各配置项的作用及其修改

Mantis的设置是这样保存的:在config_defaults_inc.php中保存Mantis的默认设置,用户自己的设置信息保存在config_inc.php中。如果某个选项在config_inc.php中有设置,则系统使用config_inc.php中的设置,否则使用config_defaults_inc.php的系统默认设置;config_inc.php.sample则是Mantis给出的一个用户设置文件例子。
我们需要修改config_inc.php文件中的设置,设置很简单,各个参数的意义可以参见config_defaults_inc.php,这里对每个参数都有详细的解释;Sample中给出的一些设置是一定需要修改的,比如MySQL数据库的连接参数,管理员的邮箱的;其他的要根据你的实际情况进行修改。

 

 

一些常用的设置
数据库配置
$g_hostname = "localhost";
$g_db_username = "root";
$g_db_password = "";
$g_database_name = "bugtracker";

其他配置
$g_use_iis   = ON;     # 使用IIS
$g_show_version   = OFF;     # 不在页面下部显示 Mantis的版本号
$g_default_language   = 'chinese_simplified';                          # 默认语言为简体中文
$g_show_project_menu_bar   = ON;                                     # 显示项目选择栏
$g_show_queries_count   = OFF;                                               # 在页脚不显示执行的查询次数
$g_default_new_account_access_level   = DEVELOPER;                  # 默认用户级别

$g_window_title    = 'Mantis Bug 跟踪管理系统';           # 浏览器标题
$g_page_title     = 'Mantis Bug 跟踪管理系统';           # 页面标题栏
$g_enable_email_notification  = ON;                                                # 开通邮件通知

文件上传设置:
默认为上传到数据库,你可以修改为上传到网站空间上,当然前提是你设置项目的时候给他一个可以上传的目录,比如在根目录下增加一个upload文件给他写权限。

$g_file_upload_method    = DISK;            # 保存到服务器空间
$g_max_file_size  = 5000000;       # mantis允许上传尺寸,前提是<=php.ini文件中上传允许的尺寸。

时间格式:
$g_short_date_format   = 'Y-m-d';           # 短日期格式,Y 大写表示 4 位年
$g_normal_date_format   = 'Y-m-d H:i';      # 普通日期格式
$g_complete_date_format  = 'Y-m-d H:i:s';    # 完整日期格式

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
请按照以下步骤在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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值