Linux上安装Bugzilla4.4小记

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:

因项目需要,我受命在一台Linux服务器上搭建一个Bugzilla,进过一天的调试,这项任务总算完成了。现在可以肯定的说,安装过程不复杂,基本就是解压,填参数,执行命令。Bugzilla要跑起来,本机的MySQL和Sandmail不是必须的,你可以用其它机器上的MySQL代替本机MySQL,可以用SMTP方式代替本机sendmail。本机的Apache(httpd)是必须的,当然安装和使用Apache也容易,总之不要被大部头的网文吓到,犯错不要紧,多试几次也就弄出来了。

今天先把安装过程记录在这里。

1.准备工作--安装CPAN

先直接从http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-2.00.tar.gz下载,若此网址失效可以从网址http://search.cpan.org/~andk/CPAN/lib/CPAN.pm去寻找CPAN-2.00.tar.gz下载,可以从 http://pan.baidu.com/s/1wwEo3 下载。
将CPAN-2.00.tar.gz下载下来后执行下面命令:
tar -zxvf CPAN-2.00.tar.gz
cd CPAN-2.00
perl Makefile.PL
make
make install

2.安装Bugzilla

下载bugzilla-4.4.tart.gz (http://pan.baidu.com/s/1l7sL9)后,解压

#tar xvzf bugzilla-4.4.tart.gz,之后得到目录bugzilla-4.4

然后执行命令#cp bugzilla-4.4  /var/www/html/bugzilla(/var/www/html/是httpd对外服务目录)

之后,进入目录/var/www/html/bugzilla

#cd /var/www/html/bugzilla

执行命令#./checksetup.pl --check-modules

此命令用于检查所需要的peal模块是否都已安装,程序会提示那些需要安装,哪些是可选的,你按命令把必需的装上就行。如果偷懒的话可以执行#perl install-module.pl --all让系统自己忙去。

之后执行#./checksetup.pl ,这一步是用来生成localconfig文件,得到这个文件需要你手工修改好,主要是改这些信息。

$webservergroup='apache' #apache使用的group
$db_driver = 'mysql'; #使用的数据库
$db_host = '192.168.0.104'; #数据库服务器ip
$db_name = 'bugs'; #数据库名称
$db_user = 'root'; #连接数据库的用户名
$db_pass = '123456';#连接数据库的用户密码

$db_port = 3306;#连接数据库的端口

修改完数据库信息后,再一次执行#./checksetup.pl,执行完Bugzilla需要的表就会创建出来了。数据库生成完成后,将会提示输入管理员邮件地址、用户名和密码。这个最好记下来,以后还会用它们登录系统(管理员邮件地址/密码)进行配置。

到这里,Bugzilla的事情就做完了,接下来是Httpd的事情。

3.配置httpd

首先,需要在httpd安装目录下创建一个文件bugzilla,使用如下命令

vi /etc/httpd/conf.d/bugzilla
在其中输入一行

Alias /bugzilla/ "/var/www/html/bugzilla/"

然后:wq保存退出,这样做的意义是让我们可以通过http://serverip/bugzilla来访问BugZilla。

有些网文居然把Alias /bugzilla/ "/var/www/html/bugzilla/"这句话说是写到httpd.conf文件里面,别被误导了。

然后,还要在/etc/httpd/conf/httpd.conf里面加入如下内容:

<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride Limit FileInfo Indexes Options
</Directory>

然后使用#service httpd restart重启Httpd就好了。

 之后就可以通过http://serverip/bugzilla来看到如下页面:

 然后,使用前面记下来的管理员邮件地址密码登录,进去后点Parameters再点左边的Email菜单。



设置以下几项,我设置的自己的网易邮箱,供参照

Mail_delivery_method=SMTP

Mailfrom=myuser@163.com

Smtpserver=smtp.163.com

Smtp_username=myuser@163.com

Smtp_password=mypassword

如果不走界面,直接修改/var/www/html/bugzilla/data/params文件也是可行的,上面那些值都在里面。

不幸的是,注册用户事给用户发邮件没有成功,错误如下:

An unexpected error occurred. This could be a temporary problem, or some code is behaving incorrectly. If this problem persists, please email this page to nXXXp@XXX.com with details of what you were doing at the time this message appeared.

URL: http://9.2.193.185/bugzilla/createaccount.cgi?login=XXX%40163.com&token=1380208497-_aNlyyuqOCh97LmD_p-b_9o9PgnfLVXR3D0eXWUeAoQ
There was an error sending mail from 'nXXXp@XXX.com' to 'XXX@163.com': Couldn't authenticate '****:...'

Traceback:

 at Bugzilla/Mailer.pm line 174
    Bugzilla::Mailer::MessageToMTA(...) called at Bugzilla/Token.pm line 76
    Bugzilla::Token::issue_new_user_account_token(...) called at Bugzilla/User.pm line 2039
    Bugzilla::User::check_and_send_account_creation_confirmation(...) called at /var/www/html/bugzilla/createaccount.cgi line 37

具体原因不明,现正调查中。

2013年9月27日14:26:59

Mail_delivery_method改成TEST之后,/var/www/html/bugzilla/data/mailer.testfile里面是有内容的,

...

From - Fri, 27 Sep 2013 02:32:32 -0400
From: XXXX@XXX.XXX.com^M
To: 123@136.com^M
Subject: Bugzilla: confirm account creation^M
X-Bugzilla-Type: admin^M
X-Bugzilla-URL: ^M
Auto-Submitted: auto-generated^M
MIME-Version: 1.0^M
Date: Fri, 27 Sep 2013 02:32:32 -0400^M
Content-Type: text/plain; charset="UTF-8"^M
^M
Bugzilla has received a request to create a user account^M
using your email address (123@136.com).^M
^M
To continue creating an account using this email address, visit the ^M
following link by September 30, 2013 at 02:32 EDT:^M
^M
token.cgi?t=vPctKScNdR&a=request_new_account^M
^M
If you did not receive this email before September 30, 2013 at 02:32 EDT or^M
you wish to create an account using a different email address you can begin^M
again by going to:^M
^M
createaccount.cgi^M
^M
PRIVACY NOTICE: Bugzilla is an open bug tracking system. Activity on most^M
bugs, including email addresses, will be visible to the public. We recommend^M
using a secondary account or free web email service (such as Gmail, Yahoo,^M
Hotmail, or similar) to avoid receiving spam at your primary email address.^M
^M
If you do not wish to create an account, or if this request was made in^M
error you can do nothing or visit the following link:^M
^M
token.cgi?t=vPctKScNdR&a=cancel_new_account^M
^M
If the above links do not work, or you have any other issues regarding^M
your account, please contact administration at nfhelp@us.ibm.com.

...

说明Bugzilla与SMTP服务器之间出了问题,而Bugzilla内部工作正常。

 继续调查中.

2013年9月28日0:45:25补记

刚才将use_mailer_queue改成Off,然后再开一个新Account,系统提示邮件发出去了,检查下邮箱,确实来了,如下

Bugzilla has received a request to create a user account
using your email address (XXXXXX@XXXX.com).

To continue creating an account using this email address, visit the 
following link by September 30, 2013 at 12:28 EDT:

token.cgi?t=X6rGyNmOdv&a=request_new_account

If you did not receive this email before September 30, 2013 at 12:28 EDT or
you wish to create an account using a different email address you can begin
again by going to:

createaccount.cgi

PRIVACY NOTICE: Bugzilla is an open bug tracking system. Activity on most
bugs, including email addresses, will be visible to the public. We recommend
using a secondary account or free web email service (such as Gmail, Yahoo,
Hotmail, or similar) to avoid receiving spam at your primary email address.

If you do not wish to create an account, or if this request was made in
error you can do nothing or visit the following link:

token.cgi?t=X6rGyNmOdv&a=cancel_new_account

If the above links do not work, or you have any other issues regarding
your account, please contact administration at nfhelp@us.ibm.com.

然后我用一个网易和gmail邮箱试试,也都收到邮件了,说明邮件系统好用了。

但是除了use_mailer_queue改成Off一项,其它都没有变化,邮件发送就好用了,我上午也试过同样的方式,为啥不好用呢?难道上午Bugzilla与SMTP服务器之间出了问题,晚上就OK了。

明天再在我的新机器上试试装装看,要真是连接问题这两天功夫花的就有点冤了。

2013年9月30日19:43:38补记

现在Bugzilla邮件系统一切正常,估计真是连接问题。














本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/xiandedanteng/p/3341837.html,如需转载请自行联系原作者


相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
10天前
|
缓存 Linux 测试技术
安装【银河麒麟V10】linux系统--并挂载镜像
安装【银河麒麟V10】linux系统--并挂载镜像
61 0
|
10天前
|
Linux C语言
linux yum安装ffmpeg 图文详解
linux yum安装ffmpeg 图文详解
28 0
|
10天前
|
NoSQL Linux Redis
linux 下和win下安装redis 并添加开机自启 图文详解
linux 下和win下安装redis 并添加开机自启 图文详解
15 0
|
10天前
|
Linux
linux yum 安装rar和unrar
linux yum 安装rar和unrar
35 0
|
22天前
|
Java Linux Maven
Linux中安装MAVEN环境配置
Linux中安装MAVEN环境配置
49 3
|
23天前
|
存储 负载均衡 索引
linux7安装elasticsearch-7.4.0集群配置
linux7安装elasticsearch-7.4.0集群配置
109 0
|
27天前
|
Linux 数据安全/隐私保护 虚拟化
Linux技术基础(1)——操作系统的安装
本文是龙蜥操作系统(Anolis OS) 8.4 的安装指南,用户可以从[龙蜥社区下载页面](https://openanolis.cn/download)获取ISO镜像。安装方法包括物理机的光驱和USB闪存方式,以及虚拟机中的VMware Workstation Pro设置。安装过程涉及选择语言、配置安装目标、选择软件集合和内核,设置Root密码及创建新用户。安装完成后,可通过文本模式或图形化界面验证系统版本,如Anolis OS 8.4,标志着安装成功。
|
22天前
|
消息中间件 Java Linux
Linux下RabbitMQ安装与使用
Linux下RabbitMQ安装与使用
32 1
|
3天前
|
关系型数据库 MySQL Linux
Linux联网安装MySQL Server
Linux联网安装MySQL Server
13 0
|
10天前
|
Java Linux 开发工具
linux jdk的安装
linux jdk的安装
16 0