Ubuntu 14.04安装bugzilla

1.安装apache2

sudo apt-get install apache2

如报错请:sudo apt-get update

安装结束后:

产生的启动和停止文件是:/etc/init.d/apache2

 

启动:

sudo apache2ctl -k start

停止:

sudo apache2ctl -k stop

重新启动:

sudo apache2ctl -k restart

 

sudo /etc/init.d/apache2 restart

自启动出错,错误信息如下:

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

在apache2.conf文件尾部添加如下信息:

sudo gedit /etc/apache2/apache2.conf

#ServerName

ServerName 127.0.0.1

<Directory "/var/www/bugzilla/">

        AddHandler cgi-script .cgi

        Options +Indexes +ExecCGI +FollowSymLinks

        DirectoryIndex index.cgi

        AllowOverride None

        Order allow,deny

        Allow from all

    </Directory>

 

重启apache

sudo /etc/init.d/apache2 restart

 

2.安装mysql

sudo apt-get install mysql-server

运行该命令后,系统还会自己主动安装其他的一些软件,在安装过程中会提示输入mysql的root用户的password。按Tab键选定“确定”按钮,然后回车。

安装运行报错:

lxf@lxf:~$ mysql

ERROR 1045 (28000): Access denied for user 'lxf'@'localhost' (using password: NO)

解决方案:

lxf@lxf:~$ mysql -uroot -p

Enter password:

密码就是安装mysql时设置的root密码

成功出现以下信息:

lxf@lxf:~$ mysql -uroot -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 47

Server version: 5.5.62-0ubuntu0.14.04.1 (Ubuntu)

 

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

 

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

mysql>

 

先了解一波mysql服务相关命令

#查看mysql服务状态

sudo service mysql status

#启动mysql服务

sudo service mysql start

#关闭mysql服务

sudo service mysql stop

#重启mysql服务

sudo service mysql restart

 

使用grant创建用户并授权

GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugzilla@localhost IDENTIFIED BY '123456';

mysql创建用户详解

查看所有用户

select * from mysql.user;

删除用户

delete from mysql.user where User="bugs" and Host="localhost";

刷新系统权限表

FLUSH PRIVILEGES;

创建,删除,查看,授权用户

 

3.安装bugzilla

1.下载bugzilla源码包

http://ftp.mozilla.org/pub/webtools/bugzilla-5.0.2.tar.gz

2.安装

将该文件解压缩到/var/www/目录下

sudo tar -C /var/www/ -xvf bugzilla-5.0.2.tar.gz

检查所需Perl模块是否安装

解压完毕,该目录下将会有一个名为bugzilla-5.0.2的目录,将该目录改名为bugzilla并切换到/var/www/bugzilla/目录

cd /var/www/

sudo mv bugzilla-5.0.2 bugzilla

cd bugzilla/

在bugzilla目录下有一个checksetup.pl的文件,运行该文件

             sudo ./checksetup.pl

 

运行完毕,会告诉你当前bugzilla还差那些perl模块需要安装,并且有提示安装命令。这里我们只需要安装必须的一些包就可以了,可选包可以不用安装。安装这些必须的包的命令一般为:

              /usr/bin/perl install-module.pl –all

 

              sudo ./checkoutup.pl 出现以下错误:

There was an error connecting to MySQL:

 

    Access denied for user 'bugs'@'localhost' (using password: NO)

 

This might have several reasons:

 

* MySQL is not running.

* MySQL is running, but there is a problem either in the

  server configuration or the database access rights. Read the Bugzilla

  Guide in the doc directory. The section about database configuration

  should help.

* Your password for the 'bugs' user, specified in $db_pass, is

  incorrect, in './localconfig'.

* There is a subtle problem with Perl, DBI, or MySQL. Make

  sure all settings in './localconfig' are correct. If all else fails, set

  '$db_check' to 0.

 

按照提示修改localconfig文件

sudo gedit localconfig

 

# Who we connect to the database as.

$db_user = 'bugzilla';  //默认为bugs,但是我们创建数据库用户是名为bugzilla,所以修改一下

$db_pass = '123456';  //mysql使用grant创建用户并授权,上面设置的密码是123456

$db_port = 3306;  //端口默认是0,修改为3306

$webservergroup = 'www-data';

 

修改localconfig文件后

 sudo ./checksetup.pl

 

未出现报错,出现以下提示请输入管理员邮箱、名字、密码

Enter the e-mail address of the administrator: liuxf@fise.com.cn

Enter the real name of the administrator: liuxf

Enter a password for the administrator account: *******

Please retype the password to verify: *******

liuxf@fise.com.cn is now set up as an administrator.

Creating initial dummy product 'TestProduct'...

 

Now that you have installed Bugzilla, you should visit the 'Parameters'

page (linked in the footer of the Administrator account) to ensure it

is set up as you wish - this includes setting the 'urlbase' option to

the correct URL.

checksetup.pl complete.

 

 

在浏览器里面输入:http://localhost/bugzilla/

出现以下错误:

Not Found

The requested URL /bugzilla/ was not found on this server.

 

Apache/2.4.7 (Ubuntu) Server at localhost Port 80

 

 

解决方法:

sudo gedit /etc/apache2/sites-enabled/000-default.conf

 

修改000-default.conf文件中的

 

DocumentRoot /var/www/html

 

--->

DocumentRoot /var/www

 

重启 apache2

sudo /etc/init.d/apache2 restart

 

 

继续在浏览器里面输入:http://localhost/bugzilla/

 

接着出现下面的源代码:

 

#!/usr/bin/perl -T

# This Source Code Form is subject to the terms of the Mozilla Public

# License, v. 2.0. If a copy of the MPL was not distributed with this

# file, You can obtain one at http://mozilla.org/MPL/2.0/.

#

# This Source Code Form is "Incompatible With Secondary Licenses", as

# defined by the Mozilla Public License, v. 2.0.

 

use 5.10.1;

use strict;

use warnings;

 

use lib qw(. Lib);

 

这是因为cgi没有启动,解决方案:

# sudo a2enmod cgi

# sudo /etc/init.d/apache2 restart

 

4.bugzilla汉化

https://download.csdn.net/download/liuxinfa/11630122

将网上下载的汉化包,解压出来zh-CN文件夹copy到bugzilla的template文件夹下

cp -r work/zh-CN/ /var/www/bugzilla/template/

 

bugzilla 发送邮件配置

要进行邮件发送,要配置下面这些内容((以下是腾讯企业邮箱配置):

Administration->Parameters->Email:

mail_delivery_method:   SMTP

mailfrom: liuxf@fise.com.cn

use_mailer_queue : on

smtpserver :smtp.exmail.qq.com

smtp_username :liuxf@fise.com.cn

smtp_password: *********

smtp_ssl : on

 

注意:maintainer、mailfrom必须相同!smtp_username邮箱必须是存在的真实的邮箱,smtp_password必须是你真实邮箱的真实密码(要与你所登陆邮箱时的密码相同)!

 

163邮箱配置如下:

maintainer : liuxfa23@163.com

mail_delivery_method : SMTP

mailfrom : liuxfa23@163.com

sendmailnow: on

smtpserver : smtp.163.com

smtp_username: liuxfa23@163.com

smtp_password : ********

 

 

 

Software error:

Can't locate object method "quit" via package "Net::SMTP::SSL" at Bugzilla/Config/Common.pm line 370.

For help, please send mail to the webmaster (webmaster@localhost), giving this error message and the time and date of the error.

1、bugzilla注册账号,邮件无法发送

需要登录管理账号,配置邮箱服务

2Can't locate object method "quit" via package "Net::SMTP::SSL" at Bugzilla/Config/Common.pm line 365. For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

cpan -i MIME::Base64

cpan -i Net::SSLeay

cpan -i Net::SMTP::SSL

以上一直回车安装即可

3Can't locate object method "message" via package "To use SSL please install IO::Socket::SSL with version>=2.007 at lib/Net/SMTP.pm line 68. " (perhaps you forgot to load "To use SSL please install IO::Socket::SSL with version>=2.007 at lib/Net/SMTP.pm lin

yum install 'perl(IO::Socket::SSL)'

cpan -i IO::Socket::SSL

完成之后bugzilla可正常使用

 

如果cpan -i Net::SSLeay出现以下错误:

SSLeay.xs:163:25: fatal error: openssl/err.h: 没有那个文件或目录

首先得安装opensslsudo apt-get install openssl

#include<openssl/ssl.h>后编译报错:openssl/ssl.h:没有那个文件或目录的解决办法

 

解决办法为: sudo apt-get install libssl-dev build-essential zlibczlib-bin libidn11-dev libidn11

 

安装上边的依赖就好了。

 

 

Software error:

Insecure dependency in sysopen while running with -T switch at lib/File/Slurp.pm line 288.

For help, please send mail to the webmaster (webmaster@localhost), giving this error message and the time and date of the error.

 

后面在邮件设置里面编辑信息保存设置出现以上错误:

直接在params.json里面配置了邮件信息

 

sudo gedit /var/www/bugzilla/data/params.json

 

 

“mail_delivery_method'” : “SMTP“

“mailfrom“:”liuxf@fise.com.cn“

“maintainer' :“liuxf@fise.com.cn“

“smtp_username” : “liuxinfa@fise.com.cn“

“smtpserver” :”smtp.exmail.qq.com“

“use_mailer_queue”:“on“ #邮件进队列处理,改善页面僵死的等待

“urlbase” : “http://192.168.1.138/bugzilla/“  #这个是配置bugzilla的访问地址,邮件中的链接要用到

 

/var/www/bugzilla/jobqueue.pl start  #启动邮件队列处理

/var/www/bugzilla/jobqueue.pl install #写进内核,开机自动启动

 

 

直接修改params.json文件后,系统可以发送邮件

 

如果发送的邮件是乱码,请在

Preferences---General Preferences

偏好设定---一般设定

Preferred email format: Site Default(Text Only)

喜好的电子邮件格式:站台预设值(纯文字)

Language used in email: zh-CN

在电子邮件中用的语言:zh-CN

 

关于Bugzilla:

1.Bug按严重程度(Severity)分为:

Blocker,阻碍开发和/或测试工作

Critical,死机,丢失数据,内存溢出

Major,较大的功能缺陷

Normal,普通的功能缺陷

Minor,较轻的功能缺陷

Trivial,产品外观上的问题或一些不影响使用的小毛病,如菜单或对话框中的文字拼写或字体问题等等

Enhancement,建议或意见

2.Bug按报告状态分类(Status)

待确认的(Unconfirmed)

新提交的(New)

已分配的(Assigned)

问题未解决的(Reopened)

待返测的(Resolved)

待归档的(Verified)

已归档的(Closed)

3.Bug处理意见(Resolution)

已修改的(Fixed)

不是问题(Invalid)

无法修改(Wontfix)

以后版本解决(Later)

保留(Remind)

重复(Duplicate)

无法重现(Worksforme)

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值