Locations of visitors to this page

Sunday, January 4, 2009

installing bugzilla on centos - centos上安装bugzilla

installing bugzilla 3.2 on centos/redhat 5.2

在 CentOS/Redhat 5.2 上安装 Bugzilla 3.2
所需软件:
MySQL Server 5.1.30
Apache HTTP Server 2.2.3
Perl 5.8.8
Sendmail 8.13.8-2


1. 配置 MySQL Server

CentOS 5.2安装了的以下安装包:
#Package install information
%packages --resolvedeps
@ base-x
@ gnome-desktop
@ editors
@ graphical-internet
@ text-internet
@ sound-and-video
@ graphics
@ authoring-and-publishing
@ server-cfg
@ web-server
@ mail-server
@ ftp-server
@ sql-server
@ network-server
@ development-tools
@ x-software-development
@ gnome-software-development
@ admin-tools
@ system-tools
kernel
kernel-headers
kernel-devel
kernel-doc
sysstat
tzdata
-dovecot
-mysql


如果装了系统自带的mysql, 首先要手工卸载
rpm -ev dovecot
rpm -ev mysql
[root@c52x64 ~]# rpm -ev dovecot
[root@c52x64 ~]# rpm -ev mysql
[root@c52x64 ~]#

安装MySQL 5.1版本
rpm -Uvh http://192.168.11.16/blur/MySQL-server-community-5.1.30-0.rhel5.x86_64.rpm
rpm -Uvh http://192.168.11.16/blur/MySQL-client-community-5.1.30-0.rhel5.x86_64.rpm
rpm -Uvh http://192.168.11.16/blur/MySQL-devel-community-5.1.30-0.rhel5.x86_64.rpm
[root@c52x64 ~]# rpm -Uvh http://192.168.11.16/blur/MySQL-server-community-5.1.30-0.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-server-community ########################################### [100%]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h Perf-pxy-2.s3lab.mot.com password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/

Starting MySQL.[ OK ]
Giving mysqld 2 seconds to start
[root@c52x64 ~]# rpm -Uvh http://192.168.11.16/blur/MySQL-client-community-5.1.30-0.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-client-community ########################################### [100%]
[root@c52x64 ~]# rpm -Uvh http://192.168.11.16/blur/MySQL-devel-community-5.1.30-0.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-devel-community ########################################### [100%]
[root@c52x64 ~]#


修改MySQL配置
将全文索引最小长度(ft_min_word_len)设置为2
数据文件目录改为/data/mysql
service mysql stop
mv /etc/my.cnf /etc/my.cnf.`date '+%Y%m%d%H%M%S'`
cp /usr/share/mysql/my-small.cnf /etc/my.cnf
vi /etc/my.cnf
[mysqld]
# Allow small words in full-text indexes
ft_min_word_len=2
datadir=/data/mysql
mkdir -p /data/mysql
chown mysql:mysql /data/mysql
mv /var/lib/mysql/* /data/mysql
service mysql start


创建bugzilla数据库,数据库账号
mysql --user=root <<'EOF'
create database bugs DEFAULT CHARACTER SET utf8;
GRANT SELECT, INSERT,UPDATE, DELETE, INDEX, ALTER, CREATE,
LOCK TABLES,CREATE TEMPORARY TABLES, DROP, REFERENCES
ON bugs.*
TO bugs@localhost
IDENTIFIED BY 'bugs';
FLUSH PRIVILEGES;
EOF
[root@c52x64 ~]# mysql --user=root <<'EOF'
> create database bugs DEFAULT CHARACTER SET utf8;
> GRANT SELECT, INSERT,UPDATE, DELETE, INDEX, ALTER, CREATE,
> LOCK TABLES,CREATE TEMPORARY TABLES, DROP, REFERENCES
> ON bugs.*
> TO bugs@localhost
> IDENTIFIED BY 'bugs';
> FLUSH PRIVILEGES;
> EOF
[root@c52x64 ~]#


2. 配置 Apache HTTP server

cat >>/etc/httpd/conf/httpd.conf <<'EOF'

Alias /bugzilla/ "/data/bugzilla/"
<Directory "/data/bugzilla">
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi
AllowOverride Limit
Order allow,deny
Allow from all
</Directory>

EOF
[root@c52x64 /data]# cat >>/etc/httpd/conf/httpd.conf <<'EOF'
>
> Alias /bugzilla/ "/data/bugzilla/"
> <Directory "/data/bugzilla">
> AddHandler cgi-script .cgi
> Options +Indexes +ExecCGI +FollowSymLinks
> DirectoryIndex index.cgi
> AllowOverride Limit
> Order allow,deny
> Allow from all
> </Directory>
>
> EOF
[root@c52x64 /data]#

配置mod_perl, 没用, 好像是这么配的
if false; then
cat >>/etc/httpd/conf.d/perl.conf <<'EOF'

PerlSwitches -I/data/bugzilla -I/data/bugzilla -w -T
PerlConfigRequire /data/bugzilla/mod_perl.pl

EOF
fi
[root@c52x64 /data]# if false; then
> cat >>/etc/httpd/conf.d/perl.conf <<'EOF'
>
> PerlSwitches -I/data/bugzilla -I/data/bugzilla -w -T
> PerlConfigRequire /data/bugzilla/mod_perl.pl
>
> EOF
> fi
[root@c52x64 /data]#

启动httpd服务
service httpd start
[root@c52x64 ~]# service httpd start
Starting httpd: [ OK ]
[root@c52x64 ~]#


3. 安装 Bugzilla

将bugzilla 3.2解压到/data/bugzilla目录
tar -C /data -zxf /u01/software/blur/bugzilla-3.2.tar.gz
cd /data
mv bugzilla-3.2 bugzilla
[root@c52x64 ~]# tar -C /data -zxf /u01/software/blur/bugzilla-3.2.tar.gz
[root@c52x64 ~]# cd /data
[root@c52x64 /data]# mv bugzilla-3.2 bugzilla
[root@c52x64 /data]#

检查是否安装了所需的perl模块
cd /data/bugzilla
./checksetup.pl --check-modules
[root@c52x64 /data/bugzilla]# ./checksetup.pl --check-modules
* This is Bugzilla 3.2 on perl 5.8.8
* Running on Linux 2.6.18-92.el5 #1 SMP Tue Jun 10 18:51:06 EDT 2008

Checking perl modules...
Checking for CGI.pm (v3.21) found v3.15
Checking for TimeDate (v2.21) not found
Checking for PathTools (v0.84) ok: found v3.12
Checking for DBI (v1.41) ok: found v1.52
Checking for Template-Toolkit (v2.15) not found
Checking for Email-Send (v2.00) not found
Checking for Email-MIME (v1.861) not found
Checking for Email-MIME-Modifier (v1.442) not found

Checking available perl DBD modules...
Checking for DBD-Pg (v1.45) ok: found v1.49
Checking for DBD-mysql (v4.00) not found
Checking for DBD-Oracle (v1.19) not found

The following Perl modules are optional:
Checking for GD (v1.20) not found
Checking for Chart (v1.0) not found
Checking for Template-GD (any) not found
Checking for GDTextUtil (any) not found
Checking for GDGraph (any) not found
Checking for XML-Twig (any) not found
Checking for MIME-tools (v5.406) not found
Checking for libwww-perl (any) ok: found v2.033
Checking for PatchReader (v0.9.4) not found
Checking for PerlMagick (any) not found
Checking for perl-ldap (any) not found
Checking for Authen-SASL (any) not found
Checking for RadiusPerl (any) not found
Checking for SOAP-Lite (any) not found
Checking for HTML-Parser (v3.40) ok: found v3.55
Checking for HTML-Scrubber (any) not found
Checking for Email-MIME-Attachment-Stripper (any) not found
Checking for Email-Reply (any) not found
Checking for mod_perl (v1.999022) ok: found v2.000002
Checking for CGI.pm (v3.11) ok: found v3.15
***********************************************************************
* REQUIRED MODULES *
***********************************************************************
* Bugzilla requires you to install some Perl modules which are either *
* missing from your system, or the version on your system is too old. *
* *
* The latest versions of each module can be installed by running the *
* commands below. *
***********************************************************************
COMMANDS:

/usr/bin/perl install-module.pl CGI
/usr/bin/perl install-module.pl Date::Format
/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::Modifier

**********************************************************************
* OPTIONAL MODULES *
**********************************************************************
* Certain Perl modules are not required by Bugzilla, but by *
* installing the latest version you gain access to additional *
* features. *
* *
* The optional modules you do not have installed are listed below, *
* with the name of the feature they enable. If you want to install *
* one of these modules, just run the appropriate command in the *
* "COMMANDS TO INSTALL" section. *
**********************************************************************

***********************************************************************
* MODULE NAME * ENABLES FEATURE(S) *
***********************************************************************
* GD * Graphical Reports, New Charts, Old Charts *
* Chart * New Charts, Old Charts *
* Template-GD * Graphical Reports *
* GDTextUtil * Graphical Reports *
* GDGraph * Graphical Reports *
* XML-Twig * Move Bugs Between Installations *
* MIME-tools * Move Bugs Between Installations *
* PatchReader * Patch Viewer *
* PerlMagick * Optionally Convert BMP Attachments to PNGs *
* perl-ldap * LDAP Authentication *
* Authen-SASL * SMTP Authentication *
* RadiusPerl * RADIUS Authentication *
* SOAP-Lite * XML-RPC Interface *
* HTML-Scrubber * More HTML in Product/Group Descriptions *
* Email-MIME-Attachment-Stripper * Inbound Email *
* Email-Reply * Inbound Email *
***********************************************************************
COMMANDS TO INSTALL:

GD: /usr/bin/perl install-module.pl GD
Chart: /usr/bin/perl install-module.pl Chart::Base
Template-GD: /usr/bin/perl install-module.pl Template::Plugin::GD::Image
GDTextUtil: /usr/bin/perl install-module.pl GD::Text
GDGraph: /usr/bin/perl install-module.pl GD::Graph
XML-Twig: /usr/bin/perl install-module.pl XML::Twig
MIME-tools: /usr/bin/perl install-module.pl MIME::Parser
PatchReader: /usr/bin/perl install-module.pl PatchReader
PerlMagick: /usr/bin/perl install-module.pl Image::Magick
perl-ldap: /usr/bin/perl install-module.pl Net::LDAP
Authen-SASL: /usr/bin/perl install-module.pl Authen::SASL
RadiusPerl: /usr/bin/perl install-module.pl Authen::Radius
SOAP-Lite: /usr/bin/perl install-module.pl SOAP::Lite
HTML-Scrubber: /usr/bin/perl install-module.pl HTML::Scrubber
Email-MIME-Attachment-Stripper: /usr/bin/perl install-module.pl Email::MIME::Attachment::Stripper
Email-Reply: /usr/bin/perl install-module.pl Email::Reply

To attempt an automatic install of every required and optional module
with one command, do:

/usr/bin/perl install-module.pl --all

[root@c52x64 /data/bugzilla]#

按提示运行命令, 安装全部所需 perl模块到 $BUGZILLA_HOME/lib 目录
/usr/bin/perl install-module.pl CPAN
/usr/bin/perl install-module.pl YAML
/usr/bin/perl install-module.pl --all
如果要用户输入, 就输入默认的, 直接回车即可
(也可以使用CPAN安装或从源码编译, 将模块安装到系统默认位置.
建议用install-module.pl命令, 装在bugzilla自己的目录下)

装完模块后运行checksetup.pl脚本, 继续安装
./checksetup.pl
[root@c52x64 /data/bugzilla]# ./checksetup.pl
* This is Bugzilla 3.2 on perl 5.8.8
* Running on Linux 2.6.18-92.el5 #1 SMP Tue Jun 10 18:51:06 EDT 2008

Checking perl modules...
Checking for CGI.pm (v3.21) ok: found v3.42
Checking for TimeDate (v2.21) ok: found v2.22
Checking for PathTools (v0.84) ok: found v3.12
Checking for DBI (v1.41) ok: found v1.52
Checking for Template-Toolkit (v2.15) ok: found v2.20
Checking for Email-Send (v2.00) ok: found v2.194
Checking for Email-MIME (v1.861) ok: found v1.861
Checking for Email-MIME-Modifier (v1.442) ok: found v1.442

Checking available perl DBD modules...
Checking for DBD-Pg (v1.45) ok: found v1.49
Checking for DBD-mysql (v4.00) ok: found v4.010
Checking for DBD-Oracle (v1.19) not found

The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.41
Checking for Chart (v1.0) ok: found v2.4.1
Checking for Template-GD (any) ok: found v1.56
Checking for GDTextUtil (any) ok: found v0.86
Checking for GDGraph (any) ok: found v1.44
Checking for XML-Twig (any) not found
Checking for MIME-tools (v5.406) ok: found v5.427
Checking for libwww-perl (any) ok: found v2.033
Checking for PatchReader (v0.9.4) ok: found v0.9.5
Checking for PerlMagick (any) not found
Checking for perl-ldap (any) ok: found v0.39
Checking for Authen-SASL (any) ok: found v2.12
Checking for RadiusPerl (any) ok: found v0.13
Checking for SOAP-Lite (any) ok: found v0.710.08
Checking for HTML-Parser (v3.40) ok: found v3.55
Checking for HTML-Scrubber (any) ok: found v0.08
Checking for Email-MIME-Attachment-Stripper (any) ok: found v1.315
Checking for Email-Reply (any) ok: found v1.202
Checking for mod_perl (v1.999022) ok: found v2.000002
Checking for CGI.pm (v3.11) ok: found v3.42
**********************************************************************
* OPTIONAL MODULES *
**********************************************************************
* Certain Perl modules are not required by Bugzilla, but by *
* installing the latest version you gain access to additional *
* features. *
* *
* The optional modules you do not have installed are listed below, *
* with the name of the feature they enable. If you want to install *
* one of these modules, just run the appropriate command in the *
* "COMMANDS TO INSTALL" section. *
**********************************************************************

***********************************************************************
* MODULE NAME * ENABLES FEATURE(S) *
***********************************************************************
* XML-Twig * Move Bugs Between Installations *
* PerlMagick * Optionally Convert BMP Attachments to PNGs *
***********************************************************************
COMMANDS TO INSTALL:

XML-Twig: /usr/bin/perl install-module.pl XML::Twig
PerlMagick: /usr/bin/perl install-module.pl Image::Magick

To attempt an automatic install of every required and optional module
with one command, do:

/usr/bin/perl install-module.pl --all

Reading ./localconfig...

This version of Bugzilla contains some variables that you may want to
change 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 ran
checksetup.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

[root@c52x64 /data/bugzilla]#
还是有两个perl模块没装上, 不管它了
提示需要配置 localconfig 文件

按提示配置 localconfig 文件
cat <<'EOF' |sed 's/\$/\\\$/g;s:ˆ\(.*\)=\(.*\):s|ˆ\1\\\([ ]*\\\)=\\\([ ]*\\\).*|\0|g:g'|sed -i -f - localconfig
$db_pass='bugs';
EOF
[root@c52x64 /data/bugzilla]# cat <<'EOF' |sed 's/\$/\\\$/g;s:ˆ\(.*\)=\(.*\):s|ˆ\1\\\([ ]*\\\)=\\\([ ]*\\\).*|\0|g:g'|sed -i -f - localconfig
> $db_pass='bugs';
> EOF
[root@c52x64 /data/bugzilla]#

然后运行 checksetup.pl
./checksetup.pl
[root@c52x64 /data/bugzilla]# ./checksetup.pl
* This is Bugzilla 3.2 on perl 5.8.8
* Running on Linux 2.6.18-92.el5 #1 SMP Tue Jun 10 18:51:06 EDT 2008

Checking perl modules...
Checking for CGI.pm (v3.21) ok: found v3.42
Checking for TimeDate (v2.21) ok: found v2.22
Checking for PathTools (v0.84) ok: found v3.12
Checking for DBI (v1.41) ok: found v1.52
Checking for Template-Toolkit (v2.15) ok: found v2.20
Checking for Email-Send (v2.00) ok: found v2.194
Checking for Email-MIME (v1.861) ok: found v1.861
Checking for Email-MIME-Modifier (v1.442) ok: found v1.442

Checking available perl DBD modules...
Checking for DBD-Pg (v1.45) ok: found v1.49
Checking for DBD-mysql (v4.00) ok: found v4.010
Checking for DBD-Oracle (v1.19) not found

The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.41
Checking for Chart (v1.0) ok: found v2.4.1
Checking for Template-GD (any) ok: found v1.56
Checking for GDTextUtil (any) ok: found v0.86
Checking for GDGraph (any) ok: found v1.44
Checking for XML-Twig (any) not found
Checking for MIME-tools (v5.406) ok: found v5.427
Checking for libwww-perl (any) ok: found v2.033
Checking for PatchReader (v0.9.4) ok: found v0.9.5
Checking for PerlMagick (any) not found
Checking for perl-ldap (any) ok: found v0.39
Checking for Authen-SASL (any) ok: found v2.12
Checking for RadiusPerl (any) ok: found v0.13
Checking for SOAP-Lite (any) ok: found v0.710.08
Checking for HTML-Parser (v3.40) ok: found v3.55
Checking for HTML-Scrubber (any) ok: found v0.08
Checking for Email-MIME-Attachment-Stripper (any) ok: found v1.315
Checking for Email-Reply (any) ok: found v1.202
Checking for mod_perl (v1.999022) ok: found v2.000002
Checking for CGI.pm (v3.11) ok: found v3.42
**********************************************************************
* OPTIONAL MODULES *
**********************************************************************
* Certain Perl modules are not required by Bugzilla, but by *
* installing the latest version you gain access to additional *
* features. *
* *
* The optional modules you do not have installed are listed below, *
* with the name of the feature they enable. If you want to install *
* one of these modules, just run the appropriate command in the *
* "COMMANDS TO INSTALL" section. *
**********************************************************************

***********************************************************************
* MODULE NAME * ENABLES FEATURE(S) *
***********************************************************************
* XML-Twig * Move Bugs Between Installations *
* PerlMagick * Optionally Convert BMP Attachments to PNGs *
***********************************************************************
COMMANDS TO INSTALL:

XML-Twig: /usr/bin/perl install-module.pl XML::Twig
PerlMagick: /usr/bin/perl install-module.pl Image::Magick

To attempt an automatic install of every required and optional module
with one command, do:

/usr/bin/perl install-module.pl --all

Reading ./localconfig...
Checking for DBD-mysql (v4.00) ok: found v4.010
Checking for MySQL (v4.1.2) ok: found v5.1.30-community

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_severity ...
Adding new table bug_status ...
Adding new table bugs ...
Adding new table bugs_activity ...
Adding new table bugs_fulltext ...
Adding new table category_group_map ...
Adding new table cc ...
Adding new table classifications ...
Adding new table component_cc ...
Adding new table components ...
Adding new table dependencies ...
Adding new table duplicates ...
Adding new table email_setting ...
Adding new table fielddefs ...
Adding new table flagexclusions ...
Adding new table flaginclusions ...
Adding new table flags ...
Adding new table flagtypes ...
Adding new table group_control_map ...
Adding new table group_group_map ...
Adding new table groups ...
Adding new table keyworddefs ...
Adding new table keywords ...
Adding new table logincookies ...
Adding new table longdescs ...
Adding new table milestones ...
Adding new table namedqueries ...
Adding new table namedqueries_link_in_footer ...
Adding new table namedquery_group_map ...
Adding new table op_sys ...
Adding new table priority ...
Adding new table products ...
Adding new table profile_setting ...
Adding new table profiles ...
Adding new table profiles_activity ...
Adding new table quips ...
Adding new table rep_platform ...
Adding new table resolution ...
Adding new table series ...
Adding new table series_categories ...
Adding new table series_data ...
Adding new table setting ...
Adding new table setting_value ...
Adding new table status_workflow ...
Adding new table tokens ...
Adding new table user_group_map ...
Adding new table versions ...
Adding new table votes ...
Adding new table watch ...
Adding new table whine_events ...
Adding new table whine_queries ...
Adding new table whine_schedules ...
Converting attach_data maximum size to 100G...
Inserting values into the 'priority' table:
'P1' sortkey: 100
'P2' sortkey: 200
'P3' sortkey: 300
'P4' sortkey: 400
'P5' sortkey: 500
Inserting values into the 'bug_status' table:
'UNCONFIRMED' sortkey: 100
'NEW' sortkey: 200
'ASSIGNED' sortkey: 300
'REOPENED' sortkey: 400
'RESOLVED' sortkey: 500
'VERIFIED' sortkey: 600
'CLOSED' sortkey: 700
Inserting values into the 'rep_platform' table:
'All' sortkey: 100
'PC' sortkey: 200
'Macintosh' sortkey: 300
'Other' sortkey: 400
Inserting values into the 'resolution' table:
'' sortkey: 100
'FIXED' sortkey: 200
'INVALID' sortkey: 300
'WONTFIX' sortkey: 400
'DUPLICATE' sortkey: 500
'WORKSFORME' sortkey: 600
'MOVED' sortkey: 700
Inserting values into the 'bug_severity' table:
'blocker' sortkey: 100
'critical' sortkey: 200
'major' sortkey: 300
'normal' sortkey: 400
'minor' sortkey: 500
'trivial' sortkey: 600
'enhancement' sortkey: 700
Inserting values into the 'op_sys' table:
'All' sortkey: 100
'Windows' sortkey: 200
'Mac OS' sortkey: 300
'Linux' sortkey: 400
'Other' sortkey: 500
Creating ./data directory...
Creating ./data/attachments directory...
Creating ./data/duplicates directory...
Creating ./data/mining directory...
Creating ./data/webdot directory...
Creating ./skins/contrib/Dusk/yui directory...
Creating graphs directory...
Creating skins/custom directory...
Creating ./skins/contrib/Dusk/IE-fixes.css...
Creating ./skins/contrib/Dusk/admin.css...
Creating ./skins/contrib/Dusk/create_attachment.css...
Creating ./skins/contrib/Dusk/dependency-tree.css...
Creating ./skins/contrib/Dusk/duplicates.css...
Creating ./skins/contrib/Dusk/editusers.css...
Creating ./skins/contrib/Dusk/help.css...
Creating ./skins/contrib/Dusk/index.css...
Creating ./skins/contrib/Dusk/panel.css...
Creating ./skins/contrib/Dusk/params.css...
Creating ./skins/contrib/Dusk/release-notes.css...
Creating ./skins/contrib/Dusk/show_bug.css...
Creating ./skins/contrib/Dusk/show_multiple.css...
Creating ./skins/contrib/Dusk/summarize-time.css...
Creating ./skins/contrib/Dusk/voting.css...
Creating ./skins/contrib/Dusk/yui/calendar.css...
Creating ./Bugzilla/.htaccess...
Creating ./data/.htaccess...
Creating ./data/attachments/.htaccess...
Creating ./data/webdot/.htaccess...
Creating ./lib/.htaccess...
Creating ./template/.htaccess...
Creating .htaccess...
Precompiling templates...done.
Fixing file permissions...
Initializing "Dependency Tree Changes" email_setting ...
Marking closed bug statuses as such...
Now filling the 'status_workflow' table with valid bug status transitions...
Adding foreign key: attachments.submitter_id -> profiles.userid...
Adding foreign key: bugs_activity.who -> profiles.userid...
Adding foreign key: bugs_fulltext.bug_id -> bugs.bug_id...
Adding foreign key: cc.who -> profiles.userid...
Adding foreign key: component_cc.user_id -> profiles.userid...
Adding foreign key: components.initialowner -> profiles.userid...
Adding foreign key: components.initialqacontact -> profiles.userid...
Adding foreign key: email_setting.user_id -> profiles.userid...
Adding foreign key: logincookies.userid -> profiles.userid...
Adding foreign key: namedqueries.userid -> profiles.userid...
Adding foreign key: namedqueries_link_in_footer.namedquery_id -> namedqueries.id...
Adding foreign key: namedqueries_link_in_footer.user_id -> profiles.userid...
Adding foreign key: profile_setting.user_id -> profiles.userid...
Adding foreign key: profiles_activity.userid -> profiles.userid...
Adding foreign key: profiles_activity.who -> profiles.userid...
Adding foreign key: profiles_activity.fieldid -> fielddefs.id...
Adding foreign key: tokens.userid -> profiles.userid...
Adding foreign key: votes.who -> profiles.userid...
Adding foreign key: watch.watcher -> profiles.userid...
Adding foreign key: watch.watched -> profiles.userid...
Adding foreign key: whine_events.owner_userid -> profiles.userid...
Adding foreign key: whine_queries.eventid -> whine_events.id...
Adding foreign key: whine_schedules.eventid -> whine_events.id...
Creating group admin...
Creating group tweakparams...
Creating group editusers...
Creating group creategroups...
Creating group editclassifications...
Creating group editcomponents...
Creating group editkeywords...
Creating group editbugs...
Creating group canconfirm...
Creating group bz_canusewhines...
Creating group bz_sudoers...
Creating group bz_canusewhineatothers...
Creating group bz_sudo_protect...
Adding a new user setting called 'skin'
Adding a new user setting called 'quote_replies'
Adding a new user setting called 'lang'
Adding a new user setting called 'post_bug_submit_action'
Adding a new user setting called 'per_bug_queries'
Adding a new user setting called 'zoom_textareas'
Adding a new user setting called 'csv_colsepchar'
Adding a new user setting called 'state_addselfcc'
Adding a new user setting called 'comment_sort_order'
Adding a new user setting called 'display_quips'

Looks like we don't have an administrator set up yet.
Either this is your first time using Bugzilla, or your
administrator's privileges might have accidentally been deleted.

Enter the e-mail address of the administrator: root@localhost
The e-mail address you entered (root@localhost)
didn't pass our syntax checking for a legal email address.
A legal address must contain exactly one '@', and at least one '.' after the @.
It must also not contain any of these special characters:
\ ( ) & < > , ; : " [ ], or any whitespace.

Enter the e-mail address of the administrator: wenxie@motorola.com
Enter the real name of the administrator: wen xie
Enter a password for the administrator account:
Please retype the password to verify:
wenxie@motorola.com 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
'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.
[root@c52x64 /data/bugzilla]#
输入管理员账号,姓名,密码

浏览器访问bugzilla首页
firefox http://localhost/bugzilla/ &


登录

需要配置一些参数

配置 "Configuration: Required settings"

参数:
maintainer : wenxie@motorola.com
ulrbase : http://192.168.55.100/bugzilla/
docs_urlbase: (默认) docs/%lang%/html/
sslbase : https://192.168.55.100/bugzilla/
ssl: (默认) never
cookiedomain: (默认) 空
cookiepath : /bugzilla/
timezone : GMT
utf8 : on
shutdownhtml: (默认) 空
announcehtml: (默认) 空
proxy_url : (默认) 空
upgrade_notification: (默认) latest_stable_release
然后点Save change保存
(直接改 data/params 文件应该也行)

首页不报错了



4. 其它配置

修改mysql表最大大小限制
mysql --user=bugs --password=bugs <<'EOF'
use bugs;
ALTER TABLE attachments AVG_ROW_LENGTH=1000000, MAX_ROWS=20000;
EOF
[root@c52x64 ~]# mysql --user=bugs --password=bugs <<'EOF'
> use bugs;
> ALTER TABLE attachments AVG_ROW_LENGTH=1000000, MAX_ROWS=20000;
> EOF
[root@c52x64 ~]#

修改mysql账号密码
mysql -u root <<'EOF'
#update mysql.user set password=password('root') where user='root';
delete from mysql.user where user= '';
flush privileges;
quit
EOF
[root@c52x64 ~]# mysql -u root <<'EOF'
> #update mysql.user set password=password('root') where user='root';
> delete from mysql.user where user= '';
> flush privileges;
> quit
> EOF
[root@c52x64 ~]#

5. Bugzilla WebService 的问题

运行webservice示范脚本
cd /data/bugzilla
contrib/bz_webservice_demo.pl --uri http://localhost/bugzilla/xmlrpc.cgi
[root@c52x64 /data/bugzilla]# cd /data/bugzilla
[root@c52x64 /data/bugzilla]# contrib/bz_webservice_demo.pl --uri http://localhost/bugzilla/xmlrpc.cgi
Client Application failed during request deserialization: Eval-group in insecure regular expression in regex m/(?:([ˆ&lt;]+)(?{XML::Parser::Lite::_char($1)}))|&lt;(?:!(?:--(?:([ˆ-]*)-(?:[ˆ-]0ˆ-]*-)*-(?{XML::Parser::Lite::comment($2)}).../ at lib/XML/Parser/Lite.pm line 140.
in SOAP call near contrib/bz_webservice_demo.pl line 189.
[root@c52x64 /data/bugzilla]#
报错正则表达式不安全什么的"Eval-group in insecure regular expression in regex"
经检查发现是XML-Parser模块安装不正常
先安装expat-devel包, 再装XML-Parser模块
rpm -Uvh http://192.168.11.16/CentOS-5.2-x86_64-bin-DVD/CentOS/expat-devel-1.95.8-8.2.1.x86_64.rpm
/usr/bin/perl install-module.pl XML::Parser

然后运行示范脚本
contrib/bz_webservice_demo.pl --uri http://localhost/bugzilla/xmlrpc.cgi
[root@c52x64 /data/bugzilla]# contrib/bz_webservice_demo.pl --uri http://localhost/bugzilla/xmlrpc.cgi
Connecting to a Bugzilla of version 3.2.
Bugzilla's timezone is +0000.
可以取出版本号和时区信息


6.连接Mysql的问题

如果第3步运行 checksetup.pl 报错无法连接数据库
Reading ./localconfig...
Checking for DBD-mysql (v4.00) ok: found v4.010
Had to create DBD::mysql::dr::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190, <DATA> line 275.
Use of uninitialized value in subroutine entry at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190, <DATA> line 275.
Had to create DBD::mysql::db::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190, <DATA> line 275.
Use of uninitialized value in subroutine entry at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190, <DATA> line 275.
There was an error connecting to MySQL:

Undefined subroutine &DBD::mysql::db::_login called at lib/x86_64-linux-thread-multi/DBD/mysql.pm line 142, <DATA> line 275.

This might have several reasons:

* MySQL is not running.
* MySQL is running, but there is a problem either in the
server configuration or the database access rights. Read the Bugzilla
Guide in the doc directory. The section about database configuration
should help.
* Your password for the 'bugs' user, specified in $db_pass, is
incorrect, in './localconfig'.
* There is a subtle problem with Perl, DBI, or MySQL. Make
sure all settings in './localconfig' are correct. If all else fails, set
'$db_check' to 0.
有可能是DBD-mysql模块没装好, 这个模块要安装正确才行


7. 网址最后加斜杠的问题

如果URL最后不加斜杠, 报错找不到文件, 比如访问 http://localhost/bugzilla


编辑httpd.conf
Alias /bugzilla/ "/data/bugzilla/"
去掉斜杠改成
Alias /bugzilla "/data/bugzilla"

重启httpd服务, 即可
service httpd restart




外部链接:
Chapter 2. Installing Bugzilla






-fin-

No comments:

Website Analytics

Followers