Linux系统下Bugzilla的安装与配置详解.doc_第1页
Linux系统下Bugzilla的安装与配置详解.doc_第2页
Linux系统下Bugzilla的安装与配置详解.doc_第3页
Linux系统下Bugzilla的安装与配置详解.doc_第4页
Linux系统下Bugzilla的安装与配置详解.doc_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Linux系统下Bugzilla的安装与配置提示:本文档是以Red Hat Enterprise Linux 5 为例,配置过程细节方面的东西很多,无法一一赘述,请根据实际情况酌情处理。详细软件版本:Bugzilla 3.1.3Bugzilla汉化包3.1.2(找汉化包时最好找同版本或相近版本的,如果版本跨度太大可能会出现问题)其他用系统自带的即可一、配置网卡、安装必须组件2二、安装Apache2三、配置Apache2四、安装MySQL3五、配置MySQL4六、安装Sendmail4七、配置Sendmail4八、安装、配置Bugzilla4九、其他修改及配置5附件:Linux下一步步安装Bugzilla(英文)5完成时间:2010-10-26整理:一、配置网卡、安装必须组件1. 判断网卡是否启动。在命令行输入:ifconfig启动网络配置向导。在命令行输入:setup 配置网卡和DNS2. 修改主机名(可选)(1)进入/etc/sysconfig目录,执行: cd /etc/sysconfig(2)打开network文件,执行: vi network(3)修改“HOSTNAME=”,“=”后输入新的Linux主机的名字,注意避免与网络上的其他计算机重名,建议使用“PC-XXX”作为计算机名。重新启动网络配置。执行:service network restart或 /etc/rc.d/init.d/network restart3. 启动防火墙,禁用SELinux,在定制中放行网卡、WWW (HTTP)和邮件 (SMTP)4. 安装必须的组件 yum install gcc-4.1.2-44.el5.i386.rpmyum install gd-2.0.33-9.4.el5_1.1.i386.rpmyum install gd-devel-2.0.33-9.4.el5_1.1.i386.rpmyum install ImageMagick--4.el5_1.1yum install ImageMagick-c+-devel--4.el5_1.1yum install ImageMagick-devel--4.el5_1.1yum install ImageMagick-c+--4.el5_1.1yum install ImageMagick-perl--4.el5_1.1yum install expat-1.95.8-8.2.1.i386.rpm yum install expat-devel-1.95.8-8.2.1.i386.rpm二、安装Apache1. 检查是否安装了httpd服务rpm -qa httpd 如果没有出现任何信息,表示没有安装2. 安装httpd服务(1)(如果你的yum库是ftp模式,此步骤就不需要了)/mnt目录下创建cdrom目录挂载光驱mount -t iso9660 /dev/cdrom /mnt/cdrom(2)yum install httpd-2.2.3-22.el5.i386.rpm 安装过程中会提示依赖的包,输入y同意即可,下同三、配置Apache1. 修改配置文件apache 的配置文件为/etc/httpd/conf/httpd.conf进入/etc/httpd/conf 目录,编辑httpd.conf 文件,命令:vi httpd.conf在命令状态下,输入:/ServerName查找 ServerName 字符串,找到如下串:ServerName :80在该行的下一行添加一行:ServerName 10 : 80【说明】10 为linux 虚拟机的IP 地址。2. 在命令状态,输入:/DocumentRoot找到DocumentRoot /var/www/html,注释掉这一行,即最前面加上#在下一行添加 DocumentRoot /usr/local【说明】指定Apache 服务器存放网页的根目录,引号中的内容为Bugzilla 的安装路径3. 找到 DirectoryIndex在这一行加上:index.cgi把它放在第一位,即:DirectoryIndex index.cgi index.html index.html.var【说明】因为Bugzilla 的首页为index.cgi,当我们访问Bugzilla 服务器时,就会返回这个主页。4. 找到 #AddHandler cgi-script .cgi去掉前面的 #【说明】把cgi 文件当作程序运行,而不是当作文本文件显示5. 在命令状态,输入 /Directory找到如下内容:Options FollowSymLinksAllowOverride None每行前面添加#,把这四行内容注释掉,否则会禁止访问Bugzilla 的页面。保存并退出6. 重新启动httpdservice httpd restart如果出现如下提示信息:Stopping httpd: OK Starting httpd: OK 则表明启动成功。四、安装MySQL1. mysql 依赖于三个安装包,分别安装:yum install mysql-5.0.45-7.el5.i386.rpmyum install mysql-server-5.0.45-7.el5.i386.rpmyum install mysql-devel-5.0.45-7.el5.i386.rpm2. 启动mysqlservice mysqld start 或 /etc/rc.d/init.d/mysql start五、配置MySQL1. 连接到mysql,这时密码是空的,输入mysql回车可直接进入命令行输入:mysql出现”mysql”输入: set password for rootlocalhost=password(123456);【说明】绿色部分是你要为root用户设置的密码2. 退出mysql,用新密码重新登录测试mysql是否可用输入:exit;注销root的登录输入:mysql u root p 回车这时要求输入密码:键入123456并回车登录成功3. 创建bugs数据库create database bugs;4. 创建bugs用户d,赋予所有权限格式为:grant 权限1,权限2,权限n on 数据库名称.表名称 to 用户名用户地址 identified by 连接口令;grant all privileges on bugs.* to bugslocalhost identified by 123456;(上句的*表示bugs数据库的所有表)5. 把数据写入到数据库flush privileges;6. 退出数据库六、安装Sendmail1. 必须先搭建DNS,此步骤省略(这部分网上有很多教程,这里就不多说了,大家自己弄吧)2. 安装semdmail,此步骤省略七、配置Sendmail此步骤省略八、安装、配置Bugzilla1. 将bugzilla-3.1.3解压至/usr/local/并改名为bugzilla,在local目录下输入:mv bugzilla-3.1.3 bugzilla2. 在自己的Bugzilla 安装路径下(如本例为/usr/local/bugzilla 目录),找到文件 localconfig,编辑:vi localconfig找到:$index_html=0改为:$index_html=1这样会生成一个index.html 文件,该文件指向index.cgi3将对应的用户改为root 密码是前面设置的123456 保存退出3. 进入bugzilla目录执行检查,输入:./checksetup.pl输入:/usr/bin/perl install-module.pl -all 一次安装所有的模块(若此过程中出现异常,可能是gcc、gd、gd-devel等必须的包没有安装成功,也有可能是网络状况不好)4. 待所有模块安装完成后,再次运行 ./checksetup.pl这时bugzilla目录下会出现localconfig文件,输入命令:vi localconfig这里需要填上前面设置好的mysql数据库用户名和密码,即用户:bugs 密码:1234565. 再次运行 ./checksetup.pl这时程序会自动在bugs数据库中创建很多表,完成后按提示输入管理员邮箱和密码即可。6. 将汉化包复制到bugzilla/template解压unzip bugzilla-3.1.2-cn.zip把解压出来的cn目录复制到bugzilla/template九、其他修改及配置1. 启动apache:service httpd start 或 /etc/rc.d/init.d/httpd restart2. 给bugzilla目录赋予权限chomd R 777 bugzilla注意:一定要有参数R,对bugzilla所在的根路径及其下面的子路径设置权限。注意:一定要有参数R,对bugzilla所在的根路径及其下面的子路径设置权限3. 启动mysql(可能前面已经启动了,此步骤就不需要了)service mysqld restart4. 现在就可以启动浏览器了,在客户机输入这个服务器的IP地址即可,如果出现问题,一般根据提示就可大致判断,实在解决不了就和其他同学讨论或百度一下,要相信你遇到的问题别人一定也遇到过。附件:Linux下一步步安装Bugzilla(英文)(提示:很多安装模块中的问题都可以在这里找到答案)Step-by-Step Bugzilla Installation Guide for LinuxBugzilla is the best open source bug tracking system. Very simple to use with lot of features. Bugzilla allows you to track the bugs and collaborate with developers and other teams in your organization effectively.This is a detailed step-by-step bugzilla installation guide for Linux.1. Verify Perl VersionMake sure your perl version is = 5.8.1 as shown below.# perl -vThis is perl, v5.8.8 built for i386-linux-thread-multiMost Linux distributions comes with perl. If you dont have it on yours, download and install it from corresponding distribution website.2. Install MySQL DatabaseMake sure your MySQL version is = 4.1.2 as shown below.# mysql -Vmysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1If you dont have mysql, install it as using yum groupinstall, or based on LAMP installarticle, or based on mysql rpmarticle.3. Install ApacheIf you already have apache installed, make sure you are able to access it by using http:/your-ip-address.If you dont have apache, install is using yum based on LAMP install article, or install apache from source.4. Download latest Bugzilla tar ballDownload the latest stable release frombugzilla download page. Extract the bugzilla*.tar.gz file to the apache document root directory as shown below.# cd # wget /pub//webtools/bugzilla-3.6.tar.gz# cd /var/www/html# tar xvfz /usr/save/bugzilla-3.4.6.tar.gz5. Execute the bugzilla checksetup.plBugzilla checksetup.pl program will verify whether all the required perl modules are installed. This will also display a list of all missing bugzilla modules that needs to be installed.You can run the checksetup.pl program as many times as you like until youve verified all the required perl modules are installed.Following is the output of 1st run of checksetup.pl, where is has listed all the missing optional and required modules.# cd /var/www/html/bugzilla-3.4.6# ./checksetup.pl -check-modulesCOMMANDS TO INSTALL OPTIONAL MODULES:GD: /usr/bin/perl install-module.pl GDChart: /usr/bin/perl install-module.pl Chart:BaseTemplate-GD: /usr/bin/perl install-module.pl Template:Plugin:GD:ImageGDTextUtil: /usr/bin/perl install-module.pl GD:TextGDGraph: /usr/bin/perl install-module.pl GD:GraphXML-Twig: /usr/bin/perl install-module.pl XML:TwigMIME-tools: /usr/bin/perl install-module.pl MIME:Parserlibwww-perl: /usr/bin/perl install-module.pl LWP:UserAgentPatchReader: /usr/bin/perl install-module.pl PatchReaderPerlMagick: /usr/bin/perl install-module.pl Image:Magickperl-ldap: /usr/bin/perl install-module.pl Net:LDAPAuthen-SASL: /usr/bin/perl install-module.pl Authen:SASLRadiusPerl: /usr/bin/perl install-module.pl Authen:RadiusSOAP-Lite: /usr/bin/perl install-module.pl SOAP:LiteHTML-Parser: /usr/bin/perl install-module.pl HTML:ParserHTML-Scrubber: /usr/bin/perl install-module.pl HTML:ScrubberEmail-MIME-Attachment-Stripper: /usr/bin/perl install-module.pl Email:MIME:Attachment:StripperEmail-Reply: /usr/bin/perl install-module.pl Email:ReplyTheSchwartz: /usr/bin/perl install-module.pl TheSchwartzDaemon-Generic: /usr/bin/perl install-module.pl Daemon:Genericmod_perl: /usr/bin/perl install-module.pl mod_perl2YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which database you use):PostgreSQL: /usr/bin/perl install-module.pl DBD:PgMySQL: /usr/bin/perl install-module.pl DBD:mysqlOracle: /usr/bin/perl install-module.pl DBD:OracleCOMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands and then re-run checksetup.pl):/usr/bin/perl install-module.pl CGI/usr/bin/perl install-module.pl Digest:SHA/usr/bin/perl install-module.pl Date:Format/usr/bin/perl install-module.pl DateTime/usr/bin/perl install-module.pl DateTime:TimeZone/usr/bin/perl install-module.pl Template/usr/bin/perl install-module.pl Email:Send/usr/bin/perl install-module.pl Email:MIME/usr/bin/perl install-module.pl Email:MIME:Encodings/usr/bin/perl install-module.pl Email:MIME:Modifier/usr/bin/perl install-module.pl URITo attempt an automatic install of every required and optional module with one command, do:/usr/bin/perl install-module.pl -all6. Execute bugzilla install-module.plAs suggested by the output of the checksetup.pl, you can execute the install-module.pl to install all bugzilla required and optional perl modules.# /usr/bin/perl install-module.pl -allPlease review the output of the above install-module.pl to make sure everything got install properly. There is a possibility that some of the modules failed to install (may be because some required OS packages were missing).Execute the checksetup.pl to verify whether all the modules got installed properly.Following is the output of 2nd run of the checksetup.pl:# ./checksetup.pl -check-modulesCOMMANDS TO INSTALL OPTIONAL MODULES:GD: /usr/bin/perl install-module.pl GDChart: /usr/bin/perl install-module.pl Chart:BaseTemplate-GD: /usr/bin/perl install-module.pl Template:Plugin:GD:ImageGDTextUtil: /usr/bin/perl install-module.pl GD:TextGDGraph: /usr/bin/perl install-module.pl GD:GraphXML-Twig: /usr/bin/perl install-module.pl XML:TwigPerlMagick: /usr/bin/perl install-module.pl Image:MagickSOAP-Lite: /usr/bin/perl install-module.pl SOAP:Litemod_perl: /usr/bin/perl install-module.pl mod_perl2YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which databaseyou use):PostgreSQL: /usr/bin/perl install-module.pl DBD:PgMySQL: /usr/bin/perl install-module.pl DBD:mysqlOracle: /usr/bin/perl install-module.pl DBD:Oracle7. Install missing Perl ModulesAs we see from the above checksetup.pl output, some of the optional modules and required module installed was not completed when we ran the install-module.pl.So, we have to install the missing modules manually one-by-one to figure out the issues and fix it one-by-one.Refer to the “Troubleshooting Section” at the end for list of all the issues that I faced while installing the perl modules required for bugzilla (along with the solution on how to fix those issues).8. Final checksetup.pl check-modules verificationExecute checksetup.pl check-modules again as shown below as final verification to make sure all the modules got installed successfully.# ./checksetup.pl -check-modules* This is Bugzilla 3.4.6 on perl 5.8.8* Running on Linux 2.6.18-164.el5PAE #1 SMP Thu Sep 3 04:10:44 EDT 2009Checking perl modules.Checking for CGI.pm (v3.21) ok: found v3.49Checking for Digest-SHA (any) ok: found v5.48Checking for TimeDate (v2.21) ok: found v2.24Checking for DateTime (v0.28) ok: found v0.55Checking for DateTime-TimeZone (v0.71) ok: found v1.17Checking for DBI (v1.41) ok: found v1.52Checking for Template-Toolkit (v2.22) ok: found v2.22Checking for Email-Send (v2.00) ok: found v2.198Checking for Email-MIME (v1.861) ok: found v1.903Checking for Email-MIME-Encodings (v1.313) ok: found v1.313Checking for Email-MIME-Modifier (v1.442) ok: found v1.903Checking for URI (any) ok: found v1.54 Checking available perl DBD modules.Checking for DBD-Pg (v1.45) not foundChecking for DBD-mysql (v4.00) ok: found v4.013Checking for DBD-Oracle (v1.19) not found The following Perl modules are optional:Checking for GD (v1.20) ok: found v2.44Checking for Chart (v1.0) ok: found v2.4.1Checking for Template-GD (any) ok: found v1.56Checking for GDTextUtil (any) ok: found v0.86Checking for GDGraph (any) ok: found v1.44Checking for XML-Twig (any) ok: found v3.34Checking for MIME-tools (v5.406) ok: found v5.427Checking for libwww-perl (any) ok: found v5.834Checking for PatchReader (v0.9.4) ok: found v0.9.5Checking for PerlMagick (any) ok: found v6.2.8Checking for perl-ldap (any) ok: found v0.4001Checking for Authen-SASL (any) ok: found v2.1401Checking for RadiusPerl (any) ok: found v0.17Checking for SOAP-Lite (v0.710.06) ok: found v0.711Checking for HTML-Parser (v3.40) ok: found v3.65Checking for HTML-Scrubber (any) ok: found v0.08Checking for Email-MIME-Attachment-Stripper (any) ok: found v1.316Checking for Email-Reply (any) ok: found v1.202Checking for TheSchwartz (any) ok: found v1.10Checking for Daemon-Generic (any) ok: found v0.61Checking for mod_perl (v1.999022) ok: found v2.0000049. Create localconfig file using checksetup.plExecute checksetup.pl without any argument, which will create a localconfig file in the current directory. The localconfig file contains the key configuration parameters used by the bugzilla (for example, mysql db username and password).# ./checksetup.plReading ./localconfig.This version of Bugzilla contains some variables that you may want tochange and adapt to your local settings. Please edit the file./localconfig and rerun checksetup.pl.The following variables are new to ./localconfig since you last ranchecksetup.pl: create_htaccess, webservergroup, db_driver, db_host, db_name, db_user, db_pass, db_port, db_sock, db_check, index_html, cvsbin, interdiffbin, diffpath, site_wide_secret10. Modify the localconfig file.The only thing you need to modify the localconfig file is MySQL database db password by changing the $db_pass variable as shown below.# vi ./localconfig$db_pass = Bugs4All;11. Modify /etc/f to increase bugzilla attachment sizeSet the max_allowed_packet to 4M in the /etc/f to increase bugzilla attachment size.# cat /etc/fmysqlddatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockuser=mysql# Default to using old password format for compatibility with mysql 3.x# clients (those using the mysqlclient10 compatibility package).old_passwords=1# Disabling symbolic-links is recommended to prevent assorted security risks;# to do so, uncomment this line:# symbolic-links=0# Allow packets up to 4MBmax_allowed_packet=4Mmysqld_safelog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidRestart the mysqld after this change.# service mysqld restart12. Create bugs mysql userAdd bugzilla user (bugs) to the mysql database as shown below.# mysql -u root -pmysql GRANT SELECT, INSERT,UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.*TO bugslocalhost IDENTIFIED BY Bugs4All;mysql FLUSH PRIVILEGES;13. Create the bugzilla databaseExecute the checksetup.pl (without any arguments) again to create the mysql bugzilla database. Since the localconfig file already exist, the second time when you execute the checksetup.pl, it will create the mysql database based on the information from localconfig file.# ./checksetup.pl Creating database bugs.Building Schema object from database.Adding new table bz_schema .Initializing the new Schema storage.Adding new table attach_data .Adding new table attachments .Adding new table bug_group_map .Adding new table bug_see_also .Adding new table bug_severity .Adding new table bug_status .Inserting values into the priority table:Inserting values into the bug_status table:Inserting values into the rep_platform table:Creating ./data directory.Creating ./data/attachments directory.Creating ./data/duplicates directory.Adding foreign key: attachments.bug_id - bugs.bug_id.Adding foreign key: attachments.submitter_id - profiles.userid.Adding foreign key: bug_group_map.bug_id - bugs.bug_id.14. Create bugzilla administrator account.At the end of the ./checksetup.pl execution, it will detect that you dont have an adminsitrator account and request you to enter administration login information as shown below.Looks like we dont have an administrator set up yet. Either this isyour first time using Bugzilla, or your administrators privilegesmight have accidentally been deleted.Enter the e-mail address of the administrator: Enter the real name of the administrator: Ramesh NatarajanEnter a password for the administrator account: NotRealPwdPlease retype the password to verify: is now set up as an administrator.Creating default classification Unclassified.Creating initial dummy product TestProduct.Now that you have installed Bugzilla, you should visit the Parameterspage (linked in the footer of the Administrator account) to ensure itis set up as you wish - this includes setting the urlbase option tothe correct URL.15. Configure apache for mod_perlRename the bugzilla directory. (i.e remove the version number in it)# cd /var/www/html# mv bugzilla-3.4.6/ bugzillaAdd the following two lines to httpd.conf# tail -2 /etc/httpd/conf/httpd.confPerlSwitches -I/var/www/html/bugzilla -I/var/www/html/bugzilla/lib -w -TPerlConfigRequire /var/www/html/bugzilla/mod_perl.plVerify the Group in httpd.conf matches the webservergroup in localconfig# cd /var/www/html/bugzilla/# grep webservergroup localconfig$webservergroup = apache;# grep Group /etc/httpd/conf/http

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论