因为最近发现几年前写的安装Bugzilla
的文章有点过时了,所以重新写了一份完整的,安装时发现和原来的版本有了一点小小的变化。
环境: Ubuntu 18.04 LTS
Bugzilla 5.0.4
1、安装apache2
apt-get install apache2
2、安装mysql
apt-get install mysql-server mysql-client
创建数据表并赋予权限
root@test:/home/test# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.24-0ubuntu0.18.04.1 (Ubuntu)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database bugs;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on bugs.* to root@localhost identified by "123456";
Query OK, 0 rows affected (0.01 sec)
3、从bugzilla
下载文件,解压并拷贝到/var/www/html/bugzilla
目录,执行命令perl checksetup.pl
,可以看到需要的模块列表以及描述信息。
root@test:/var/www/html/bugzilla# perl checksetup.pl
* This is Bugzilla 5.0.4 on perl 5.26.1
* Running on Linux 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018
Checking perl modules...
Checking for CGI.pm (v3.51) ok: found v4.38
Checking for Digest-SHA (any) ok: found v5.96
Checking for TimeDate (v2.23) ok: found v2.24
Checking for DateTime (v0.75) not found
Checking for DateTime-TimeZone (v1.64) not found
Checking for DBI (v1.614) not found
Checking for Template-Toolkit (v2.24) not found
Checking for Email-Sender (v1.300011) not found
Checking for Email-MIME (v1.904) not found
Checking for URI (v1.55) ok: found v1.73
Checking for List-MoreUtils (v0.32) ok: found v0.416
Checking for Math-Random-ISAAC (v1.0.1) not found
Checking for JSON-XS (v2.01) not found
Checking available perl DBD modules...
Checking for DBD-Oracle (v1.19) not found
Checking for DBD-SQLite (v1.29) not found
Checking for DBD-Pg (v2.7.0) not found
Checking for DBD-mysql (v4.001) not found
The following Perl modules are optional:
.........
从列出的信息中看到安装模块的方法,可以通过这两条命令安装:
/usr/bin/perl install-module.pl GD //安装指定的模块
//或
/usr/bin/perl install-module.pl --all //安装所有缺失模块,需要安装gcc 和 make
//( apt-get install gcc make )
如果要使用 mysql
数据库,需要先安装开发包,才能安装DBD::mysql
模块:
apt-get install libmysqld-dev libmysqlclient-dev
4、按照你的数据库设置,修改配置文件Bugzilla
的vi localconfig
5、修改完之后,重新执行perl checksetup.pl
,就会对数据库做一系列操作,并提示设置管理员用户。
6、修改apache2
配置文件,vi /etc/apache2/apache2.conf
添加cgi.load
到mods-enabled
,使用命令创建cgi
模块的软链接:
ln -s ../mods-available/cgi.load cgi.load
编辑Bugzilla
目录下的.htaccess
文件,用“#”
注释掉文件开始部分的“Options -Indexes”
这一行
7、重启apache2
,就可以看到Bugzilla
的界面了。
附:
修改mysqly用户密码:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY'newpassword';