Bugzilla (bug库搭建)
先贴一下官网地址,在网上看好多教程都出问题,还是官网最可靠。(战斗吧少年)
Bugzilla如何配置
Bugzilla官网
1.1 环境配置(局域网bug库+可以移植性比较强)
- 操作系统:mac
- 虚拟机: vmware funsion + ubuntu_server(14.05)
- Bugzilla 5.0
1.2 具体配置
步骤-1-安装虚拟机:
在vmvare中安装虚拟机:我使用的ubuntu-server 14.04.iso(不会安装要百度一下,安装的时候使用桥接,否则会没有网卡配置,可能还会安装不好部分模块)。
步骤-2-使用超级权限:
使用超级权限
sudo su
步骤-3-安装相关组件:
apt-get install git nano
apt-get install apache2 mysql-server libappconfig-perl libdate-calc-perl libtemplate-perl libmime-perl build-essential libdatetime-timezone-perl libdatetime-perl libemail-sender-perl libemail-mime-perl libemail-mime-modifier-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl apache2-mpm-prefork libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libfile-slurp-perl libencode-detect-perl libmodule-build-perl libnet-ldap-perl libauthen-sasl-perl libtemplate-perl-doc libfile-mimeinfo-perl libhtml-formattext-withlinks-perl libgd-dev libmysqlclient-dev lynx-cur graphviz python-sphinx
步骤-4-下载Bugzilla:
cd /var/www/html
git clone --branch release-5.0-stable https://github.com/bugzilla/bugzilla bugzilla
步骤-5-下载配置mysql:
vi /etc/mysql/my.cnf
- 改一下 52行: max_allowed_packet=100M
- 改一下 32行,in the [mysqld] section: ft_min_word_len=2
- 进入mysql:
mysql -u root -p
- 创建mysql:数据库bugs::
mysql > create database bugs;
- 分配权限和用户:
grant all on bugs.* to root@localhost identified by "mypassword";
- 退出mysql
- 重启mysql
service mysql restart
步骤-6-下载配置apache2:
vi /etc/apache2/sites-available/bugzilla.conf
这个文件不一定有,因该是是有一个default.conf复制一份使用,并追加内容
ServerName localhost
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride All
</Directory>
然后执行这个指令
a2ensite bugzilla
a2enmod cgi headers expires
service apache2 restart
步骤-7-检查一下:
cd /var/www/html/bugzilla
./checksetup.pl
步骤-8-编辑一下本地配置:
vi localconfig
编辑 29行: set $webservergroup to www-data
编辑 67行(密码是你之前设置的密码): set $db_pass to the password for the bugs user you created in MySQL a few steps ago
步骤-9-检查一下:
这一步会让你输入用户名和密码,一定要输入正确,这是你创建的管理员用户
./checksetup.pl
步骤-10-测试一下服务器:
./testserver.pl http://localhost/bugzilla
步骤-11-查看网页能否出来:
lynx http://localhost/bugzilla
步骤-12-配置Bugzilla:
urlbase:http://<ip address>/bugzilla/
mail_delivery_method(smtp邮箱): SMTP
mailfrom(smtp用户密码): new_gmail_address@gmail.com
smtpserver(smtp服务器): smtp.gmail.com:465
smtp_username(smtp服务邮箱一般是你创建超级用户的密码): new_gmail_address@gmail.com
smtp_password(授权码): new_gmail_password
smtp_ssl: On
可能出现的问题,
- ssl使用失败,需要升级模块,ssl
- 部分模块安装失败,需要调成桥接模式
- 出现部分乱码,需要安装中文支持模块
- 设置时出错,需要手动找到文件设置邮箱
/var/html/bugzilla/data/params.json