10-bugzila服务部署¶
简单介绍¶
用户报告软件的缺陷从而把它们转给合适的开发者,开发者使用bugzilla保持一个要做事情的优先表,还有时间表和跟踪相关性。不仅仅可以管理软件缺陷,也可以管理新需求开发、系统功能优化等
强大的检索功能
用户可以自定义搜索条件并保存,非常灵活自定义的查询
非常灵活的系统配置
一切皆可自定义,系统的流程、界面、字段、规则等等均可以自定义配置,非常强大
基于浏览器架构
采用BS架构,客户端无需安装其他软件,Apache出品的精品软件
免费缺陷跟踪工具
Bugzilla是Mozilla公司向我们提供的一个开源的免费缺陷跟踪工具。作为一个产品缺陷的记录及跟踪工具,它能够为你建立一个完善的Bug跟踪体系,包括报告Bug、查询Bug记录并产生报表、处理解决、管理员系统初始化和设置四部分
准备环境¶
1.系统环境介绍
[root@linux-node1 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@linux-node1 ~]# hostname -I
10.0.0.111
[root@linux-node1 ~]# uname -r
3.10.0-327.28.2.el7.x86_64
[root@linux-node1 ~]# hostname
linux-node1
2.配置阿里云的base源和epel源(CentOS7)
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum repolist
3.关闭 NetworkManager 和防火墙
systemctl disable firewalld && systemctl stop firewalld
systemctl disable NetworkManager && systemctl stop NetworkManager
4.关闭并确认 SELinux 处于关闭状态
快速修改的方法:
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config && grep 'SELINUX=disabled' /etc/selinux/config
setenforce 0
getenforce
软件获取¶
链接: https://pan.baidu.com/s/1uGBxKXMwxraHXbYJLFbfTw 提取码: koot
安装部署¶
1.安装相关的软件,请将一下软件都一一安装,需要安装的软件很多,可能需要一些时间
yum -y install cmake gcc gcc-c++ mariadb mariadb-server httpd libevent perl-CPAN perl-*
提示:一定要将以上所有的软件安装,不然可能会导致无法进行下面的步骤
2.启动mysql数据库。
systemctl enable mariadb
systemctl start mariadb
3.设置并初始化数据库密码
mysqladmin -uroot password "qwe123"
mysql -uroot -pqwe123
use mysql
Grant all privileges on *.* to 'root'@'%' identified by 'qwe123' with grant option;
flush privileges;
select host, user, password from user;
\4. 创建bugs数据库,并创建授权用户相关权限。
create database bugs;
show databases;
use bugs;
grant select,insert,update,delete,index,alter,create,lock tables,drop,references on bugs.* to bugs@localhost identified by '123456';
flush privileges;
5.将bugzilla-4.4.12.tar.gz上传到/usr/local/src目录下,并解压
cd /usr/local/src/
rz bugzilla-4.4.12.tar.gz #此命令可不执行
tar xf bugzilla-4.4.12.tar.gz -C /var/www/html/
cd /var/www/html/
mv bugzilla-4.4.12 bugzilla
\6. 配置bugzilla,生成localconfig文件
[root@linux-node1 ~]# cd /var/www/html/bugzilla/
[root@linux-node1 bugzilla]# ./checksetup.pl
\7. 根据数据库的实际情况修改如下参数:
[root@linux-node1 bugzilla]# vim localconfig
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = '123456';
$db_port = 3306;
$index_html = 1;
8.执行./checksetup.pl写入数据库配置
[root@linux-node1 bugzilla]# chmod -R 777 /var/www/html/bugzilla/
[root@linux-node1 bugzilla]# ./checksetup.pl
Enter the e-mail address of the administrator: admin@qq.com #设置邮箱
Enter the real name of the administrator: admin #设置用户
Enter a password for the administrator account: 123456 #设置密码
Please retype the password to verify: 123456 #确认密码
admin@qq.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.
checksetup.pl complete.
生产环境配置
Enter the e-mail address of the administrator: li_xiang@chinatelecom.cn
Enter the real name of the administrator: admin
Enter a password for the administrator account: 123456
Please retype the password to verify: 123456
838997384@qq.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.
checksetup.pl complete.
9.配置apache的配置文件
[root@linux-node1 ~]# vim /etc/httpd/conf/httpd.conf
#在 httpd.conf 中添加(或者去除注释)以下这一行:
AddHandler cgi-scrīpt .cgi
#到 httpd.conf 中 DirectoryIndex 那一行,修改为:
DirectoryIndex index.html index.html.var index.cgi
#指定Bugzilla的访问目录,在最后添加:
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes
</Directory>
10启动httpd服务
systemctl enable httpd
systemctl start httpd
11.将.htaccess文件移动到/opt目录下
mv /var/www/html/bugzilla/.htaccess /opt/
12.打开浏览器输入http://192.168.56.111/bugzilla/即可访问
汉化教程¶
最后就是汉化bugzilla不过你不想汉化也没有问题。
将汉化包解压解压到cn文件夹,将整个文件目录 cn 拷贝至 Bugzilla 的子目录 template下;然后以管理员身份登录Bugzilla,点击页脚的 Parameters(系统参数设置)链接,将 languages 一项的值改为 cn,保存,则以后见到的Bugzilla页面就是汉语页面了。如果想返回英文界面,将 cn 改回 en 即可。为保证向后兼容,汉化的文件全部存为 UTF-8 格式。但不管你是否汉化Bugzilla,为强迫Bugzilla采用UTF-8来处理字符串,避免Bugzilla偶然出现的乱码,强烈建议大家将文件 安装目录>\Bugzilla\CGI.pm 的第55行改为 $self->charset('UTF-8')。汉化包的具体下载你可以在http://bugzilla.org/download.html 里找到相应的bugzilla汉化包。
[root@10-0-192-50 bugzilla]# cd /usr/local/src/
[root@10-0-192-50 src]# unzip default.zip
[root@10-0-192-50 src]# cp -ra default /var/www/html/bugzilla/template/
[root@10-0-192-50 src]# ll /var/www/html/bugzilla/template/
total 4
drwxr-xr-x 17 root root 4096 Sep 6 2012 default
drwxr-x--- 3 root apache 21 May 17 2016 en