step -by -step install bugzilla

上一篇 / 下一篇  2007-11-21 17:15:42

this day ,the bugzilla in server computer appears internal error,and the manager is out.so i want to install the other one bugzilla by myself.
this is the document about bugzilla installration51Testing软件测试网)w'sRAXQ,H?
i found on the web .very good !51Testing软件测试网 ]hFF2~L1O'h
please fllow me to install !51Testing软件测试网 K Z4A _ j$H"d'["P1gz
ok begin!51Testing软件测试网b5Z'yBE;Z?0Ks

K*?0U;bG%i#v051Testing软件测试网H5H_~5B0u6^@+Q,HT
51Testing软件测试网9AcX C ][']H YR

&Oo4xvJ!m? l0
0P,a7]'g ZO8l8TEKu0

4.1. Step-by-step Install

4.1.1. Introduction

7B'A M$AKN{;~0W0Bugzilla has been successfully installed under Solaris, Linux, and Win32. Win32 is not yet officially supported, but many people have got it working fine. Please see theWin32 Installation Notesfor further advice on getting Bugzilla to work on Microsoft Windows.51Testing软件测试网qMwn0Pw5x

4.1.2. Package List

Note51Testing软件测试网 ^1p\[;B7tp4L4nP+dt

If you are running the very most recent version of Perl and MySQL (both the executables and development libraries) on your system, you can skip these manual installation steps for the Perl modules by using Bundle::Bugzilla; seeUsing Bundle::Bugzilla instead of manually installing Perl modules.

)lJk1{;J6LE A0

f%?X D~X0The software packages necessary for the proper running of Bugzilla (with download links) are:

8x;}Y-W$]VN q0
  1. 51Testing软件测试网0t"RfO2u

    MySQL database server(3.22.5 or greater)

    O1_j]"`I#Zf0BI0
  2. 3r0@f G!u P K n0Perl(5.005 or greater, 5.6.1 is recommended if you wish to use Bundle::Bugzilla)

    t ]gF&ez+y0
  3. 51Testing软件测试网 {`+FcB)^-TCe

    Perl Modules (minimum version):

    7Pd&N_4\)v$Y0
    1. 51Testing软件测试网7Ra;F zl*S\

      Template(v2.07)51Testing软件测试网w.LtgQwT{(sPW

    2. 3a{9ZvZ/x"IG&Pf ?0AppConfig(v1.52)

      "p9ht m4?0
    3. 51Testing软件测试网.Q.ee.}`fk#[

      Text::Wrap(v2001.0131)51Testing软件测试网q7_ ?2]L)O8^

    4. 51Testing软件测试网6?rUt{:D!Eq*FG

      File::Spec(v0.8.2)51Testing软件测试网X'~pN9h

    5. N.b.]a&}0Data::Dumper(any)

      jGU\$a0
    6. -G#W6YH*x:?"r+l?(mT0DBD::mysql(v1.2209)

      h E'H{2M4F`0
    7. 2M|D]qTy0DBI(v1.13)51Testing软件测试网q2ng1mm"w:n

    8. 51Testing软件测试网+|2FuB&mM}+i

      Date::Parse(any)

      KVF _-@P0
    9. `N5EX|j0CGI::Carp (any)

      0M#ebURb6K:^6|&K0
    and, optionally:
    1. 51Testing软件测试网.Wi'Y's/z6kz

      GD(v1.19) for bug charting

      @X*d/d-J~` x}G0
    2. 6P}j7ZYs0Chart::Base(v0.99c) for bug charting51Testing软件测试网!O'}#a,[I

    3. 51Testing软件测试网,@w KQLbd&td8V#|4Q

      XML::Parser (any) for the XML interface51Testing软件测试网+D)Xw5d$j

    4. e*](?M8Fs0MIME::Parser (any) for the email interface51Testing软件测试网+c9]zr8G@+T(y

  4. eQ W+lHs&e?$c U0The web server of your choice.Apacheis highly recommended.

    R l:az2rpm0
Warning

F-jn7D}C1b0It is a good idea, while installing Bugzilla, to ensure that there is some kind of firewall between you and the rest of the Internet, because your machine may be insecure for periods during the install. Many installation steps require an active Internet connection to complete, but you must take care to ensure that at no point is your machine vulnerable to an attack.51Testing软件测试网n8~6q{(Zs;bu

Note51Testing软件测试网TmP)a6JF.k5~

Linux-Mandrake 8.0 includes every required and optional library for Bugzilla. The easiest way to install them is by using theurpmiutility. If you follow these commands, you should have everything you need for Bugzilla, andchecksetup.plshould not complain about any missing libraries. You may already have some of these installed.51Testing软件测试网SU*]glJZ

bash#urpmi perl-mysql
bash#urpmi perl-chart
bash#urpmi perl-gd
bash#urpmi perl-MailTools(for Bugzilla email integration)
bash#urpmi apache-modules

4.1.3. MySQL

51Testing软件测试网(C PzWH(c

Visit the MySQL homepage atwww.mysql.comto grab and install the latest stable release of the server.

O-q:Rc'~kG0
Note

!T*y0@f"B0Many of the binary versions of MySQL store their data files in/var. On some Unix systems, this is part of a smaller root partition, and may not have room for your bug database. You can set the data directory as an option toconfigureif you build MySQL from source yourself.51Testing软件测试网p$riaA'}_

51Testing软件测试网 r-c7Tf cf

If you install from something other than an RPM or Debian package, you will need to addmysqldto your init scrīpts so the server daemon will come back up whenever your machine reboots. Further discussion of UNIX init sequences are beyond the scope of this guide.

_(gR]B yx3m!Ij051Testing软件测试网3j,K.PHD3I Y3G

Change your init scrīpt to startmysqldwith the ability to accept large packets. By default,mysqldonly accepts packets up to 64K long. This limits the size of attachments you may put on bugs. If you add-O max_allowed_packet=1Mto the command that startsmysqld(orsafe_mysqld), then you will be able to have attachments up to about 1 megabyte. There is a Bugzilla parameter for maximum attachment size; you should configure it to match the value you choose here.

ea F$z\p,Pa0

T(qt:D,u"E/o+Y'y0If you plan on running Bugzilla and MySQL on the same machine, consider using the--skip-networkingoption in the init scrīpt. This enhances security by preventing network access to MySQL.51Testing软件测试网9@_B4FzpW

4.1.4. Perl

51Testing软件测试网6wQ+a,^-Szn G0|

Any machine that doesn't have Perl on it is a sad machine indeed. Perl can be got in source form fromperl.comfor the rare *nix systems which don't have it. Although Bugzilla runs with all post-5.005 versions of Perl, it's a good idea to be up to the very latest version if you can when running Bugzilla. As of this writing, that is Perl version 5.6.1.

Y.S6\BpP'X*?t0
Tip51Testing软件测试网/IRbm~9c P

You can skip the following Perl module installation steps by installingBundle::BugzillafromCPAN, which installs all required modules for you.

X_kz9V&u(sd0

3Z` @'wX0bash#perl -MCPAN -e 'install "Bundle::Bugzilla"'

Jho7O'aq051Testing软件测试网Pe3I7b!y$g)BB:EG

Bundle::Bugzilla doesn't include GD, Chart::Base, or MIME::Parser, which are not essential to a basic Bugzilla install. If installing this bundle fails, you should install each module individually to isolate the problem.

`Us@0n3M3S0

4.1.5. Perl Modules

~7^-E)OA*J_8s r0All Perl modules can be found on theComprehensive Perl Archive Network(CPAN). The CPAN servers have a real tendency to bog down, so please use mirrors.

~e$F~N`,RNh0

-p&X`3|.Lb0Quality, general Perl module installation instructions can be found on the CPAN website, but the easy thing to do is to just use the CPAN shell which does all the hard work for you. To use the CPAN shell to install a module:51Testing软件测试网 R_7x8B#\Dp*h`

^I2x\#x G0bash#perl -MCPAN -e 'install "<modulename>"'51Testing软件测试网;mz^2s[

51Testing软件测试网'x2ax*Yw

To do it the hard way:51Testing软件测试网"UK2O9].k6{8f }d#A V

U$A'fS}q0Untar the module tarball -- it should create its own directory51Testing软件测试网%d `u;@!A`NW

!H'Q}V0`{7D{M0CD to the directory just created, and enter the following commands:51Testing软件测试网 f+[/] Z+@H

  1. 6Vw2Py?w0bash#perl Makefile.PL51Testing软件测试网l'oG#i0z"d"?A(m@

  2. #^c7|g.Y3U2s-[5y#f0bash#make

    g&f2S{C cXg0
  3. @ e/zh]8QY.I1[ r0bash#make test

    %I1_scg0
  4. ,p [u | ME$b0bash#make install

    "I;Zu @.x7}[0
Warning51Testing软件测试网$Jgj{0{I#e l

Many people complain that Perl modules will not install for them. Most times, the error messages complain that they are missing a file in"@INC". Virtually every time, this error is due to permissions being set too restrictively for you to compile Perl modules or not having the necessary Perl development libraries installed on your system. Consult your local UNIX systems administrator for help solving these permissions issues; if youarethe local UNIX sysadmin, please consult the newsgroup/mailing list for further assistance or hire someone to help you out.

1uC,_Uh#Xq { O0

4.1.5.1. DBI

51Testing软件测试网:N!|1W*lrd;p.r7Bp

The DBI module is a generic Perl module used the MySQL-related modules. As long as your Perl installation was done correctly the DBI module should be a breeze. It's a mixed Perl/C module, but Perl's MakeMaker system simplifies the C compilation greatly.51Testing软件测试网XtT+a)W D H7J7|4b

4.1.5.2. Data::Dumper

51Testing软件测试网z%o(x,b q

The Data::Dumper module provides data structure persistence for Perl (similar to Java's serialization). It comes with later sub-releases of Perl 5.004, but a re-installation just to be sure it's available won't hurt anything.

0nq frl] v-j0

4.1.5.3. MySQL-related modules

t}"HD5y/`0The Perl/MySQL interface requires a few mutually-dependent Perl modules. These modules are grouped together into the the Msql-Mysql-modules package.51Testing软件测试网E/@B2~!k bZ JJ;n

51Testing软件测试网 N'_Q3F3@,PO

The MakeMaker process will ask you a few questions about the desired compilation target and your MySQL installation. For most of the questions the provided default will be adequate, but when asked if your desired target is the MySQL or mSQL packages, you should select the MySQL related ones. Later you will be asked if you wish to provide backwards compatibility with the older MySQL packages; you should answer YES to this question. The default is NO.

:y4Gks4I#B3n`Lg0

1j~ZNk0A host of 'localhost' should be fine and a testing user of 'test' with a null password should find itself with sufficient access to run tests on the 'test' database which MySQL created upon installation.51Testing软件测试网e:x-o Ij{&F4q

4.1.5.4. TimeDate modules

%M q D-HB&ho5q F0Many of the more common date/time/calendar related Perl modules have been grouped into a bundle similar to the MySQL modules bundle. This bundle is stored on the CPAN under the name TimeDate. The component module we're most interested in is the Date::Format module, but installing all of them is probably a good idea anyway.51Testing软件测试网4S2k I.q d(j

4.1.5.5. GD (optional)

51Testing软件测试网 di8Ph$n^

The GD library was written by Thomas Boutell a long while ago to programatically generate images in C. Since then it's become the defacto standard for programatic image construction. The Perl bindings to it found in the GD library are used on millions of web pages to generate graphs on the fly. That's what Bugzilla will be using it for so you must install it if you want any of the graphing to work.

6t(`:}3i'O Q3X0
Note

1Vjj0K"E}5q0The Perl GD library requires some other libraries that may or may not be installed on your system, includinglibpngandlibgd. The full requirements are listed in the Perl GD library README. If compiling GD fails, it's probably because you're missing a required library.

x,zuEF$i7Q^j F0

4.1.5.6. Chart::Base (optional)

51Testing软件测试网Fn _1}U;P

The Chart module provides Bugzilla with on-the-fly charting abilities. It can be installed in the usual fashion after it has been fetched from CPAN. Note that earlier versions that 0.99c used GIFs, which are no longer supported by the latest versions of GD.

8@ tO"oc9K?4d0

4.1.5.7. Template Toolkit

5eJz.{ G;tP+T6?0When you install Template Toolkit, you'll get asked various questions about features to enable. The defaults are fine, except that it is recommended you use the high speed XS Stash of the Template Toolkit, in order to achieve best performance. However, there are known problems with XS Stash and Perl 5.005_02 and lower. If you wish to use these older versions of Perl, please use the regular stash.51Testing软件测试网C"^ C PR H2U-|~9W

4.1.6. HTTP Server

51Testing软件测试网M*W0S A.}1U)c

You have a freedom of choice here - Apache, Netscape or any other server on UNIX would do. You can run the web server on a different machine than MySQL, but need to adjust the MySQL"bugs"user permissions accordingly.

5G tMb M7]uB0
Note

)GVz:fN7Q T}(N1o!n0We strongly recommend Apache as the web server to use. The Bugzilla Guide installation instructions, in general, assume you are using Apache. If you have got Bugzilla working using another webserver, please share your experiences with us.51Testing软件测试网`5B"P.BQ*MF

51Testing软件测试网 u"Sq O J sx

You'll want to make sure that your web server will run any file with the .cgi extension as a CGI and not just display it. If you're using Apache that means uncommenting the following line in the httpd.conf file:

AddHandler cgi-scrīpt .cgi
51Testing软件测试网C(y0m DO Qc

51Testing软件测试网 {`"ixJ*VZ VNm_

With Apache you'll also want to make sure that within the httpd.conf file the line:

Options ExecCGI51Testing软件测试网1aSb2es0a%o
AllowOverride Limit51Testing软件测试网 XO9w#C1BC.V7M
is in the stanza that covers the directories into which you intend to put the bugzilla .html and .cgi files.51Testing软件测试网v#h2hIjx~-Q EQ

Note51Testing软件测试网I#||6qr b;s$z;t

AllowOverride Limit allows the use of a Deny statement in the .htaccess file generated by checksetup.pl51Testing软件测试网bD@(ByW]IJ

51Testing软件测试网Z:] W!V#Wh

Users of older versions of Apache may find the above lines in the srm.conf and access.conf files, respecitvely.

&rw \$aZ0
Warning

s@Y{)`]![1[.\,E0There are important files and directories that should not be a served by the HTTP server - most files in the"data"and"shadow"directories and the"localconfig"file. You should configure your HTTP server to not serve these files. Failure to do so will expose critical passwords and other data. Please see.htaccess files and securityfor details on how to do this for Apache; the checksetup.pl scrīpt should create appropriate .htaccess files for you.51Testing软件测试网rRP,][:v#~

4.1.7. Bugzilla

51Testing软件测试网T v"G!L:UG7R E

You should untar the Bugzilla files into a directory that you're willing to make writable by the default web server user (probably"nobody"). You may decide to put the files in the main web space for your web server or perhaps in/usr/localwith a symbolic link in the web space that points to the Bugzilla directory.

NX2I|&d0
Tip51Testing软件测试网 {&m2V1EU p4?|

If you symlink the bugzilla directory into your Apache's HTML heirarchy, you may receiveForbiddenerrors unless you add the"FollowSymLinks"directive to the <Directory> entry for the HTML root in httpd.conf.

A2H ~Ky'i0

/L:vY7|Jp1k0Once all the files are in a web accessible directory, make that directory writable by your webserver's user. This is a temporary step until you run the post-installchecksetup.plscrīpt, which locks down your installation.

cOV wL TL051Testing软件测试网@UgR;V9w_1zv4IS X

Lastly, you'll need to set up a symbolic link to/usr/bonsaitools/bin/perlfor the correct location of your Perl executable (probably/usr/bin/perl). Otherwise you must hack all the .cgi files to change where they look for Perl. This can be done using the following Perl one-liner, but I suggest using the symlink approach to avoid upgrade hassles.51Testing软件测试网%ohX1V(Pr.y8B

/PFS!p H,vL.y0

perl -pi -e51Testing软件测试网*yK2s)v9|
K
's@#\!/usr/bonsaitools/bin/perl@#\!/usr/bin/perl@' *cgi *pl Bug.pm
"mqY u5RyGS0processmail syncshadowdb
Change/usr/bin/perlto match the location of Perl on your machine.

#E.@3NKj_)L!k7a,g0

4.1.8. Setting Up the MySQL Database

51Testing软件测试网5t4J2GS9b"g A

After you've gotten all the software installed and working you're ready to start preparing the database for its life as the back end to a high quality bug tracker.51Testing软件测试网MjXj};pj0O S

Q(C1J/W(b7L!m/\L0First, you'll want to fix MySQL permissions to allow access from Bugzilla. For the purpose of this Installation section, the Bugzilla username will be"bugs", and will have minimal permissions.51Testing软件测试网u})q$_S'j

+?EjJ$U~nHA0Begin by giving the MySQL root user a password. MySQL passwords are limited to 16 characters.51Testing软件测试网HD {y @k1c^

bash#mysql -u root mysql
mysql>UPDATE user SET Password=PASSWORD('<new_password'>) WHERE user='root';
mysql>FLUSH PRIVILEGES;
From this point on, if you need to access MySQL as the MySQL root user, you will need to usemysql -u root -pand enter <new_password>. Remember that MySQL user names have nothing to do with Unix user names (login names).

n0Z0Ob@%dY0Next, we use an SQLGRANTcommand to create a"bugs"user, and grant sufficient permissions for checksetup.pl, which we'll use later, to work its magic. This also restricts the"bugs"user to operations within a database called"bugs", and only allows the account to connect from"localhost". Modify it to reflect your setup if you will be connecting from another machine or as a different user.

:{+CZ\%c6lW051Testing软件测试网 Mn*pi1m&S\4}4G6Q$o

Remember to set <bugs_password> to some unique password.

w1ud*F2V)Sk]:eQ0
mysql>GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY '<bugs_password>';
mysql>FLUSH PRIVILEGES;
Note51Testing软件测试网MPq `S Y_ e

If you are using MySQL 4, the bugs user also needs to be granted the LOCK TABLES and CREATE TEMPORARY TABLES permissions.

ZqI C%V*A0

4.1.9.checksetup.pl

51Testing软件测试网R$e-GX P\.\

Next, run the magic checksetup.pl scrīpt. (Many thanks toHolger Schurigfor writing this scrīpt!) This scrīpt is designed to make sure your MySQL database and other configuration options are consistent with the Bugzilla CGI files. It will make sure Bugzilla files and directories have reasonable permissions, set up thedatadirectory, and create all the MySQL tables.51Testing软件测试网9v's3Jc:Y

bash#./checksetup.pl
The first time you run it, it will create a file calledlocalconfig.

ZI j/r4@Spj0This file contains a variety of settings you may need to tweak including how Bugzilla should connect to the MySQL database.

lH](?,Is051Testing软件测试网uA:j&l@-E2Z:\

The connection settings include:

`l(y%{ f0
  1. 51Testing软件测试网`Ylm;b}-lIq

    server's host: just use"localhost"if the MySQL server is local

    :p#K}[oZGN [0
  2. jS;d5v4e9N `?0database name:"bugs"if you're following these directions51Testing软件测试网3j5y^,lT`VP

  3. %^(~/@8kN*b0MySQL username:"bugs"if you're following these directions

    0[.y4blG\nKL0
  4. /z`x&B*O M2k0Password for the"bugs"MySQL account; (<bugs_password>) above

    C k/?[.l)t Zi BCT0
51Testing软件测试网 p0lC0`;F9xC#^8u`

Once you are happy with the settings,suto the user your web server runs as, and re-runchecksetup.pl. (Note: on some security-conscious systems, you may need to change the login shell for the webserver account before you can do this.) On this second run, it will create the database and an administrator account for which you will be prompted to provide information.

#bu i|%_qD/RO0
Note51Testing软件测试网cfrR_7Jr

The checksetup.pl scrīpt is designed so that you can run it at any time without causing harm. You should run it after any upgrade to Bugzilla.51Testing软件测试网T D[^ A2E7|H

4.1.10. Configuring Bugzilla

iws5[ r:w0You should run through the parameters on the Edit Parameters page (link in the footer) and set them all to appropriate values. They key parameters are documented inSection 5.1.

U*zx)C2B(y O0
51Testing软件测试网Vk o"]0Y%IDC

TAG:

 

评分:0

我来说两句

日历

« 2024-03-17  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 6623
  • 日志数: 12
  • 建立时间: 2007-11-20
  • 更新时间: 2007-12-20

RSS订阅

Open Toolbar