Ubuntu下安装mantisbt

2020-04-03 10:49

Ubuntu下安装mantisbt问题管理系统

1.检测系统环境并安装更新 ~$cat /proc/version

Linux version 3.2.0-24-generic-pae (buildd@lamiak) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #38-Ubuntu SMP Tue May 1 16:40:26 UTC 2012 ~$ sudo apt-get update ~$ sudo apt-get upgrade

2.安装apahce2(已安装可以略过)

~$ apt-cache search package | grep apache2

~$sudo apt-get install apache2 libapache2-mod-php5

3.安装PHP5(已安装可以略过) ~$apt-cache search package | grep php5

~$sudo apt-get install php5-mysql php5-gd php5 php-mdb2-driver-mysql

4.测试一下apache2和php5安装是否成功 测试apache是否安装成功: 1).访问. http://localhost/index.html 测试php是否安装成功: 1).~$ cd /var/www/ 2).$ sudo vim version.php 输入: 保存退出 3).访问. http://localhost/version.php

5.安装mysql(已安装可以略过) 注意:mysql的安装很容易出问题 主要问题是: a).安装过程中输入密码后,报错没有权限设置mysql root的密码 Unable to set password for the MySQL \ An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server. You should check the account's password after the package installation. Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more information. b).安装过程中部分安装失败,导致安装出错而失败 Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed! invoke-rc.d: initscript mysql, action \ dpkg: error processing mysql-server-5.5 (--configure): subprocess installed post-installation script returned error exit status 1 configured to not write apport reports Errors were encountered while processing: mysql-server-5.5 E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up mysql-server-5.5 (5.5.18-1~dotdeb.1) ... Stopping MySQL database server: mysqld. Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

invoke-rc.d: initscript mysql, action \ dpkg: error processing mysql-server-5.5 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: mysql-server-5.5

出现这两个问题建议你重装系统,否则即使当时解决了,后面也问题不断

安装mysql

~$apt-cache search package | grep mysql-server

~$sudo apt-get install mysql-server-5.5 mysql-server 安装过程中输入root用户的密码

6.为安装mantisbt配置apahce2,php,mysql

1).配置apache2

~$sudo vim /etc/apache2/httpd.conf #添加支持网页的类型(这个在这里写的有点靠后了,因为在前面测试apache2和php5时就应该 #设置好) AddType application/x-httpd-php .php AddType application/x-httpd-php .html LoadModule php5_module /usr/lib/apache2/modules/libphp5.so 2).配置php5

~$sudo vim /etc/php5/apache2/php.ini 找到 ;extension=mysql.so一行 修改为: extension=mysql.so extension=gd.so #注意这两行前面都没有分号了 3).配置mysql ~$mysql -u root -p

Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement. mysql>create database bugtracker;

mysql> grant all privileges on bugtracker.* to root@localhost identified by 'password'; mysql> flush privileges; mysql> \\q

注意:这里的操作是建立一个数据库bugtracker,设置数据库的root用户的密码是password 这里我设置root密码为mantis

7.导入数据到数据库bugtracker

~$mysql -uroot -p bugtracker < /var/www/mantis/library/adodb/session/adodb-sessions.mysql.sql 输入密码(我这里为mantis)

8.下载,配置mantisbt

1).下载地址:http://www.mantisbt.org/download.php 选一个稳定版本下载,这里我下的是MantisBT 1.2.10 版本 2).解压、修改权限

~$unzip mantisbt-1.2.10.zip

~$sudo mv -i mantisbt-1.2.10 /var/www/mantisbt ~$sudo chmod -R 777 /var/www/mantisbt

3).在mantisbt目录下创建、配置config_inc.php ~$cd /var/www

~$sudo cp mantisbt/config_inc.php.sample mantisbt/config_inc.php ~$sudo vim mantisbt/config_inc.php a).添加中文简体支持. $g_default_language = 'chinese_simplified'; b).##配置计算机名,默认不改 $g_hostname = 'localhost'; ##数据库超级用户,默认为mantisdbuser,需要修改为root $g_db_username = 'root'; ##在6-3)配置mysql时设置root的密码,默认为空,这里root用户的密码 $g_db_password = 'mantis'; ##在6-3)配置mysql时创建了数据库名,默认为bugtracker,这里为创建的数据数据库 $g_database_name = 'bugtracker'; 保存、退出

9.安装mantisbt

1).访问. http://localhost/mantisbt/admin/install.php 进入安装页面

a).检查安装项(checking installation...):

共6项,除了Checking PHP support for database type项可能提示有问题外,其他5项都是GOOD

b).输入安装Install Options

参考8-3)-b)设置的属性来填写 c).点击安装 2).安装成功后 访问. http://localhost/mantisbt 就可以转到登录界面

如果你能成功看到登录界面,那么恭喜你安装mantis成功,默认的用户administrator,密码root

10.进行邮箱配置

1).安装sendmail邮件代理软件 ~$sudo apt-get install sendmail

2).配置config_inc.php,使它支持邮件提醒、认证功能 ~$cd /var/www

~$sudo vim mantisbt/config_inc.php

$g_use_phpMailer = ON; # 使用 PHPMailer 发送邮件 $g_phpMailer_method = 2;

$g_enable_email_notification = ON; # 开通邮件通知

$g_smtp_host = 'smtp.163.com';#smtp服务器的地址 $g_smtp_username = 'test';#登录smtp服务器的账号

$g_smtp_password = 'password';#登录smtp服务器的密码 $g_administrator_email = 'testadmin@163.com';#admin的邮箱

$g_webmaster_email = 'webmaster@example.com';#网管的邮箱,这里我没有配置

$g_from_email = 'noreply@example.com'; # the \,这里没有配置 $g_return_path_email = 'test@163.com';#回复邮箱 #class.phpmailer.php

#这个是在mantisbt自带的,当然你可以去下载一个

$g_phpMailer_path = '/var/www/mantisbt/library/phpmailer/';

$g_from_name = '*** Bug Tracker'; #对方接受邮件时显示的名称

3).编辑/etc/php5/apache2/php.ini(这一步我没有做,但是邮件一样能够发出来,只不过看到的发件人是'noreply@example.com') ~$sudo vim /etc/php5/apache2/php.ini

sendmail_path = /usr/sbin/sendmail -t -f test@163.com

11.验证邮箱功能 重启apache2服务

~$sudo /etc/init.d/apache2 restart 然后即可测试mantis的用户注册

结束!

有什么问题请联系1332196509@qq.com


Ubuntu下安装mantisbt.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:村民自治制度中存在的问题与对策研究

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: