• Linux上安装Bugzilla4.4小记


    因项目需要,我受命在一台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邮件系统一切正常,估计真是连接问题。

  • 相关阅读:
    Web Designer Intern
    Internship UI/UX Web Designer
    HTML / CSS Frontend Software Engineer Internship
    CSS 07 文本
    CSS 06 背景
    CSS 05 尺寸大小
    CSS 04 注释
    CSS 03 选择器
    Why Ancient Greeks are Always Nude
    C#表示空字符
  • 原文地址:https://www.cnblogs.com/heyang78/p/3341837.html
Copyright © 2020-2023  润新知