苦逼纪念品--配置bugzilla时碰到的问题
1.配置bugzilla完成时运行checksetup.pl时遇到的问题:
如图所示:
文字版如下所示:
There was an error connecting to MySQL install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted. Compilation failed in require at (eval 1368) line 3, <DATA> line 558.at Bugzilla/DB.pm line 1284 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 'root' 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.
解决方法:
1.卸载DBD-mysql(我的Linux是CentOS 6.1):
yum remove perl-DBD-MySQL
2.重新安装DBD-MySQL(perl路径具体参考自己电脑的配置)
./checksetup.pl #检查发现系统缺少DBD-mysql
/usr/bin/perl install-module.pl DBD::mysql #安装缺少的模块
3.重新检查(当前路径在bugzilla目录下面)
./checksetup.pl
附注:
这个问题让蜗牛纠结了一天,具体原因还是没弄清楚,在参考文章中也只粗略的说了下DBD-mysql有错误,重安装即可
--“That means something is wrong with your DBD-mysql.Perhaps try removing that package and re-installing it.”
参考文章:http://logbot.glob.com.au/?c=mozilla%23bugzilla&s=31+Dec+08&e=31+Dec+08
2.调皮的/etc/resolv.conf
配置bugzilla肯定要先摆平DNS,新的问题就出在DNS上,它的一个配置文件/etc/resolv.conf在每次网络或者系统重启之后总会还原。
每次都要手动修改对于蜗牛来讲真的是。。。
解决方法
1.打开/etc/sysconfig/network-scripts/ifcfg-eth0,同样,可以修改eth1
vim /etc/sysconfig/network-scripts/ifcfg-eth0
2.将里面DNS1的值设为自己的想要设置的IP
DNS1=192.168.1.111 #假设蜗牛的DNS服务器IP为192.168.1.111
3.若想设置备用的DNS,则添加DNS2如同DNS1一般设置
DNS2=111.11.1.11 #只是举例,如有雷同,真不负责
4.重启网络
/etc/init.d/network restart
附注:
此方法仅在CentOS 6.0下试过。其它系统没有具体操作过
具体原因根据参考文章所说:直接修改/etc/resolv.conf这个文件是没用的,网络服务重启以后会根据/etc/sysconfig /network-scripts/ifcfg-eth0来重载配置
参考文章:http://www.qianshoublog.com/post/3121.html
3.每次打开bugzilla总看到源代码在首页OTL
终于历经九九八十一难来到了西天,你以为这样佛祖就轻易现身了?NO NO NO,蜗牛错就错在想的太简单了(T_T)
一打开首页一片密密麻麻的源代码有木有!!
度娘谷哥一个个都在一边看热闹有木有!!!!
结果错误很愚蠢。。。废话不多说,看笑话吧
如图所示:
文字版如下:
#!/usr/bin/perl -wT # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Jacob Steenhagen <jake@bugzilla.org> # Frédéric Buclin <LpSolit@gmail.com> ############################################################################### # Script Initialization ############################################################################### # Make it harder for us to do dangerous things in Perl. use strict; # Include the Bugzilla CGI and general utility library. use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; use Bugzilla::Error; use Bugzilla::Update; # Check whether or not the user is logged in my $user = Bugzilla->login(LOGIN_OPTIONAL); my $cgi = Bugzilla->cgi; my $template = Bugzilla->template; my $vars = {}; # And log out the user if requested. We do this first so that nothing # else accidentally relies on the current login. if ($cgi->param('logout')) { Bugzilla->logout(); $user = Bugzilla->user; $vars->{'message'} = "logged_out"; # Make sure that templates or other code doesn't get confused about this. $cgi->delete('logout'); } ############################################################################### # Main Body Execution ############################################################################### # Return the appropriate HTTP response headers. print $cgi->header(); if ($user->in_group('admin')) { # If 'urlbase' is not set, display the Welcome page. unless (Bugzilla->params->{'urlbase'}) { $template->process('welcome-admin.html.tmpl') || ThrowTemplateError($template->error()); exit; } # Inform the administrator about new releases, if any. $vars->{'release'} = Bugzilla::Update::get_notifications(); } # Generate and return the UI (HTML page) from the appropriate template. $template->process("index.html.tmpl", $vars) || ThrowTemplateError($template->error());
解决如下:
先执行下面所写的配置:
1、打开注释 AddHandler cgi-script .cgi
2、httpd.conf中配置
<Directory /var/www/html/bugzilla>
Options ExecCGI FollowSymLinks
AllowOverride Limit
DirectoryIndex index.cgi
Order allow,deny
Allow from all
Require all Granted #此处仅对于Apache版本为2.4.X
</Directory>
3.重启Apache
如果到这里,依旧解决不了时,那就说明你和蜗牛犯了一样的错误,哈哈哈哈,那就参考下蜗牛的方法吧~
1.如果Apache的版本比较新的话,就将配置.文件(CentOs的话在/etc/httpd/下)httpd.conf中的大约第139行前的#去掉,即取消注释
LoadModule cgid_module modules/mod_cgid.so
2.如果是比较旧的版本的话就将LoadModule cgi_module li bexec/mod_cgi.so所在行取消注释
当然最后不要忘记重启Apache
附注:
因蜗牛手动安装的Apache,所以默认cgi模块没有启用。。。觉得自己简直无敌了