1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
|
<!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> -->
<!-- $Id: installation.xml,v 1.64 2008/04/04 06:46:54 jocuri%softhome.net Exp $ -->
<chapter id="installing-bugzilla">
<title>Installing Bugzilla</title>
<section id="installation">
<title>Installation</title>
<note>
<para>If you just want to <emphasis>use</emphasis> Bugzilla,
you do not need to install it. None of this chapter is relevant to
you. Ask your Bugzilla administrator
for the URL to access it over the web.
</para>
</note>
<para>The Bugzilla server software is usually installed on Linux or
Solaris.
If you are installing on another OS, check <xref linkend="os-specific"/>
before you start your installation to see if there are any special
instructions.
</para>
<para>
As an alternative to following these instructions, you may wish to
try Arne Schirmacher's unofficial and unsupported
<ulink url="http://www.softwaretesting.de/article/view/33/1/8/">Bugzilla
Installer</ulink>, which installs Bugzilla and all its prerequisites
on Linux or Solaris systems.
</para>
<para>This guide assumes that you have administrative access to the
Bugzilla machine. It not possible to
install and run Bugzilla itself without administrative access except
in the very unlikely event that every single prerequisite is
already installed.
</para>
<warning>
<para>The installation process may make your machine insecure for
short periods of time. Make sure there is a firewall between you
and the Internet.
</para>
</warning>
<para>
You are strongly recommended to make a backup of your system
before installing Bugzilla (and at regular intervals thereafter :-).
</para>
<para>In outline, the installation proceeds as follows:
</para>
<procedure>
<step>
<para><link linkend="install-perl">Install Perl</link>
(&min-perl-ver; or above)
</para>
</step>
<step>
<para><link linkend="install-mysql">Install MySQL</link>
(&min-mysql-ver; or above)
</para>
</step>
<step>
<para><link linkend="install-webserver">Install a Webserver</link>
</para>
</step>
<step>
<para><link linkend="install-bzfiles">Install Bugzilla</link>
</para>
</step>
<step>
<para><link linkend="install-perlmodules">Install Perl modules</link>
</para>
</step>
<step>
<para>Configure all of the above.
</para>
</step>
</procedure>
<section id="install-perl">
<title>Perl</title>
<para>Installed Version Test: <filename>perl -v</filename></para>
<para>Any machine that doesn't have Perl on it is a sad machine indeed.
If you don't have it and your OS doesn't provide official packages,
visit <ulink url="http://www.perl.com"/>.
Although Bugzilla runs with Perl &min-perl-ver;,
it's a good idea to be using the latest stable version.
As of this writing, that is Perl &newest-perl-ver;.</para>
</section>
<section id="install-mysql">
<title>MySQL</title>
<para>Installed Version Test: <filename>mysql -V</filename></para>
<para>
If you don't have it and your OS doesn't provide official packages,
visit <ulink url="http://www.mysql.com"/>. You need MySQL version
&min-mysql-ver; or higher.
</para>
<note>
<para> Many of the binary
versions of MySQL store their data files in
<filename class="directory">/var</filename>.
On some Unix systems, this is part of a smaller root partition,
and may not have room for your bug database. To change the data
directory, you have to build MySQL from source yourself, and
set it as an option to <filename>configure</filename>.</para>
</note>
<para>If you install from something other than a packaging/installation
system (such as .rpm, .dep, .exe, or .msi) make sure the MySQL server
is started when the machine boots.
</para>
</section>
<section id="install-webserver">
<title>Web Server</title>
<para>Installed Version Test: view the default welcome page at
http://<your-machine>/</para>
<para>You have freedom of choice here, pretty much any web server that
is capable of running <glossterm linkend="gloss-cgi">CGI</glossterm>
scripts will work.
However, we strongly recommend using the Apache web server
(either 1.3.x or 2.x), and
the installation instructions usually assume you are
using it. If you have got Bugzilla working using another webserver,
please share your experiences with us by filing a bug in &bzg-bugs;.
</para>
<para>
If you don't have Apache and your OS doesn't provide official packages,
visit <ulink url="http://httpd.apache.org/"/>.
</para>
</section>
<section id="install-bzfiles">
<title>Bugzilla</title>
<para>
Download a Bugzilla tarball (or check it out from CVS) and place
it in a suitable directory, writable by the default web server user
(probably <quote>nobody</quote>).
Good locations are either directly in the main web space for your
web server or perhaps in
<filename>/usr/local</filename>
with a symbolic link from the web space.
</para>
<caution>
<para>The default Bugzilla distribution is not designed to be placed
in a <filename class="directory">cgi-bin</filename> directory. This
includes any directory which is configured using the
<option>ScriptAlias</option> directive of Apache.
</para>
</caution>
<para>Once 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
<filename>checksetup.pl</filename>
script, which locks down your installation.</para>
</section>
<section id="install-perlmodules">
<title>Perl Modules</title>
<para>Bugzilla's installation process is based
on a script called <filename>checksetup.pl</filename>.
The first thing it checks is whether you have appropriate
versions of all the required
Perl modules. The aim of this section is to pass this check.
When it passes,
<emphasis>do not run it again</emphasis>,
but proceed to <xref linkend="configuration"/>.
</para>
<para>
At this point, you need to <filename>su</filename> to root. You should
remain as root until the end of the install. Then run:
</para>
<screen><prompt>bash#</prompt> ./checksetup.pl</screen>
<!-- We really need a "module-check" switch for checksetup,
which we can use here to make it really clear when they've got
all the modules. -->
<para>
<filename>checksetup.pl</filename> will print out a list of the
required and optional Perl modules, together with the versions
(if any) installed on your machine.
The list of required modules is reasonably long; however, you
may already have several of them installed.
</para>
<para>
There is a meta-module called Bundle::Bugzilla,
which installs all the other
modules with a single command. You should use this if you are running
Perl 5.6.1 or above.
</para>
<para>
The preferred way of installing Perl modules is via CPAN on Unix,
or PPM on Windows (see <xref linkend="win32-perlmodules"/>). These
instructions assume you are using CPAN; if for some reason you need
to install the Perl modules manually, see
<xref linkend="install-perlmodules-manual"/>.
</para>
<screen><prompt>bash#</prompt> perl -MCPAN -e 'install "<modulename>"'</screen>
<para>
If you using Bundle::Bugzilla, invoke the magic CPAN command on it.
Otherwise, you need to work down the
list of modules that <filename>checksetup.pl</filename> says are
required, in the order given, invoking the command on each.
</para>
<tip>
<para>Many people complain that Perl modules will not install for
them. Most times, the error messages complain that they are missing a
file in
<quote>@INC</quote>.
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 you
<emphasis>are</emphasis>
the local UNIX sysadmin, please consult the newsgroup/mailing list
for further assistance or hire someone to help you out.</para>
</tip>
<para>
Here is a complete list of modules and their minimum versions.
Some modules have special installation notes, which follow.
</para>
<para>Required Perl modules:
<orderedlist>
<listitem>
<para>
AppConfig (&min-appconfig-ver;)
</para>
</listitem>
<listitem>
<para>
CGI (&min-cgi-ver;)
</para>
</listitem>
<listitem>
<para>
Data::Dumper (&min-data-dumper-ver;)
</para>
</listitem>
<listitem>
<para>
Date::Format (&min-date-format-ver;)
</para>
</listitem>
<listitem>
<para>
DBI (&min-dbi-ver;)
</para>
</listitem>
<listitem>
<para>
<link linkend="install-modules-dbd-mysql">DBD::mysql</link>
(&min-dbd-mysql-ver;)
</para>
</listitem>
<listitem>
<para>
File::Spec (&min-file-spec-ver;)
</para>
</listitem>
<listitem>
<para>
File::Temp (&min-file-temp-ver;)
</para>
</listitem>
<listitem>
<para>
<link linkend="install-modules-template">Template</link>
(&min-template-ver;)
</para>
</listitem>
<listitem>
<para>
Text::Wrap (&min-text-wrap-ver;)
</para>
</listitem>
</orderedlist>
Optional Perl modules:
<orderedlist>
<listitem>
<para>
<link linkend="install-modules-gd">GD</link>
(&min-gd-ver;) for bug charting
</para>
</listitem>
<listitem>
<para>
<link linkend="install-modules-chart-base">Chart::Base</link>
(&min-chart-base-ver;) for bug charting
</para>
</listitem>
<listitem>
<para>
<link linkend="install-modules-gd-graph">GD::Graph</link>
(&min-gd-graph-ver;) for bug charting
</para>
</listitem>
<listitem>
<para>
<link linkend="install-modules-gd-text-align">GD::Text::Align</link>
(&min-gd-text-align-ver;) for bug charting
</para>
</listitem>
<listitem>
<para>
<link linkend="install-modules-xml-parser">XML::Parser</link>
(&min-xml-parser-ver;) for the XML interface
</para>
</listitem>
<listitem>
<para>
<link linkend="install-modules-patchreader">PatchReader</link>
(&min-patchreader-ver;) for pretty HTML view of patches
</para>
</listitem>
<listitem>
<para>
<link linkend="install-modules-mime-parser">MIME::Parser</link>
(&min-mime-parser-ver;) for the optional email interface
</para>
</listitem>
</orderedlist>
</para>
<section id="install-modules-dbd-mysql">
<title>DBD::mysql</title>
<para>The installation 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.</para>
<para>A host of 'localhost' should be fine. A testing user of 'test',
with a null password, should have sufficient access to run
tests on the 'test' database which MySQL creates upon installation.
</para>
</section>
<section id="install-modules-template">
<title>Template Toolkit (&min-template-ver;)</title>
<para>When 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.
</para>
</section>
<section id="install-modules-gd">
<title>GD (&min-gd-ver;)</title>
<para>The GD module is only required if you want graphical reports.
</para>
<note>
<para>The Perl GD module requires some other libraries that may or
may not be installed on your system, including
<classname>libpng</classname>
and
<classname>libgd</classname>.
The full requirements are listed in the Perl GD module README.
If compiling GD fails, it's probably because you're
missing a required library.</para>
</note>
<tip>
<para>The version of the GD module you need is very closely tied
to the <classname>libgd</classname> version installed on your system.
If you have a version 1.x of <classname>libgd</classname> the 2.x
versions of the GD module won't work for you.
</para>
</tip>
</section>
<section id="install-modules-chart-base">
<title>Chart::Base (&min-chart-base-ver;)</title>
<para>The Chart::Base module is only required if you want graphical
reports.
Note that earlier versions that 0.99c used GIFs, which are no longer
supported by the latest versions of GD.</para>
</section>
<section id="install-modules-gd-graph">
<title>GD::Graph (&min-gd-graph-ver;)</title>
<para>The GD::Graph module is only required if you want graphical
reports.
</para>
</section>
<section id="install-modules-gd-text-align">
<title>GD::Text::Align (&min-gd-text-align-ver;)</title>
<para>The GD::Text::Align module is only required if you want graphical
reports.
</para>
</section>
<section id="install-modules-xml-parser">
<title>XML::Parser (&min-xml-parser-ver;)</title>
<para>The XML::Parser module is only required if you want to import
XML bugs using the <filename>importxml.pl</filename>
script. This is required to use Bugzilla's "move bugs" feature;
you may also want to use it for migrating from another bug database.
XML::Parser requires that the
<classname>expat</classname> library is already installed on your machine.
</para>
</section>
<section id="install-modules-mime-parser">
<title>MIME::Parser (&min-mime-parser-ver;)</title>
<para>The MIME::Parser module is only required if you want to use the
email interface
located in the <filename class="directory">contrib</filename> directory.
</para>
</section>
<section id="install-modules-patchreader">
<title>PatchReader (&min-patchreader-ver;)</title>
<para>The PatchReader module is only required if you want to use
Patch Viewer, a
Bugzilla feature to show code patches in your web browser in a more
readable form.
</para>
</section>
</section>
</section>
<section id="configuration">
<title>Configuration</title>
<warning>
<para>Poorly-configured MySQL and Bugzilla installations have
given attackers full access to systems in the past. Please take the
security parts of these guidelines seriously, even for Bugzilla
machines hidden away behind your firewall.</para>
</warning>
<section id="localconfig">
<title>localconfig</title>
<para>
Once you run <filename>checksetup.pl</filename> with all the correct
modules installed, it displays a message about, and write out a
file called,
<filename>localconfig</filename>. This file contains the default
settings for a number of Bugzilla parameters.
</para>
<para>Load this file in your editor. The only value you
<emphasis>need</emphasis> to change is $db_pass, the password for
the user you will create for your database.
Pick a strong password (for simplicity, it should not contain
single quote characters) and put it here.
</para>
<para>
The other options in the <filename>localconfig</filename> file
are documented by their accompanying comments. If you have a slightly
non-standard MySQL setup, you may wish to change one or more of
the other "$db_*" parameters.
</para>
<para>
You may also wish to change the names of
the priorities, severities, operating systems and platforms for your
installation. However, you can always change these after installation
has finished; if you then re-run
<filename>checksetup.pl</filename>, the changes will get picked up.
</para>
</section>
<section id="mysql">
<title>MySQL</title>
<section id="security-mysql">
<title>Security</title>
<para>MySQL ships as insecure by default.
It allows anybody to on the local machine full administrative
capabilities without requiring a password; the special
MySQL root account (note: this is <emphasis>not</emphasis> the same as
the system root) also has no password.
Also, many installations default to running
<application>mysqld</application> as the system root.
</para>
<orderedlist>
<listitem>
<para>To disable the anonymous user account
and set a password for the root user, execute the following. The
root user password should be different to the bugs user password
you set in
<filename>localconfig</filename> in the previous section,
and also different to
the password for the system root account on your machine.
</para>
<screen> <prompt>bash$</prompt> mysql mysql
<prompt>mysql></prompt> DELETE FROM user WHERE user = '';
<prompt>mysql></prompt> UPDATE user SET password = password('<replaceable>new_password</replaceable>') WHERE user = 'root';
<prompt>mysql></prompt> FLUSH PRIVILEGES;</screen>
<para>From this point forward, to run the
<filename>mysql</filename> command-line client,
you will need to type
<command>mysql -u root -p</command> and enter
<replaceable>new_password</replaceable> when prompted.
</para>
</listitem>
<listitem>
<para>If you run MySQL on the same machine as your web server, you
should disable remote access to MySQL by adding
the following to your <filename>/etc/my.conf</filename>:
</para>
<programlisting> [myslqd]
# Prevent network access to MySQL.
skip-networking</programlisting>
</listitem>
<listitem>
<para>Consult the documentation that came with your system for
information on making <application>mysqld</application> run as an
unprivileged user.
</para>
</listitem>
<listitem>
<para>For added security, you could also run MySQL, or even all
of Bugzilla
in a chroot jail; however, instructions for doing that are beyond
the scope of this document.
</para>
</listitem>
</orderedlist>
</section>
<section id="install-setupdatabase">
<title>Allow large attachments</title>
<para>You need to configure MySQL to accept large packets, if you
want to have attachments larger than 64K. Add the text
below to your
<filename>/etc/my.conf</filename>.
There is also a parameter in Bugzilla
for setting the maximum allowable attachment size, (default 1MB).
Bugzilla will only accept attachments up to the lower of these two
sizes.
</para>
<screen> [mysqld]
# Allow packets up to 1M
set-variable = max_allowed_packet=1M</screen>
</section>
<section id="install-setupdatabase-adduser">
<title>Add a user to MySQL</title>
<para>You need to add a new MySQL user for
Bugzilla to use. (It's not safe to have Bugzilla use the MySQL root
account.) The following instructions assume the defaults in
<filename>localconfig</filename>;
if you changed those, you need to modify the
SQL command appropriately. You will need the
<replaceable>$db_pass</replaceable> password you set in
<filename>localconfig</filename> in
<xref linkend="localconfig"/>.
</para>
<para>We use an SQL <command>GRANT</command> command to create a
<quote>bugs</quote>
user. This also restricts the
<quote>bugs</quote>
user to operations within a database called
<quote>bugs</quote>, and only allows the account to connect from
<quote>localhost</quote>.
Modify it to reflect your setup if you will be connecting from
another machine or as a different user.</para>
<para>Run the <filename>mysql</filename> command-line client and
enter:</para>
<screen> <prompt>mysql></prompt> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,
DROP,REFERENCES ON bugs.* TO bugs@localhost
IDENTIFIED BY '<replaceable>$db_pass</replaceable>';
<prompt>mysql></prompt> FLUSH PRIVILEGES;</screen>
<note>
<para>If you are using MySQL 4, you need to add
the <computeroutput>LOCK TABLES</computeroutput> and
<computeroutput>CREATE TEMPORARY TABLES</computeroutput> permissions
to the list.
</para>
</note>
</section>
</section>
<section>
<title>checksetup.pl</title>
<para>
Next, rerun <filename>checksetup.pl</filename>. It reconfirms
that all the modules are present, and notices the altered
localconfig file, which it assumes you have edited to your
satisfaction. It compiles the UI templates,
connects to the database using the 'bugs'
user you created and the password you defined, and creates the
'bugs' database and the tables therein.
</para>
<para>
After that, it asks for details of an administrator account. Bugzilla
can have multiple administrators - you can create more later - but
it needs one to start off with.
Enter the email address of an administrator, his or her full name,
and a suitable Bugzilla password.
</para>
<para>
<filename>checksetup.pl</filename> will then finish. You may rerun
<filename>checksetup.pl</filename> at any time if you wish.
</para>
</section>
<section id="http">
<title>Web server</title>
<para>Configure your web server according to the instructions in the
appropriate section. The Bugzilla Team recommends Apache.
</para>
<section id="http-apache">
<title>Apache <productname>httpd</productname></title>
<para>Load <filename>httpd.conf</filename> in your editor.</para>
<para>Uncomment (or add) the following line.
This configures Apache to run .cgi files outside the
<filename class="directory">cgi-bin</filename> directory.
</para>
<programlisting> AddHandler cgi-script .cgi</programlisting>
<para>Apache uses <computeroutput><Directory></computeroutput>
directives to permit fine-grained permission setting.
Add the following two lines to a
<computeroutput><Directory></computeroutput> directive that
applies either to the Bugzilla directory or one of its parents
(e.g. the <computeroutput><Directory /var/www/html></computeroutput>
directive).
This allows Bugzilla's <filename>.htaccess</filename> files to
override global permissions, and allows .cgi files to run in the
Bugzilla directory.
</para>
<programlisting> Options +ExecCGI +FollowSymLinks
AllowOverride Limit</programlisting>
<para>Add <filename>index.cgi</filename> to the end
of the <computeroutput>DirectoryIndex</computeroutput>
line.</para>
<para><filename>checksetup.pl</filename> can set tighter permissions
on Bugzilla's files and directories if it knows what user the
webserver runs as. Look for the <computeroutput>User</computeroutput>
line in <filename>httpd.conf</filename>, and place that value in
the <replaceable>$webservergroup</replaceable> variable in
<filename>localconfig</filename>. Then rerun
<filename>checksetup.pl</filename>.
</para>
</section>
<section id="http-iis">
<title>Microsoft <productname>Internet Information Services</productname></title>
<para>If you need, or for some reason even want, to use Microsoft's
<productname>Internet Information Services</productname> or
<productname>Personal Web Server</productname> you should be able
to. You will need to configure them to know how to run CGI scripts.
This is described in Microsoft Knowledge Base article
<ulink url="http://support.microsoft.com/support/kb/articles/Q245/2/25.asp">Q245225</ulink>
for <productname>Internet Information Services</productname> and
<ulink url="http://support.microsoft.com/support/kb/articles/Q231/9/98.asp">Q231998</ulink>
for <productname>Personal Web Server</productname>.
</para>
<para>Also, and this can't be stressed enough, make sure that files such as
<filename>localconfig</filename> and your <filename class="directory">data</filename>
directory are secured as described in <xref linkend="security-access"/>.
</para>
</section>
<section id="http-aol">
<title>AOL Server</title>
<para>Ben FrantzDale reported success using AOL Server with Bugzilla. He
reported his experience and what appears below is based on that.
</para>
<para>AOL Server will have to be configured to run
<glossterm linkend="gloss-cgi">CGI</glossterm> scripts, please consult
the documentation that came with your server for more information on
how to do this.
</para>
<para>Because AOL Server doesn't support <filename>.htaccess</filename>
files, you'll have to create a <glossterm linkend="gloss-tcl">TCL</glossterm>
script. You should create an <filename>aolserver/modules/tcl/filter.tcl</filename>
file (the filename shouldn't matter) with the following contents (change
<computeroutput>/bugzilla/</computeroutput> to the web-based path to
your Bugzilla installation):
</para>
<programlisting>
ns_register_filter preauth GET /bugzilla/localconfig filter_deny
ns_register_filter preauth GET /bugzilla/localconfig~ filter_deny
ns_register_filter preauth GET /bugzilla/\#localconfig\# filter_deny
ns_register_filter preauth GET /bugzilla/*.pl filter_deny
ns_register_filter preauth GET /bugzilla/syncshadowdb filter_deny
ns_register_filter preauth GET /bugzilla/runtests.sh filter_deny
ns_register_filter preauth GET /bugzilla/data/* filter_deny
ns_register_filter preauth GET /bugzilla/template/* filter_deny
proc filter_deny { why } {
ns_log Notice "filter_deny"
return "filter_return"
}
</programlisting>
<warning>
<para>This probably doesn't account for all possible editor backup
files so you may wish to add some additional variations of
<filename>localconfig</filename>. For more information, see
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=186383">
bug 186383</ulink> or <ulink
url="http://online.securityfocus.com/bid/6501">Bugtraq ID 6501</ulink>.
</para>
</warning>
<note>
<para>If you are using webdot from research.att.com (the default
configuration for the <option>webdotbase</option> paramater), you
will need to allow access to <filename>data/webdot/*.dot</filename>
for the reasearch.att.com machine.
</para>
<para>If you are using a local installation of <ulink
url="http://www.graphviz.org">GraphViz</ulink>, you will need to allow
everybody to access <filename>*.png</filename>,
<filename>*.gif</filename>, <filename>*.jpg</filename>, and
<filename>*.map</filename> in the
<filename class="directory">data/webdot</filename> directory.
</para>
</note>
</section>
<section id="security-access">
<title>Web Server Access Controls</title>
<para>Users of Apache can skip this section because
Bugzilla ships with <filename>.htaccess</filename> files which
restrict access in the manner required.
Users of other webservers, read on.
</para>
<para>There are several files in the Bugzilla directory
that should not be accessible from the web. You need to configure
your webserver so they they aren't. Not doing this may reveal
sensitive information such as database passwords.
</para>
<itemizedlist spacing="compact">
<listitem>
<para>In the main Bugzilla directory, you should:</para>
<itemizedlist spacing="compact">
<listitem>
<para>Block:
<simplelist type="inline">
<member><filename>*.pl</filename></member>
<member><filename>*localconfig*</filename></member>
<member><filename>runtests.sh</filename></member>
</simplelist>
</para>
</listitem>
<listitem>
<para>But allow:
<simplelist type="inline">
<member><filename>localconfig.js</filename></member>
<member><filename>localconfig.rdf</filename></member>
</simplelist>
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>In <filename class="directory">data</filename>:</para>
<itemizedlist spacing="compact">
<listitem>
<para>Block everything</para>
</listitem>
<listitem>
<para>But allow:
<simplelist type="inline">
<member><filename>duplicates.rdf</filename></member>
</simplelist>
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>In <filename class="directory">data/webdot</filename>:</para>
<itemizedlist spacing="compact">
<listitem>
<para>If you use a remote webdot server:</para>
<itemizedlist spacing="compact">
<listitem>
<para>Block everything</para>
</listitem>
<listitem>
<para>But allow
<simplelist type="inline">
<member><filename>*.dot</filename></member>
</simplelist>
only for the remote webdot server</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>Otherwise, if you use a local GraphViz:</para>
<itemizedlist spacing="compact">
<listitem>
<para>Block everything</para>
</listitem>
<listitem>
<para>But allow:
<simplelist type="inline">
<member><filename>*.png</filename></member>
<member><filename>*.gif</filename></member>
<member><filename>*.jpg</filename></member>
<member><filename>*.map</filename></member>
</simplelist>
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>And if you don't use any dot:</para>
<itemizedlist spacing="compact">
<listitem>
<para>Block everything</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>In <filename class="directory">Bugzilla</filename>:</para>
<itemizedlist spacing="compact">
<listitem>
<para>Block everything</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>In <filename class="directory">template</filename>:</para>
<itemizedlist spacing="compact">
<listitem>
<para>Block everything</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
<para>You should test to make sure that the files mentioned above are
not accessible from the Internet, especially your
<filename>localconfig</filename> file which contains your database
password. To test, simply point your web browser at the file; for
example, to test mozilla.org's installation, we'd try to access
<ulink url="http://bugzilla.mozilla.org/localconfig"/>. You should
get a <errorcode>403</errorcode> <errorname>Forbidden</errorname>
error.
</para>
</section>
</section>
<section id="install-config-bugzilla">
<title>Bugzilla</title>
<para>
Your Bugzilla should now be working. Access
<filename>http://<your-bugzilla-server>/</filename> -
you should see the Bugzilla
front page. If not, consult the Troubleshooting section,
<xref linkend="troubleshooting"/>.
</para>
<para>
Log in with the administrator account you defined in the last
<filename>checksetup.pl</filename> run. You should go through
the parameters on the Edit Parameters page
(see link in the footer) and see if there are any you wish to
change.
They key parameters are documented in <xref linkend="parameters"/>;
you should certainly alter
<command>maintainer</command> and <command>urlbase</command>;
you may also want to alter
<command>cookiepath</command> or <command>requirelogin</command>.
</para>
<para>
This would also be a good time to revisit the
<filename>localconfig</filename> file and make sure that the
names of the priorities, severities, platforms and operating systems
are those you wish to use when you start creating bugs. Remember
to rerun <filename>checksetup.pl</filename> if you change it.
</para>
<para>
Bugzilla has several optional features which require extra
configuration. You can read about those in
<xref linkend="extraconfig"/>.
</para>
</section>
</section>
<section id="extraconfig">
<title>Optional Additional Configuration</title>
<para>
Bugzilla has a number of optional features. This section describes how
to configure or enable them.
</para>
<section>
<title>Bug Graphs</title>
<para>If you have installed the necessary Perl modules you
can start collecting statistics for the nifty Bugzilla
graphs.</para>
<screen><prompt>bash#</prompt> <command>crontab -e</command></screen>
<para>
This should bring up the crontab file in your editor.
Add a cron entry like this to run
<filename>collectstats.pl</filename>
daily at 5 after midnight:
</para>
<programlisting>5 0 * * * cd <your-bugzilla-directory> ; ./collectstats.pl</programlisting>
<para>After two days have passed you'll be able to view bug graphs from
the Reports page.</para>
</section>
<section>
<title>Dependency Charts</title>
<para>As well as the text-based dependency trees, Bugzilla also
supports a graphical view of dependency relationships, using a
package called 'dot'.
Exactly how this works is controlled by the 'webdotbase' parameter,
which can have one of three values:
</para>
<para>
<orderedlist>
<listitem>
<para>
A complete file path to the command 'dot' (part of
<ulink url="http://www.graphviz.org/">GraphViz</ulink>)
will generate the graphs locally
</para>
</listitem>
<listitem>
<para>
A URL prefix pointing to an installation of the webdot package will
generate the graphs remotely
</para>
</listitem>
<listitem>
<para>
A blank value will disable dependency graphing.
</para>
</listitem>
</orderedlist>
</para>
<para>The easiest way to get this working is to install
<ulink url="http://www.graphviz.org/">GraphViz</ulink>. If you
do that, you need to
<ulink url="http://httpd.apache.org/docs/mod/mod_imap.html">enable
server-side image maps</ulink> in Apache.
Alternatively, you could set up a webdot server, or use the AT&T
public webdot server. This is the default for the webdotbase param,
but it's often overloaded and slow. Note that AT&T's server
won't work
if Bugzilla is only accessible using HARTS.
<emphasis>Editor's note: What the heck is HARTS? Google doesn't know...
</emphasis>
</para>
</section>
<section>
<title>The Whining Cron</title>
<para>What good are
bugs if they're not annoying? To help make them more so you
can set up Bugzilla's automatic whining system to complain at engineers
which leave their bugs in the NEW or REOPENED state without triaging them.
</para>
<para>
This can be done by
adding the following command as a daily crontab entry, in the same manner
as explained above for bug graphs. This example runs it at 12.55am.
</para>
<programlisting>55 0 * * * cd <your-bugzilla-directory> ; ./whineatnews.pl</programlisting>
</section>
<section id="patch-viewer">
<title>Patch Viewer</title>
<para>
Patch Viewer is the engine behind Bugzilla's graphical display of
code patches. You can integrate this with copies of the
<filename>cvs</filename>, <filename>lxr</filename> and
<filename>bonsai</filename> tools if you have them, by giving
the locations of your installation of these tools in
<filename>editparams.cgi</filename>.
</para>
<para>
Patch Viewer also optionally will use the
<filename>cvs</filename>, <filename>diff</filename> and
<filename>interdiff</filename>
command-line utilities if they exist on the system.
Interdiff can be obtained from
<ulink url="http://cyberelk.net/tim/patchutils/"/>.
If these programs are not in the system path, you can configure
their locations in <filename>localconfig</filename>.
</para>
</section>
<section id="bzldap">
<title>LDAP Authentication</title>
<para>LDAP authentication is a module for Bugzilla's plugin
authentication architecture.
</para>
<para>
The existing authentication
scheme for Bugzilla uses email addresses as the primary user ID, and a
password to authenticate that user. All places within Bugzilla where
you need to deal with user ID (e.g assigning a bug) use the email
address. The LDAP authentication builds on top of this scheme, rather
than replacing it. The initial log in is done with a username and
password for the LDAP directory. This then fetches the email address
from LDAP and authenticates seamlessly in the standard Bugzilla
authentication scheme using this email address. If an account for this
address already exists in your Bugzilla system, it will log in to that
account. If no account for that email address exists, one is created at
the time of login. (In this case, Bugzilla will attempt to use the
"displayName" or "cn" attribute to determine the user's full name.)
After authentication, all other user-related tasks are still handled by
email address, not LDAP username. You still assign bugs by email
address, query on users by email address, etc.
</para>
<caution>
<para>Because the Bugzilla account is not created until the first time
a user logs in, a user who has not yet logged is unknown to Bugzilla.
This means they cannot be used as an assignee or QA contact (default or
otherwise), added to any cc list, or any other such operation. One
possible workaround is the <filename>bugzilla_ldapsync.rb</filename>
script in the
<glossterm linkend="gloss-contrib"><filename class="directory">contrib</filename></glossterm> directory. Another possible solution is fixing
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=201069">bug
201069</ulink>.
</para>
</caution>
<para>Parameters required to use LDAP Authentication:</para>
<variablelist>
<varlistentry id="param-loginmethod">
<term>loginmethod</term>
<listitem>
<para>This parameter should be set to <quote>LDAP</quote>
<emphasis>only</emphasis> if you will be using an LDAP directory
for authentication. If you set this param to <quote>LDAP</quote> but
fail to set up the other parameters listed below you will not be
able to log back in to Bugzilla one you log out. If this happens
to you, you will need to manually edit
<filename>data/params</filename> and set loginmethod to
<quote>DB</quote>.
</para>
</listitem>
</varlistentry>
<varlistentry id="param-LDAPserver">
<term>LDAPserver</term>
<listitem>
<para>This parameter should be set to the name (and optionally the
port) of your LDAP server. If no port is specified, it assumes
the default LDAP port of 389.
</para>
<para>Ex. <quote>ldap.company.com</quote>
or <quote>ldap.company.com:3268</quote>
</para>
</listitem>
</varlistentry>
<varlistentry id="param-LDAPbinddn">
<term>LDAPbinddn [Optional]</term>
<listitem>
<para>Some LDAP servers will not allow an anonymous bind to search
the directory. If this is the case with your configuration you
should set the LDAPbinddn parameter to the user account Bugzilla
should use instead of the anonymous bind.
</para>
<para>Ex. <quote>cn=default,cn=user:password</quote></para>
</listitem>
</varlistentry>
<varlistentry id="param-LDAPBaseDN">
<term>LDAPBaseDN</term>
<listitem>
<para>The LDAPBaseDN parameter should be set to the location in
your LDAP tree that you would like to search for email addresses.
Your uids should be unique under the DN specified here.
</para>
<para>Ex. <quote>ou=People,o=Company</quote></para>
</listitem>
</varlistentry>
<varlistentry id="param-LDAPuidattribute">
<term>LDAPuidattribute</term>
<listitem>
<para>The LDAPuidattribute parameter should be set to the attribute
which contains the unique UID of your users. The value retrieved
from this attribute will be used when attempting to bind as the
user to confirm their password.
</para>
<para>Ex. <quote>uid</quote></para>
</listitem>
</varlistentry>
<varlistentry id="param-LDAPmailattribute">
<term>LDAPmailattribute</term>
<listitem>
<para>The LDAPmailattribute parameter should be the name of the
attribute which contains the email address your users will enter
into the Bugzilla login boxes.
</para>
<para>Ex. <quote>mail</quote></para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section id="content-type">
<title>Prevent users injecting malicious
Javascript</title>
<para>It is possible for a Bugzilla user to take advantage of character
set encoding ambiguities to inject HTML into Bugzilla comments. This
could include malicious scripts.
Due to internationalization concerns, we are unable to
incorporate by default the code changes suggested by
<ulink
url="http://www.cert.org/tech_tips/malicious_code_mitigation.html#3">
the CERT advisory</ulink> on this issue.
If your installation is for an English speaking audience only, making the
change below will prevent this problem.
</para>
<para>Simply locate the following line in
<filename>Bugzilla/CGI.pm</filename>:
<programlisting>$self->charset('');</programlisting>
and change it to:
<programlisting>$self->charset('ISO-8859-1');</programlisting>
</para>
</section>
<section id="mod-throttle"
xreflabel="Using mod_throttle to prevent Denial of Service attacks">
<title>
<filename>mod_throttle</filename></title>
<para>It is possible for a user, by mistake or on purpose, to access
the database many times in a row which can result in very slow access
speeds for other users. If your Bugzilla installation is experiencing
this problem, you may install the Apache module
<filename>mod_throttle</filename>
which can limit connections by IP address. You may download this module
at
<ulink url="http://www.snert.com/Software/mod_throttle/"/>.
Follow the instructions to install into your Apache install.
<emphasis>This module only functions with the Apache web
server!</emphasis>
The command you need is
<command>ThrottleClientIP</command>. See the
<ulink url="http://www.snert.com/Software/mod_throttle/">documentation</ulink>
for more information.</para>
</section>
<section id="security-networking">
<title>TCP/IP Ports</title>
<para>A single-box Bugzilla only requires port 80, plus port 25 if
you are using the optional email interface. You should firewall all
other ports and/or disable services listening on them.
</para>
</section>
<section id="security-daemon">
<title>Daemon Accounts</title>
<para>Many daemons, such as Apache's httpd and MySQL's mysqld default to
running as either <quote>root</quote> or <quote>nobody</quote>. Running
as <quote>root</quote> introduces obvious security problems, but the
problems introduced by running everything as <quote>nobody</quote> may
not be so obvious. Basically, if you're running every daemon as
<quote>nobody</quote> and one of them gets compromised, they all get
compromised. For this reason it is recommended that you create a user
account for each daemon.
</para>
</section>
</section>
<section id="os-specific">
<title>OS-Specific Installation Notes</title>
<para>Many aspects of the Bugzilla installation can be affected by the
the operating system you choose to install it on. Sometimes it can be made
easier and others more difficult. This section will attempt to help you
understand both the difficulties of running on specific operating systems
and the utilities available to make it easier.
</para>
<para>If you have anything to add or notes for an operating system not
covered, please file a bug in &bzg-bugs;.
</para>
<section id="os-win32">
<title>Microsoft Windows</title>
<para>Making Bugzilla work on Windows is still a painful processes.
The Bugzilla Team is working to make it easier, but that goal is not
considered a top priority. If you wish to run Bugzilla, we still
recommend doing so on a Unix based system such as GNU/Linux. As of this
writing, all members of the Bugzilla team and all known large installations
run on Unix based systems.
</para>
<para>If after hearing all that, you have enough pain tolerance to attempt
installing Bugzilla on Win32, here are some pointers.
<![%bz-devel;[
Because this is a development version of the guide, these instructions
are subject to change without notice. In fact, the Bugzilla Team hopes
to have Bugzilla reasonably close to "out of
the box" compatibility with Windows by the 2.18 release.
]]>
</para>
<section id="win32-perl">
<title>Win32 Perl</title>
<para>Perl for Windows can be obtained from <ulink
url="http://www.activestate.com/">ActiveState</ulink>. You should be
able to find a compiled binary at <ulink
url="http://aspn.activestate.com/ASPN/Downloads/ActivePerl/"/>.
</para>
</section>
<section id="win32-perlmodules">
<title>Perl Modules on Win32</title>
<para>Bugzilla on Windows requires the same perl modules found in
<xref linkend="install-perlmodules"/>. The main difference is that
windows uses <glossterm linkend="gloss-ppm">PPM</glossterm> instead of
CPAN.
</para>
<programlisting>
C:\perl> <command>ppm install <module name></command>
</programlisting>
<note>
<para>The above syntax should work for all modules with the exception
of Template Toolkit. The <ulink
url="http://tt2.org/download.html#win32">Template Toolkit website</ulink>
suggests using the instructions on <ulink
url="http://openinteract.sourceforge.net/">OpenInteract's website</ulink>.
</para>
<para>The following commands will install the required packages
missing from the ActivePerl default installation:
</para>
<programlisting>
<command>ppm repository add oi http://openinteract.sourceforge.net/ppmpackages</command>
<command>ppm install DBD-mysql</command>
<command>ppm install Template-Toolkit</command>
<command>ppm install TimeDate</command>
</programlisting>
</note>
</section>
<section id="win32-code-changes">
<title>Code changes required to run on win32</title>
<para>As Bugzilla still doesn't run "out of the box" on
Windows, code has to be modified. This section lists the required
changes.
</para>
<section id="win32-code-checksetup">
<title>Changes to <filename>checksetup.pl</filename></title>
<para>In <filename>checksetup.pl</filename>, the line reading:</para>
<programlisting>
my $mysql_binaries = `which mysql`;
</programlisting>
<para>to</para>
<programlisting>
my $mysql_binaries = "D:\\mysql\\bin\\mysql";
</programlisting>
<para>And you'll also need to change:</para>
<programlisting>
my $webservergid = getgrnam($my_webservergroup)
</programlisting>
<para>to</para>
<programlisting>
my $webservergid = '8'
</programlisting>
</section>
<section id="win32-code-bugmail">
<title>Changes to <filename>BugMail.pm</filename></title>
<para>To make bug email work on Win32 (until
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=84876">bug
84876</ulink> lands), the
simplest way is to have the Net::SMTP Perl module installed and
change this:</para>
<programlisting>
open(SENDMAIL, "|/usr/lib/sendmail $sendmailparam -t -i") ||
die "Can't open sendmail";
print SENDMAIL trim($msg) . "\n";
close SENDMAIL;
</programlisting>
<para>to</para>
<programlisting>
use Net::SMTP;
my $smtp_server = 'smtp.mycompany.com'; # change this
# Use die on error, so that the mail will be in the 'unsent mails' and
# can be sent from the sanity check page.
my $smtp = Net::SMTP->new($smtp_server) ||
die 'Cannot connect to server \'$smtp_server\'';
$smtp->mail('bugzilla-daemon@mycompany.com'); # change this
$smtp->to($person);
$smtp->data();
$smtp->datasend($msg);
$smtp->dataend();
$smtp->quit;
</programlisting>
<para>Don't forget to change the name of your SMTP server and the
domain of the sending email address (after the '@') in the above
lines of code.</para>
</section>
</section>
<section id="win32-http">
<title>Serving the web pages</title>
<para>As is the case on Unix based systems, any web server should be
able to handle Bugzilla; however, the Bugzilla Team still recommends
Apache whenever asked. No matter what web server you choose, be sure
to pay attention to the security notes in <xref linkend="security-access"/>.
More information on configuring specific web servers can be found in
<xref linkend="http"/>.
</para>
<note>
<para>If using Apache on windows, you can set the <ulink
url="http://httpd.apache.org/docs-2.0/mod/core.html#scriptinterpretersource">ScriptInterpreterSource</ulink>
directive in your Apache config to avoid having
to modify the first line of every script to contain your path to
perl instead of <filename>/usr/bin/perl</filename>.
</para>
</note>
</section>
</section>
<section id="os-macosx">
<title><productname>Mac OS X</productname></title>
<para>Apple did not include the GD library with Mac OS X. Bugzilla
needs this for bug graphs.</para>
<para>You can install it using a program called
Fink, which is similar in nature to the CPAN installer, but installs
common GNU utilities. Fink is available from
<ulink url="http://sourceforge.net/projects/fink/"/>.</para>
<para>Follow the instructions for setting up Fink. Once it's installed,
you'll want to use it to install the <filename>gd2</filename> package.
</para>
<para>It will prompt you for a number of dependencies, type 'y' and hit
enter to install all of the dependencies and then watch it work. You will
then be able to use <glossterm linkend="gloss-cpan">CPAN</glossterm> to
install the GD Perl module.
</para>
<note>
<para>To prevent creating conflicts with the software that Apple
installs by default, Fink creates its own directory tree at
<filename class="directory">/sw</filename> where it installs most of
the software that it installs. This means your libraries and headers
will be at <filename class="directory">/sw/lib</filename> and
<filename class="directory">/sw/include</filename> instead of
<filename class="directory">/usr/lib</filename> and
<filename class="directory">/usr/include</filename>. When the
Perl module config script asks where your <filename>libgd</filename>
is, be sure to tell it
<filename class="directory">/sw/lib</filename>.
</para>
</note>
<para>Also available via Fink is <filename>expat</filename>. After using
fink to install the expat package you will be able to install
XML::Parser using CPAN. There is one caveat. Unlike recent versions of
the GD module, XML::Parser doesn't prompt for the location of the
required libraries. When using CPAN, you will need to use the following
command sequence:
</para>
<screen>
# perl -MCPAN -e'look XML::Parser' <co id="macosx-look"/>
# perl Makefile.PL EXPATLIBPATH=/sw/lib EXPATINCPATH=/sw/include
# make; make test; make install <co id="macosx-make"/>
# exit <co id="macosx-exit"/>
</screen>
<calloutlist>
<callout arearefs="macosx-look macosx-exit">
<para>The look command will download the module and spawn a
new shell with the extracted files as the current working directory.
The exit command will return you to your original shell.
</para>
</callout>
<callout arearefs="macosx-make">
<para>You should watch the output from these make commands,
especially <quote>make test</quote> as errors may prevent XML::Parser
from functioning correctly with Bugzilla.
</para>
</callout>
</calloutlist>
</section>
<section id="os-mandrake">
<title>Linux-Mandrake 8.0</title>
<para>Linux-Mandrake 8.0 includes every required and optional library
for Bugzilla. The easiest way to install them is by using the
<command>urpmi</command> utility. If you follow these commands, you
should have everything you need for Bugzilla, and
<command>./checksetup.pl</command> should not complain about any
missing libraries. You may already have some of these installed.
</para>
<screen>
<prompt>bash#</prompt> <command>urpmi perl-mysql</command>
<prompt>bash#</prompt> <command>urpmi perl-chart</command>
<prompt>bash#</prompt> <command>urpmi perl-gd</command>
<prompt>bash#</prompt> <command>urpmi perl-MailTools</command> <co id="test-mailtools"/>
<prompt>bash#</prompt> <command>urpmi apache-modules</command>
</screen>
<calloutlist>
<callout arearefs="test-mailtools">
<para>for Bugzilla email integration</para>
</callout>
</calloutlist>
</section>
</section>
<section id="troubleshooting">
<title>Troubleshooting</title>
<para>This section gives solutions to common Bugzilla installation
problems. If none of the section headings seems to match your
problem, read the general advice.
</para>
<section id="general-advice">
<title>General Advice</title>
<para>
If you can't get <filename>checksetup.pl</filename> to run to
completion, it normally explains what's wrong and how to fix it.
If you can't work it out, or if it's being uncommunicative, post
the errors in the
<ulink url="news://news.mozilla.org/netscape.public.mozilla.webtools">netscape.public.mozilla.webtools</ulink>
newsgroup.
</para>
<para>
If you have made it all the way through
<xref linkend="installation"/> (Installation) and
<xref linkend="configuration"/> (Configuration) but
accessing the Bugzilla URL doesn't work,
the first thing to do is to check your webserver error log. For
Apache, this is often located at
<filename>/etc/logs/httpd/error_log</filename>. The error messages
you see may be self-explanatory enough to enable you to diagnose and
fix the problem. If not, see below for some commonly-encountered
errors. If that doesn't help, post the errors to the newsgroup.
</para>
</section>
<section>
<title>I installed a Perl module, but
<filename>checksetup.pl</filename> claims it's not installed!</title>
<para>
You have two versions of Perl on your machine. You are installing
modules into one, and Bugzilla is using the other. Rerun the CPAN
commands (or manual compile) using the full path to Perl from the
top of <filename>checksetup.pl</filename>. This will make sure you
are installing the modules in the right place.
</para>
</section>
<section>
<title>Bundle::Bugzilla makes me upgrade to Perl 5.6.1</title>
<para>
Try executing <command>perl -MCPAN -e 'install CPAN'</command>
and then continuing.
</para>
<para>
Certain older versions of the CPAN toolset were somewhat naive about how
to upgrade Perl modules. When a couple of modules got rolled into the core
Perl distribution for 5.6.1, CPAN thought that the best way to get those
modules up to date was to haul down the Perl distribution itself and
build it. Needless to say, this has caused headaches for just about
everybody. Upgrading to a newer version of CPAN with the
commandline above should fix things.
</para>
</section>
<section>
<title>DBD::Sponge::db prepare failed</title>
<para>
The following error message may appear due to a bug in DBD::mysql
(over which the Bugzilla team have no control):
</para>
<programlisting><![CDATA[ DBD::Sponge::db prepare failed: Cannot determine NUM_OF_FIELDS at D:/Perl/site/lib/DBD/mysql.pm line 248.
SV = NULL(0x0) at 0x20fc444
REFCNT = 1
FLAGS = (PADBUSY,PADMY)
]]></programlisting>
<para>
To fix this, go to
<filename><path-to-perl>/lib/DBD/sponge.pm</filename>
in your Perl installation and replace
</para>
<programlisting><![CDATA[ my $numFields;
if ($attribs->{'NUM_OF_FIELDS'}) {
$numFields = $attribs->{'NUM_OF_FIELDS'};
} elsif ($attribs->{'NAME'}) {
$numFields = @{$attribs->{NAME}};
]]></programlisting>
<para>
by
</para>
<programlisting><![CDATA[ my $numFields;
if ($attribs->{'NUM_OF_FIELDS'}) {
$numFields = $attribs->{'NUM_OF_FIELDS'};
} elsif ($attribs->{'NAMES'}) {
$numFields = @{$attribs->{NAMES}};
]]></programlisting>
<para>
(note the S added to NAME.)
</para>
</section>
<section id="paranoid-security">
<title>cannot chdir(/var/spool/mqueue)</title>
<para>If you are installing Bugzilla on SuSE Linux, or some other
distributions with
<quote>paranoid</quote>
security options, it is possible that the checksetup.pl script may fail
with the error:
<programlisting><![CDATA[cannot chdir(/var/spool/mqueue): Permission denied
]]></programlisting>
</para>
<para>
This is because your
<filename>/var/spool/mqueue</filename>
directory has a mode of
<quote>drwx------</quote>. Type
<command>chmod 755
<filename>/var/spool/mqueue</filename>
</command>
as root to fix this problem.
</para>
</section>
<section id="trouble-filetemp">
<title>Your vendor has not defined Fcntl macro O_NOINHERIT</title>
<para>This is caused by a bug in the version of
<productname>File::Temp</productname> that is distributed with perl
5.6.0. Many minor variations of this error have been reported:
</para>
<programlisting>Your vendor has not defined Fcntl macro O_NOINHERIT, used
at /usr/lib/perl5/site_perl/5.6.0/File/Temp.pm line 208.
Your vendor has not defined Fcntl macro O_EXLOCK, used
at /usr/lib/perl5/site_perl/5.6.0/File/Temp.pm line 210.
Your vendor has not defined Fcntl macro O_TEMPORARY, used
at /usr/lib/perl5/site_perl/5.6.0/File/Temp.pm line 233.</programlisting>
<para>Numerous people have reported that upgrading to version 5.6.1
or higher solved the problem for them. A less involved fix is to apply
the following patch, which is also
available as a <ulink url="../xml/filetemp.patch">patch file</ulink>.
</para>
<programlisting><![CDATA[--- File/Temp.pm.orig Thu Feb 6 16:26:00 2003
+++ File/Temp.pm Thu Feb 6 16:26:23 2003
@@ -205,6 +205,7 @@
# eg CGI::Carp
local $SIG{__DIE__} = sub {};
local $SIG{__WARN__} = sub {};
+ local *CORE::GLOBAL::die = sub {};
$bit = &$func();
1;
};
@@ -226,6 +227,7 @@
# eg CGI::Carp
local $SIG{__DIE__} = sub {};
local $SIG{__WARN__} = sub {};
+ local *CORE::GLOBAL::die = sub {};
$bit = &$func();
1;
};]]></programlisting>
</section>
</section>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-always-quote-attributes:t
sgml-auto-insert-required-elements:t
sgml-balanced-tag-edit:t
sgml-exposed-tags:nil
sgml-general-insert-case:lower
sgml-indent-data:t
sgml-indent-step:2
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
sgml-minimize-attributes:nil
sgml-namecase-general:t
sgml-omittag:t
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
sgml-shorttag:t
sgml-tag-region-if-active:t
End:
-->
|