Bugzilla安装与配置
1.安装依赖
yum install mysql
yum install mysql-devel yum install perl
2.解压bugzilla
tar xzf bugzilla-3.6.3.tar.gz
利用checksetup.pl脚本检查所需perl模块是否齐全
cd bugzilla-3.6.3
./checksetup.pl --check-modules
/usr/bin/perl install-module.pl --all
如果在安装中出现YAML version is too low ?的错误,解决办法如下: vi ./bugzilla-3.6.3/lib/CPAN.pm,在第59行之后加入 “use YAML;”再执行安装。
3.创建mysql数据库
/etc/init.d/mysqld start
/usr/bin/mysqladmin -u root password '123456' mysql –uroot –p
create database bugs;
4.修改bugzilla配置文件
Vi ./bugzilla-3.6.3/localconfig 设置如下参数:
$db_driver = 'mysql'; $db_host = 'localhost'; $db_name = 'bugs'; $db_user = '';
$db_pass = '********';
5.执行安装,并设置管理员的登录邮箱、密码、用户名
./checksetup.pl
Enter the e-mail address of the administrator: comebackdog@gmail.com Enter the real name of the administrator: renliang Enter a password for the administrator account: Please retype the password to verify:
comebackdog@gmail.com 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.
6.http server服务器的配置
1.mv ./bugzilla-3.6.3 /var/www/html/bugs 2.httpd.conf配置文件,添加如下内容
AddHandler cgi-script .cgi Options +Indexes +ExecCGI DirectoryIndex index.cgi AllowOverride Limit
改完之后重启Server
7.邮件设置
Administration?Parameters?email,进行如下设置:
7.关于邮件发不出的定位方法:
1、The new value for smtp_username is invalid: SMTP Authentication is not available. Run checksetup.pl for more details. 这是我在Bugzilla中Create New Account的时候发验证邮件时产生的,这个的原因是Perl有个模块没有安装,安装下就可以了 sudo perl install-module.pl Authen::SASL
自己先可以通过$ ./checksetup.pl –check-modules查看下已经安装了哪些模块
只要安装好,上述的这个问题就解决了
2、提示邮件成功发送,但是实际邮件没有发送出去,因为我填的邮箱没有收到邮件
在这里我原先是开启了use_mailer_queue这个功能
于是我选择使用Test模式(Parameters -> Email -> mail_delivery_method -> SMTP)再发了一次,mailer.testfile木有邮件
网 络上有人和我是一样的问题,发不出去邮件,我参看这里http://hi.http://www.njliaohua.com//ever__love/blog/item
/62473a9772800846d0135e2c.html的方法,把use_mailer_queue关闭
(Parameters -> Email -> use_mailer_queue -> Off),再试着发送一次,果真mailer.testfile当中有邮件了
这样就基本定位到问题use_mailer_queue没有正常工作
于是又把use_mailer_queue开启 执行下面的命令
$ $BUGZILLA_HOME/jobqueue.pl check Configuration looks okay
jobqueue.pl running – pid 5317 9 jobs in the queue.
看起来似乎正常,但是提示9 jobs in the queue,并且这个数目一直没有减少,这说明邮件几乎都被堵塞在这里了,而并没有发出去
于是又Debug发现
$ $BUGZILLA_HOME/jobqueue.pl -f -d restart(实际中我执行了该指令后邮件就发出来了) Killing 9657 Starting up?
TheSchwartz::work_once found no jobs TheSchwartz::work_once found no jobs
几乎神了,这里又说没有错误,那到底是哪里出问题了呢? 目前无解,求解ING。。。
UPDATE 后来经过分析解决了此问题
虽然debug jobqueue出来的信息开头几个没有发现什么异常,但是经过很多个“TheSchwartz::work_once found no jobs”之后出来一些错误信息,如下: ??
TheSchwartz::work_once found no jobs TheSchwartz::work_once found no jobs TheSchwartz::work_once found no jobs ??.
TheSchwartz::work_once found no jobs TheSchwartz::work_once found no jobs TheSchwartz::work_once found no jobs
TheSchwartz::work_once got job of class ‘Bugzilla::Job::Mailer’ Working on Bugzilla::Job::Mailer ?
Use of uninitialized value $hostname in concatenation (.) or string at
Bugzilla/Mailer.pm line 153.
job failed. considering retry. is max_retries of 725 >= failures of 5? job failed: There was an error sending mail from ‘bugzilla_admin@’ to ‘xxxxx@aol.com’:Can’t call method “address” on an undefined value at
lib/Email/Send/SMTP.pm line 25.
TheSchwartz::work_once found no jobs ??
TheSchwartz::work_once found no jobs
TheSchwartz::work_once got job of class ‘Bugzilla::Job::Mailer’ Working on Bugzilla::Job::Mailer ?
Use of uninitialized value $hostname in concatenation (.) or string at Bugzilla/Mailer.pm line 153.
job failed. considering retry. is max_retries of 725 >= failures of 5? job failed: There was an error sending mail from ‘bugzilla_admin@’ to ‘xxxxxx@gmail.com’:Can’t call method “address” on an undefined value
at lib/Email/Send/SMTP.pm line 25. TheSchwartz::work_once found no jobs ??
TheSchwartz::work_once found no jobs
??是我省略掉了很多这样相同的状态
看起来这个jobqueue当中的任务不是立即就执行了的,它可能是经过某种算法才执行的
否则不应该出现第一个就是“TheSchwartz::work_once found no jobs”,到后面才有任务执行的
并且进一步发现这些任务队列都是放在数据库当中的一张表(ts_job)中的,任务成功一个就把它从这张表中删除
不过此时问题还没有解决,认真看下错误,并且看了指出的错误地方的源代码,觉得应该是mailfrom填错了,可能我这里填的不完整
又打开SMTP的调试开关(Parameters -> Email -> smtp_debug -> On),这样能看到更多的详细信息,基本觉得问题就在这了
于是我填写了标准的邮件格式“username@example.com”之后再试,邮件还不没有发出去,jobqueue的的数量又增加了一个,
看来可能前面的这些包含错误信息的队列已经将后面的阻塞了,于是我试着将ts_job表当中的数据删除
truncate table ts_job; // 反正我这里是直接truncate掉了的,我不知道这里delete和truncate有没有区别
百度搜索“yundocx”或“云文档网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,云文档网,提供经典综合文库Bugzilla安装,亲自安装成功,解决发邮件问题在线全文阅读。
最新更新: