Bugzilla 配置失败:./data/params.json 文件不存在

Bugzilla 配置失败:./data/params.json 文件不存在

我已经在 suse tumbleweed 上成功安装了 LAMP。然后我使用 yast 安装了 bugzilla。当localhost/bugzilla我将浏览器指向

Software error:

The ./data/params.json file does not exist. You probably need to run checksetup.pl. at Bugzilla/Config.pm line 341.
Compilation failed in require at /srv/www/bugzilla/index.cgi line 15.
BEGIN failed--compilation aborted at /srv/www/bugzilla/index.cgi line 15.

好的,似乎有解决办法。输入/srv/www/bugzilla然后

./checksetup.pl

但这仍然不起作用,因为反馈是:

...
***********************************************************************
* APACHE MODULES                                                      *
***********************************************************************
* Some Apache modules allow to extend Bugzilla functionalities.       *
* These modules can be enabled in the Apache configuration file       *
* (usually called httpd.conf or apache2.conf).                        *
* - mod_headers, mod_env and mod_expires permit to automatically      *
*   refresh the browser cache of your users when upgrading Bugzilla.  *
* - mod_rewrite permits to write shorter URLs used by the REST API.   *
* - mod_version permits to write rules in .htaccess specific to       *
*   Apache 2.2 or 2.4.                                                *
* The modules you need to enable are:                                 *
*                                                                     *
*    mod_headers, mod_rewrite                                         *
*                                                                     *
***********************************************************************

W Craig 告诉我这些不是 perl 模块而是 apache 模块,所以我通过以下方式启用它们

a2enmod mod_headers
a2enmod mod_rewrite

然后我跑了

localhost:/srv/www/bugzilla # ./checksetup.pl

但结果很奇怪:

* This is Bugzilla 5.0.6 on perl 5.30.1
* Running on Linux 5.8.4-1-default #1 SMP Wed Aug 26 10:53:09 UTC 2020 (64fe492)
...
Checking for           DBD-Oracle (v1.19)     not found 
...
Checking for           File-Which (any)       ok: found v1.23 
Checking for              mod_env (any)       ok 
Checking for          mod_expires (any)       ok 
Checking for          mod_headers (any)       ok 
Checking for          mod_rewrite (any)       ok 
Checking for          mod_version (any)       ok 
Undefined subroutine utf8::SWASHNEW called at Bugzilla/Util.pm line 109.
Compilation failed in require at Bugzilla/Mailer.pm line 21, <DATA> line 755.
BEGIN failed--compilation aborted at Bugzilla/Mailer.pm line 21, <DATA> line 755.
Compilation failed in require at Bugzilla/Auth.pm line 22, <DATA> line 755.
BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 22, <DATA> line 755.
Compilation failed in require at Bugzilla.pm line 23, <DATA> line 755.
BEGIN failed--compilation aborted at Bugzilla.pm line 23, <DATA> line 755.
Compilation failed in require at ./checksetup.pl line 76, <DATA> line 755.
loc

有趣的是,mod_rewrite 没有版本。缺少一个模块,auth/mailer 出现错误。

顺便说一句,我的浏览器消息没有改变。仍然./data/params.json缺失,看起来像是缺少 perl ...... 东西。;-)

好的,接下来我找到了一个网站,https://bugzilla.mozilla.org/show_bug.cgi?id=1588175,描述了我的第一个错误。他们建议注释掉 /srv/www/bugzilla/Bugzilla/Util.pm:$var =~ tr/\x{202a}-\x{202e}//d; 这样可以改善情况。

好的,仍然

There was an error connecting to MySQL:
    Access denied for user 'bugs'@'localhost'                                                                                        

这让我想到,我从来没有定义过这样的用户。因此我登录mysql -u root并定义了一个用户:

CREATE USER 'bugs'@localhost IDENTIFIED BY 'bugs';
GRANT ALL PRIVILEGES ON *.* TO 'bugs'@localhost;

然后我再次尝试...这次:

There was an error connecting to MySQL:
    Access denied for user 'bugs'@'localhost' (using password: NO)                                                                                         

啊,清楚了,我必须指定密码。所以我照做了,vi localconfig并更正了$db_pass = 'bugs';。然后又./checksetup.pl。这次输出了很多。但最后一行还是不行:

There is no such group: apache. Check your $webservergroup setting in
./localconfig.

现在ps aux | grep apache发现 apache 有登录名wwwrun ,我发现它是成组的wwwrunwww。我尝试在中输入第一个./localconfig,即替换 $webservergroup = 'apache';$webservergroup = 'wwwrun'; (当然,注释掉,而不仅仅是更改。)

好的,我再次尝试./checksetup.pl,这次我被要求输入很多信息,例如电子邮件地址和邮件密码......最后checksetup.pl complete

这次在浏览器中重新加载 http://localhost/bugzilla/ 会显示一些不同的东西:

You don't have permission to access the requested directory. 
There is either no index document or the directory is read-protected. 

啊,我有

drwxr-x--- 1 root wwwrun 2076 Sep 10 21:07 bugzilla

这看起来没问题,而且我里面有一个 index.cgi:

-rwxr-x--- 1 root wwwrun 2171 Aug 25 19:42 index.cgi

现在我想检查一下/var/log/apache2/error_log ,最后几行是

[Thu Sep 10 21:11:07.869216 2020] [core:crit] [pid 17926] (13)Permission denied: [client ::1:34306] AH00529: /srv/www/bugzilla/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/srv/www/bugzilla/' is executable

啊!是 .htaccess。我发现./checksetup.pl在子目录中创建了所有 .htaccess,但在基础目录中没有。在基础目录中,该文件丢失了!!!!即使我从子目录中复制,也无法运行 bugzilla...

我能做些什么????

答案1

列出的模块是 Apache 模块,而不是 perl 模块。

使用 a2enmod 来启用它们。

相关内容