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 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488
|
<!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> -->
<chapter id="installation" xreflabel="Bugzilla Installation">
<title>Installation</title>
<section id="stepbystep" xreflabel="Bugzilla Installation Step-by-step">
<title>Step-by-step Install</title>
<section>
<title>Introduction</title>
<para>Bugzilla 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 the
<xref linkend="win32" />
for further advice on getting Bugzilla to work on Microsoft
Windows.</para>
</section>
<section>
<title>Package List</title>
<note>
<para> 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; see
<xref linkend="bundlebugzilla" />.
</para>
</note>
<para>The software packages necessary for the proper running of
Bugzilla (with download links) are:
<orderedlist>
<listitem>
<para>
<ulink url="http://www.mysql.com/">MySQL database server</ulink>
(3.22.5 or greater)
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.perl.org">Perl</ulink>
(5.005 or greater, 5.6.1 is recommended if you wish to
use Bundle::Bugzilla)
</para>
</listitem>
<listitem>
<para>Perl Modules (minimum version):
<orderedlist>
<listitem>
<para>
<ulink url="http://www.template-toolkit.org">Template</ulink>
(v2.07)
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.cpan.org/modules/by-module/AppConfig/">AppConfig
</ulink>
(v1.52)
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.cpan.org/authors/id/MUIR/modules/Text-Tabs%2BWrap-2001.0131.tar.gz">Text::Wrap</ulink>
(v2001.0131)
</para>
</listitem>
<listitem>
<para>
<ulink url="http://search.cpan.org/search?dist=File-Spec">File::Spec
</ulink>
(v0.8.2)
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.cpan.org/modules/by-module/Data/">Data::Dumper
</ulink>
(any)
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.cpan.org/modules/by-module/Mysql/">DBD::mysql
</ulink>
(v1.2209)
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.cpan.org/modules/by-module/DBI/">DBI</ulink>
(v1.13)
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.cpan.org/modules/by-module/Date/">Date::Parse
</ulink>
(any)
</para>
</listitem>
<listitem>
<para>
CGI::Carp
(any)
</para>
</listitem>
</orderedlist>
and, optionally:
<orderedlist>
<listitem>
<para>
<ulink url="http://www.cpan.org/modules/by-module/GD/">GD</ulink>
(v1.19) for bug charting
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.cpan.org/modules/by-module/Chart/">Chart::Base
</ulink>
(v0.99c) for bug charting
</para>
</listitem>
<listitem>
<para>
XML::Parser
(any) for the XML interface
</para>
</listitem>
<listitem>
<para>
MIME::Parser
(any) for the email interface
</para>
</listitem>
</orderedlist>
</para>
</listitem>
<listitem>
<para>
The web server of your choice.
<ulink url="http://www.apache.org/">Apache</ulink>
is highly recommended.
</para>
</listitem>
</orderedlist>
<warning>
<para>It 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.</para>
</warning>
<note>
<para>Linux-Mandrake 8.0 includes every
required and optional library for Bugzilla. The easiest way to
install them is by using the
<filename>urpmi</filename>
utility. If you follow these commands, you should have everything you
need for Bugzilla, and
<filename>checksetup.pl</filename>
should not complain about any missing libraries. You may already have
some of these installed.</para>
<simplelist>
<member>
<prompt>bash#</prompt>
<command>urpmi perl-mysql</command>
</member>
<member>
<prompt>bash#</prompt>
<command>urpmi perl-chart</command>
</member>
<member>
<prompt>bash#</prompt>
<command>urpmi perl-gd</command>
</member>
<member>
<prompt>bash#</prompt>
<command>urpmi perl-MailTools</command>
(for Bugzilla email integration)</member>
<member>
<prompt>bash#</prompt>
<command>urpmi apache-modules</command>
</member>
</simplelist>
</note>
</para>
</section>
<section id="install-mysql">
<title>MySQL</title>
<para>Visit the MySQL homepage at
<ulink url="http://www.mysql.com">www.mysql.com</ulink>
to grab and install the latest stable release of the server.
</para>
<note>
<para> Many of the binary
versions of MySQL store their data files in
<filename>/var</filename>.
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 to <filename>configure</filename>
if you build MySQL from source yourself.</para>
</note>
<para>If you install from something other than an RPM or Debian
package, you will need to add <filename>mysqld</filename>
to your init scripts 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.
</para>
<para>Change your init script to start
<filename>mysqld</filename>
with the ability to accept large packets. By default,
<filename>mysqld</filename>
only accepts packets up to 64K long. This limits the size of
attachments you may put on bugs. If you add
<option>-O max_allowed_packet=1M</option>
to the command that starts
<filename>mysqld</filename>
(or <filename>safe_mysqld</filename>),
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.</para>
<para>If you plan on running Bugzilla and MySQL on the same machine,
consider using the
<option>--skip-networking</option>
option in the init script. This enhances security by preventing
network access to MySQL.</para>
</section>
<section id="install-perl">
<title>Perl</title>
<para>Any machine that doesn't have Perl on it is a sad machine indeed.
Perl can be got in source form from
<ulink url="http://www.perl.com">perl.com</ulink> for 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 &perl-ver;.</para>
<tip id="bundlebugzilla"
xreflabel="Using Bundle::Bugzilla instead of manually installing Perl modules">
<para>You can skip the following Perl module installation steps by
installing
<productname>Bundle::Bugzilla</productname>
from
<glossterm linkend="gloss-cpan">CPAN</glossterm>,
which installs all required modules for you.</para>
<para>
<computeroutput>
<prompt>bash#</prompt>
<command>perl -MCPAN -e 'install "Bundle::Bugzilla"'</command>
</computeroutput>
</para>
<para>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.</para>
</tip>
</section>
<section id="perl-modules">
<title>Perl Modules</title>
<para>
All Perl modules can be found on the
<ulink url="http://www.cpan.org">Comprehensive Perl
Archive Network</ulink> (CPAN). The
CPAN servers have a real tendency to bog down, so please use mirrors.
</para>
<para>Quality, 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:
</para>
<para>
<computeroutput>
<prompt>bash#</prompt>
<command>perl -MCPAN -e 'install "<modulename>"'</command>
</computeroutput>
</para>
<para>
To do it the hard way:
</para>
<para>Untar the module tarball -- it should create its own
directory</para>
<para>CD to the directory just created, and enter the following
commands:
<orderedlist>
<listitem>
<para>
<computeroutput>
<prompt>bash#</prompt>
<command>perl Makefile.PL</command>
</computeroutput>
</para>
</listitem>
<listitem>
<para>
<computeroutput>
<prompt>bash#</prompt>
<command>make</command>
</computeroutput>
</para>
</listitem>
<listitem>
<para>
<computeroutput>
<prompt>bash#</prompt>
<command>make test</command>
</computeroutput>
</para>
</listitem>
<listitem>
<para>
<computeroutput>
<prompt>bash#</prompt>
<command>make install</command>
</computeroutput>
</para>
</listitem>
</orderedlist>
</para>
<warning>
<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>
</warning>
<section>
<title>DBI</title>
<para>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.</para>
</section>
<section>
<title>Data::Dumper</title>
<para>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.</para>
</section>
<section>
<title>MySQL-related modules</title>
<para>The Perl/MySQL interface requires a few mutually-dependent Perl
modules. These modules are grouped together into the the
Msql-Mysql-modules package.</para>
<para>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.</para>
<para>A 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.
</para>
</section>
<section>
<title>TimeDate modules</title>
<para>Many 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.
</para>
</section>
<section>
<title>GD (optional)</title>
<para>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.</para>
<note>
<para>The Perl GD library 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 library README.
If compiling GD fails, it's probably because you're
missing a required library.</para>
</note>
</section>
<section>
<title>Chart::Base (optional)</title>
<para>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.</para>
</section>
<section>
<title>Template Toolkit</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. 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.</para>
</section>
</section>
<section>
<title>HTTP Server</title>
<para>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
<quote>bugs</quote>
user permissions accordingly.
<note>
<para>We 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.</para>
</note>
</para>
<para>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:
<programlisting>AddHandler cgi-script .cgi</programlisting>
</para>
<para>With Apache you'll also want to make sure that within the
httpd.conf file the line:
<programlisting>
Options ExecCGI
AllowOverride Limit
</programlisting>
is in the stanza that covers the directories into which you intend to
put the bugzilla .html and .cgi files.
<note>
<para>AllowOverride Limit allows the use of a Deny statement in the
.htaccess file generated by checksetup.pl</para>
<para>Users of older versions of Apache may find the above lines
in the srm.conf and access.conf files, respecitvely.</para>
</note>
</para>
<warning>
<para>There are important files and directories that should not be a
served by the HTTP server - most files in the
<quote>data</quote>
and
<quote>shadow</quote>
directories and the
<quote>localconfig</quote>
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
<xref linkend="htaccess" />
for details on how to do this for Apache; the checksetup.pl
script should create appropriate .htaccess files for you.</para>
</warning>
</section>
<section>
<title>Bugzilla</title>
<para>You should untar the Bugzilla files into a directory that you're
willing to make writable by the default web server user (probably
<quote>nobody</quote>).
You may decide to put the files in the main web space for your
web server or perhaps in
<filename>/usr/local</filename>
with a symbolic link in the web space that points to the Bugzilla
directory.</para>
<tip>
<para>If you symlink the bugzilla directory into your Apache's HTML
heirarchy, you may receive
<errorname>Forbidden</errorname>
errors unless you add the
<quote>FollowSymLinks</quote>
directive to the <Directory> entry for the HTML root
in httpd.conf.</para>
</tip>
<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 post-install
<filename>checksetup.pl</filename>
script, which locks down your installation.</para>
<para>Lastly, you'll need to set up a symbolic link to
<filename>/usr/bonsaitools/bin/perl</filename>
for the correct location of your Perl executable (probably
<filename>/usr/bin/perl</filename>).
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.
</para>
<para>
<programlisting>perl -pi -e
's@#\!/usr/bonsaitools/bin/perl@#\!/usr/bin/perl@' *cgi *pl Bug.pm
processmail syncshadowdb</programlisting>
Change <filename>/usr/bin/perl</filename> to match the location
of Perl on your machine.
</para>
</section>
<section>
<title>Setting Up the MySQL Database</title>
<para>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.</para>
<para>First, you'll want to fix MySQL permissions to allow access from
Bugzilla. For the purpose of this Installation section, the Bugzilla
username will be
<quote>bugs</quote>, and will have minimal permissions.
</para>
<para>Begin by giving the MySQL root user a password. MySQL passwords are limited
to 16 characters.
<simplelist>
<member>
<computeroutput>
<prompt>bash#</prompt>
<command>mysql -u root mysql</command>
</computeroutput>
</member>
<member>
<computeroutput>
<prompt>mysql></prompt>
<command>UPDATE user SET Password=PASSWORD('<new_password>')
WHERE user='root';</command>
</computeroutput>
</member>
<member>
<computeroutput>
<prompt>mysql></prompt>
<command>FLUSH PRIVILEGES;</command>
</computeroutput>
</member>
</simplelist>
From this point on, if you need to access MySQL as the MySQL root user,
you will need to use
<command>mysql -u root -p</command>
and enter <new_password>. Remember that MySQL user names have
nothing to do with Unix user names (login names).</para>
<para>Next, we use an SQL <command>GRANT</command> command to create a
<quote>bugs</quote>
user, and grant sufficient permissions for checksetup.pl, which we'll
use later, to work its magic. 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>Remember to set <bugs_password> to some unique password.</para>
<para>If you are using MySQL 4.0 or newer, enter:
<simplelist>
<member>
<computeroutput>
<prompt>mysql></prompt>
<command>GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,
ALTER,CREATE,DROP,LOCK TABLES,CREATE TEMPORARY
TABLES,REFERENCES ON bugs.* TO bugs@localhost
IDENTIFIED BY '<bugs_password>';</command>
</computeroutput>
</member>
<member>
<computeroutput>
<prompt>mysql></prompt>
<command>FLUSH PRIVILEGES;</command>
</computeroutput>
</member>
</simplelist>
</para>
<para>If you are using an older version of MySQL,
the LOCK TABLES and CREATE TEMPORARY TABLES permissions
need to be removed from the list:
<simplelist>
<member>
<computeroutput>
<prompt>mysql></prompt>
<command>GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,
ALTER,CREATE,DROP,REFERENCES ON bugs.* TO bugs@localhost
IDENTIFIED BY '<bugs_password>';</command>
</computeroutput>
</member>
<member>
<computeroutput>
<prompt>mysql></prompt>
<command>FLUSH PRIVILEGES;</command>
</computeroutput>
</member>
</simplelist>
</para>
</section>
<section>
<title>
<filename>checksetup.pl</filename>
</title>
<para>Next, run the magic checksetup.pl script. (Many thanks to
<ulink url="mailto:holgerschurig@nikocity.de">Holger Schurig </ulink>
for writing this script!)
This script 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 the
<filename>data</filename>
directory, and create all the MySQL tables.
<simplelist>
<member>
<computeroutput>
<prompt>bash#</prompt>
<command>./checksetup.pl</command>
</computeroutput>
</member>
</simplelist>
The first time you run it, it will create a file called
<filename>localconfig</filename>.</para>
<para>This file contains a variety of settings you may need to tweak
including how Bugzilla should connect to the MySQL database.</para>
<para>The connection settings include:
<orderedlist>
<listitem>
<para>server's host: just use
<quote>localhost</quote>
if the MySQL server is local</para>
</listitem>
<listitem>
<para>database name:
<quote>bugs</quote>
if you're following these directions</para>
</listitem>
<listitem>
<para>MySQL username:
<quote>bugs</quote>
if you're following these directions</para>
</listitem>
<listitem>
<para>Password for the
<quote>bugs</quote>
MySQL account; (<bugs_password>) above</para>
</listitem>
</orderedlist>
</para>
<para>Once you are happy with the settings,
<filename>su</filename> to the user
your web server runs as, and re-run
<filename>checksetup.pl</filename>. (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.</para>
<note>
<para>The checksetup.pl script is designed so that you can run it at
any time without causing harm. You should run it after any upgrade to
Bugzilla.</para>
</note>
</section>
<section>
<title>Mail Transfer Agent (MTA)</title>
<para>Bugzilla is dependent on the availability of an e-mail system for its user
authentication and for other tasks. </para>
<para>On Linux, any Sendmail-compatible MTA (Mail Transfer Agent) will suffice.
Sendmail, Postfix, qmail and Exim are examples of common MTAs. Sendmail is the
original Unix MTA, but the others are easier to configure, and therefore many people
replace Sendmail with Postfix or Exim. They are drop-in replacements, so that Bugzilla
will not distinguish between them.</para>
<para>Consult the manual for the specific MTA you choose for detailed installation
instructions. Each of these programs will have their own configuration files where you must
configure certain parameters to ensure that the mail is delivered properly. They
are implemented as services, and you should ensure that the MTA is in the
auto-start list of services for the machine.</para>
<para>If a simple mail sent with the command-line 'mail' program succeeds, then
Bugzilla should also be fine.</para>
</section>
<section>
<title>Configuring Bugzilla</title>
<para>
You 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 in <xref linkend="parameters" />.
</para>
</section>
</section>
<section id="extraconfig">
<title>Optional Additional Configuration</title>
<section>
<title>Dependency Charts</title>
<para>As well as the text-based dependency graphs, Bugzilla also
supports dependency graphing, 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>So, to get this working, 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 (the
default for the webdotbase param). Note that AT&T's server won't work
if Bugzilla is only accessible using HTTPS.
</para>
</section>
<section>
<title>Bug Graphs</title>
<para>As long as you installed the GD and Graph::Base Perl modules you
might as well turn on the nifty Bugzilla bug reporting graphs.</para>
<para>Add a cron entry like this to run
<filename>collectstats.pl</filename>
daily at 5 after midnight:
<simplelist>
<member>
<computeroutput>
<prompt>bash#</prompt>
<command>crontab -e</command>
</computeroutput>
</member>
<member>
<computeroutput>5 0 * * * cd <your-bugzilla-directory> ;
./collectstats.pl</computeroutput>
</member>
</simplelist>
</para>
<para>After two days have passed you'll be able to view bug graphs from
the Bug Reports page.</para>
</section>
<section>
<title>The Whining Cron</title>
<para>By now you have a fully functional Bugzilla, but what good are
bugs if they're not annoying? To help make those bugs more annoying you
can set up Bugzilla's automatic whining system to complain at engineers
which leave their bugs in the NEW state without triaging them.
</para>
<para>
This can be done by
adding the following command as a daily crontab entry (for help on that
see that crontab man page):
<simplelist>
<member>
<computeroutput>
<command>cd <your-bugzilla-directory> ;
./whineatnews.pl</command>
</computeroutput>
</member>
</simplelist>
</para>
<tip>
<para>Depending on your system, crontab may have several manpages.
The following command should lead you to the most useful page for
this purpose:
<programlisting>man 5 crontab</programlisting>
</para>
</tip>
</section>
<section id="bzldap">
<title>LDAP Authentication</title>
<para>
<warning>
<para>This information on using the LDAP
authentication options with Bugzilla is old, and the authors do
not know of anyone who has tested it. Approach with caution.
</para>
</warning>
</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>
<para>Using LDAP for Bugzilla authentication requires the
Mozilla::LDAP (aka PerLDAP) Perl module. The
Mozilla::LDAP module in turn requires Netscape's Directory SDK for C.
After you have installed the SDK, then install the PerLDAP module.
Mozilla::LDAP and the Directory SDK for C are both
<ulink url="http://www.mozilla.org/directory/">available for
download</ulink> from mozilla.org.
</para>
<para>
Set the Param 'useLDAP' to "On" **only** if you will be using an LDAP
directory for
authentication. Be very careful when setting up this parameter; if you
set LDAP authentication, but do not have a valid LDAP directory set up,
you will not be able to log back in to Bugzilla once you log out. (If
this happens, you can get back in by manually editing the data/params
file, and setting useLDAP back to 0.)
</para>
<para>If using LDAP, you must set the
three additional parameters: Set LDAPserver to the name (and optionally
port) of your LDAP server. If no port is specified, it defaults to the
default port of 389. (e.g "ldap.mycompany.com" or
"ldap.mycompany.com:1234") Set LDAPBaseDN to the base DN for searching
for users in your LDAP directory. (e.g. "ou=People,o=MyCompany") uids
must be unique under the DN specified here. Set LDAPmailattribute to
the name of the attribute in your LDAP directory which contains the
primary email address. On most directory servers available, this is
"mail", but you may need to change this.
</para>
</section>
<section id="content-type"
xreflabel="Preventing untrusted Bugzilla content from executing malicious Javascript code">
<title>Preventing untrusted Bugzilla content from executing malicious
Javascript code</title>
<para>It is possible for a Bugzilla to execute malicious Javascript
code. Due to internationalization concerns, we are unable to
incorporate the code changes necessary to fulfill the CERT advisory
requirements mentioned in
<ulink
url="http://www.cert.org/tech_tips/malicious_code_mitigation.html/#3">
http://www.cet.org/tech_tips/malicious_code_mitigation.html/#3</ulink>.
Executing the following code snippet from a UNIX command shell will
rectify the problem if your Bugzilla installation is intended for an
English-speaking audience. As always, be sure your Bugzilla
installation has a good backup before making changes, and I recommend
you understand what the script is doing before executing it.</para>
<para>
<programlisting>bash# perl -pi -e "s/Content-Type\: text\/html/Content-Type\: text\/html\; charset=ISO-8859-1/i" *.cgi *.pl
</programlisting>
</para>
<para>All this one-liner command does is search for all instances of
<quote>Content-type: text/html</quote>
and replaces it with
<quote>Content-Type: text/html; charset=ISO-8859-1</quote>
. This specification prevents possible Javascript attacks on the
browser, and is suggested for all English-speaking sites. For
non-English-speaking Bugzilla sites, I suggest changing
<quote>ISO-8859-1</quote>, above, to
<quote>UTF-8</quote>.</para>
<para>Note: using <meta> tags to set the charset is not
recommended, as there's a bug in Netscape 4.x which causes pages
marked up in this way to load twice.</para>
</section>
<section id="htaccess" xreflabel=".htaccess files and security">
<title>
<filename>.htaccess</filename>
files and security</title>
<para>To enhance the security of your Bugzilla installation, Bugzilla's
<filename>checksetup.pl</filename> script will generate
<glossterm>
<filename>.htaccess</filename>
</glossterm>
files which the Apache webserver can use to restrict access to the
bugzilla data files.
These .htaccess files will not work with Apache 1.2.x - but this
has security holes, so you shouldn't be using it anyway.
<note>
<para>If you are using an alternate provider of
<productname>webdot</productname>
services for graphing (as described when viewing
<filename>editparams.cgi</filename>
in your web browser), you will need to change the ip address in
<filename>data/webdot/.htaccess</filename>
to the ip address of the webdot server that you are using.</para>
</note>
</para>
<para>The default .htaccess file may not provide adequate access
restrictions, depending on your web server configuration. Be sure to
check the <Directory> entries for your Bugzilla directory so that
the
<filename>.htaccess</filename>
file is allowed to override web server defaults. For instance, let's
assume your installation of Bugzilla is installed to
<filename>/usr/local/bugzilla</filename>
. You should have this <Directory> entry in your
<filename>httpd.conf</filename>
file:</para>
<para>
<programlisting><![CDATA[
<Directory /usr/local/bugzilla/>
Options +FollowSymLinks +Indexes +Includes +ExecCGI
AllowOverride All
</Directory>
]]></programlisting>
</para>
<para>The important part above is
<quote>AllowOverride All</quote>
. Without that, the
<filename>.htaccess</filename>
file created by
<filename>checksetup.pl</filename>
will not have sufficient permissions to protect your Bugzilla
installation.</para>
<para>If you are using Internet Information Server (IIS) or another
web server which does not observe
<filename>.htaccess</filename>
conventions, you can disable their creation by editing
<filename>localconfig</filename>
and setting the
<varname>$create_htaccess</varname>
variable to
<parameter>0</parameter>.
</para>
</section>
<section id="mod-throttle"
xreflabel="Using mod_throttle to prevent Denial of Service attacks">
<title>
<filename>mod_throttle</filename>
and Security</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>
You may use the
<command>ThrottleClientIP</command>
command provided by this module to accomplish this goal. See the
<ulink url="http://www.snert.com/Software/mod_throttle/">Module
Instructions</ulink>
for more information.</para>
</section>
</section>
<section id="win32" xreflabel="Win32 Installation Notes">
<title>Win32 Installation Notes</title>
<para>This section covers installation on Microsoft Windows.
Bugzilla has been made to work on Win32 platforms, but the Bugzilla team
wish to emphasise that The easiest way to install Bugzilla on
Intel-archiecture machines
is to install some variant of GNU/Linux, then follow the UNIX
installation instructions in this Guide. If you have any influence in the
platform choice for running this system, please choose GNU/Linux instead
of Microsoft Windows.</para>
<warning>
<para>After that warning, here's the situation for 2.16
and Windows. It doesn't work at all out of the box.
You are almost certainly better off getting
the 2.17 version from CVS (after consultation with the Bugzilla Team to
make sure you are pulling on a stable day) because we'll be doing a load
of work to make the Win32 experience more pleasant than it is now.
</para>
</warning>
<para>
If you still want to try this, to have any hope of getting it to work,
you'll need to apply the
<ulink url="">mail patch</ulink> from
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=124174">bug 124174</ulink>.
After that, you'll need to read the (outdated) installation
instructions below, some (probably a lot better) <ulink url="http://bugzilla.mozilla.org/attachment.cgi?id=84430&action=view">more
recent ones</ulink> kindly provided by Toms Baugis and Jean-Sebastien
Guay, and also check the
<ulink url="http://www.bugzilla.org/releases/2.16/docs/win32.html">Bugzilla 2.16 Win32 update page
</ulink>. If we get time,
we'll write some better installation instructions for 2.16 and put
them up there. But no promises.
</para>
<section id="wininstall" xreflabel="Win32 Installation: Step-by-step">
<title>Win32 Installation: Step-by-step</title>
<note>
<para>You should be familiar with, and cross-reference, the rest of
the
<xref linkend="installation" />
section while performing your Win32 installation.</para>
<para>Making Bugzilla work on Microsoft Windows is no picnic. Support
for Win32 has improved dramatically in the last few releases, but, if
you choose to proceed, you should be a
<emphasis>very</emphasis>
skilled Windows Systems Administrator with strong troubleshooting
abilities, a high tolerance for pain, and moderate perl skills.
Bugzilla on NT requires hacking source code and implementing some
advanced utilities. What follows is the recommended installation
procedure for Win32; additional suggestions are provided in
<xref linkend="faq" />
.</para>
</note>
<procedure>
<step>
<para>Install
<ulink url="http://www.apache.org/">Apache Web Server</ulink>
for Windows, and copy the Bugzilla files somewhere Apache can serve
them. Please follow all the instructions referenced in
<xref linkend="installation" />
regarding your Apache configuration, particularly instructions
regarding the
<quote>AddHandler</quote>
parameter and
<quote>ExecCGI</quote>
.</para>
<note>
<para>You may also use Internet Information Server or Personal
Web Server for this purpose. However, setup is quite different.
If ActivePerl doesn't seem to handle your file associations
correctly (for .cgi and .pl files), please consult
<xref linkend="faq" />
.</para>
<para>If you are going to use IIS, if on Windows NT you must be
updated to at least Service Pack 4. Windows 2000 ships with a
sufficient version of IIS.</para>
</note>
</step>
<step>
<para>Install
<ulink url="http://www.activestate.com/">ActivePerl</ulink>
for Windows. Check
<ulink
url="http://aspn.activestate.com/ASPN/Downloads/ActivePerl/">
http://aspn.activestate.com/ASPN/Downloads/ActivePerl</ulink>
for a current compiled binary.</para>
<para>Please also check the following links to fully understand the
status of ActivePerl on Win32:
<ulink url="http://language.perl.com/newdocs/pod/perlport.html">
Perl Porting</ulink>
, and
<ulink
url="http://ftp.univie.ac.at/packages/perl/ports/nt/FAQ/perlwin32faq5.html">
Perl on Win32 FAQ</ulink>
</para>
</step>
<step>
<para>Use ppm from your perl\bin directory to install the following
packs: DBI, DBD-Mysql, TimeDate, Chart, Date-Calc, Date-Manip, GD,
AppConfig, and Template. You may need to extract them from .zip
format using Winzip or other unzip program first. Most of these
additional ppm modules can be downloaded from ActiveState, but
AppConfig and Template should be obtained from OpenInteract using
<ulink type="http" url="http://openinteract.sourceforge.net/">the
instructions on the Template Toolkit web site</ulink>
.</para>
<note>
<para>You can find a list of modules at
<ulink
url="http://www.activestate.com/PPMPackages/zips/5xx-builds-only">
http://www.activestate.com/PPMPackages/zips/5xx-builds-only/</ulink>
or
<ulink url="http://www.activestate.com/PPMPackages/5.6plus">
http://www.activestate.com/PPMPackages/5.6plus</ulink>
</para>
</note>
<para>The syntax for ppm is:
<computeroutput>
<prompt>C:></prompt>
<command>ppm install <modulename></command>
</computeroutput>
</para>
<example>
<title>Installing ActivePerl ppd Modules on Microsoft
Windows</title>
<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>
<para>Watch your capitalization!</para>
</example>
<para>ActiveState's 5.6Plus directory also contains an AppConfig
ppm, so you might see the following error when trying to install
the version at OpenInteract:</para>
<para>
<computeroutput>Error installing package 'AppConfig': Read a PPD
for 'AppConfig', but it is not intended for this build of Perl
(MSWin32-x86-multi-thread)</computeroutput>
</para>
<para>If so, download both
<ulink
url="http://openinteract.sourceforge.net/ppmpackages/AppConfig.tar.gz">
the tarball</ulink>
and
<ulink
url="http://openinteract.sourceforge.net/ppmpackages/AppConfig.ppd">
the ppd</ulink>
directly from OpenInteract, then run ppm from within the same
directory to which you downloaded those files and install the
package by referencing the ppd file explicitly via in the install
command, f.e.:
<example>
<title>Installing OpenInteract ppd Modules manually on Microsoft
Windows</title>
<para>
<computeroutput>
<command>install
<filename>C:\AppConfig.ppd</filename>
</command>
</computeroutput>
</para>
</example>
</para>
</step>
<step>
<para>Install MySQL for NT.
<note>
<para>You can download MySQL for Windows NT from
<ulink url="http://www.mysql.com/">MySQL.com</ulink>
. Some find it helpful to use the WinMySqlAdmin utility, included
with the download, to set up the database.</para>
</note>
</para>
</step>
<step>
<para>Setup MySQL</para>
<substeps>
<step>
<para>
<computeroutput>
<prompt>C:></prompt>
<command>C:\mysql\bin\mysql -u root mysql</command>
</computeroutput>
</para>
</step>
<step>
<para>
<computeroutput>
<prompt>mysql></prompt>
<command>DELETE FROM user WHERE Host='localhost' AND
User='';</command>
</computeroutput>
</para>
</step>
<step>
<para>
<computeroutput>
<prompt>mysql></prompt>
<command>UPDATE user SET Password=PASSWORD ('new_password')
WHERE user='root';</command>
</computeroutput>
</para>
<para>
<quote>new_password</quote>
, above, indicates whatever password you wish to use for your
<quote>root</quote>
user.</para>
</step>
<step id="ntbugs-password">
<para>
<computeroutput>
<prompt>mysql></prompt>
<command>GRANT SELECT, INSERT, UPDATE, DELETE, INDEX,
ALTER, CREATE, DROP, REFERENCES ON bugs.* to bugs@localhost
IDENTIFIED BY 'bugs_password';</command>
</computeroutput>
</para>
<para>
<quote>bugs_password</quote>
, above, indicates whatever password you wish to use for your
<quote>bugs</quote>
user.</para>
</step>
<step>
<para>
<computeroutput>
<prompt>mysql></prompt>
<command>FLUSH PRIVILEGES;</command>
</computeroutput>
</para>
</step>
<step>
<para>
<computeroutput>
<prompt>mysql></prompt>
<command>create database bugs;</command>
</computeroutput>
</para>
</step>
<step>
<para>
<computeroutput>
<prompt>mysql></prompt>
<command>exit;</command>
</computeroutput>
</para>
</step>
<step>
<para>
<computeroutput>
<prompt>C:></prompt>
<command>C:\mysql\bin\mysqladmin -u root -p
reload</command>
</computeroutput>
</para>
</step>
</substeps>
</step>
<step>
<para>Edit
<filename>checksetup.pl</filename>
in your Bugzilla directory. Change this line:</para>
<para>
<programlisting>my $webservergid =
getgrnam($my_webservergroup);</programlisting>
</para>
<para>to</para>
<para>
<programlisting>my $webservergid =
$my_webservergroup;</programlisting>
or the name of the group you wish to own the files explicitly:
<programlisting>my $webservergid =
'Administrators'</programlisting>
</para>
</step>
<step>
<para>Run
<filename>checksetup.pl</filename>
from the Bugzilla directory.</para>
</step>
<step>
<para>Edit
<filename>localconfig</filename>
to suit your requirements. Set
<varname>$db_pass</varname>
to your
<quote>bugs_password</quote>
from
<xref linkend="ntbugs-password" />
, and
<varname>$webservergroup</varname>
to
<quote>8</quote>
.</para>
<note>
<para>Not sure on the
<quote>8</quote>
for
<varname>$webservergroup</varname>
above. If it's wrong, please send corrections.</para>
</note>
</step>
<step>
<para>Edit
<filename>defparams.pl</filename>
to suit your requirements. Particularly, set
<varname>DefParam("maintainer")</varname>
and
<varname>DefParam("urlbase") to match your install.</varname>
</para>
<note>
<para>This is yet another step I'm not sure of, since the
maintainer of this documentation does not maintain Bugzilla on
NT. If you can confirm or deny that this step is required, please
let me know.</para>
</note>
</step>
<step>
<note>
<para>There are several alternatives to Sendmail that will work
on Win32. The one mentioned here is a
<emphasis>suggestion</emphasis>
, not a requirement. Some other mail packages that can work
include
<ulink url="http://www.blat.net/">BLAT</ulink>
,
<ulink url="http://www.geocel.com/windmail/">Windmail</ulink>
,
<ulink url="http://www.dynamicstate.com/">Mercury
Sendmail</ulink>
, and the CPAN Net::SMTP Perl module (available in .ppm). Every
option requires some hacking of the Perl scripts for Bugzilla to
make it work. The option here simply requires the least.</para>
</note>
<procedure>
<step>
<para>Download NTsendmail, available from
<ulink url="http://www.ntsendmail.com/">
www.ntsendmail.com</ulink>
. You must have a "real" mail server which allows you to relay
off it in your $ENV{"NTsendmail"} (which you should probably
place in globals.pl)</para>
</step>
<step>
<para>Put ntsendmail.pm into your .\perl\lib directory.</para>
</step>
<step>
<para>Add to globals.pl:</para>
<programlisting># these settings configure the NTsendmail
process use NTsendmail;
$ENV{"NTsendmail"}="your.smtpserver.box";
$ENV{"NTsendmail_debug"}=1;
$ENV{"NTsendmail_max_tries"}=5;</programlisting>
<note>
<para>Some mention to also edit
<varname>$db_pass</varname>
in
<filename>globals.pl</filename>
to be your
<quote>bugs_password</quote>
. Although this may get you around some problem
authenticating to your database, since globals.pl is not
normally restricted by
<filename>.htaccess</filename>
, your database password is exposed to whoever uses your web
server.</para>
</note>
</step>
<step>
<para>Find and comment out all occurences of
<quote>
<command>open(SENDMAIL</command>
</quote>
in your Bugzilla directory. Then replace them with:
<programlisting># new sendmail functionality my $mail=new
NTsendmail; my $from="bugzilla\@your.machine.name.tld"; my
$to=$login; my $subject=$urlbase;
$mail->send($from,$to,$subject,$msg);</programlisting>
</para>
<note>
<para>Some have found success using the commercial product,
<productname>Windmail</productname>
. You could try replacing your sendmail calls with:
<programlisting>open SENDMAIL,
"|\"C:/General/Web/tools/Windmail 4.0 Beta/windmail\" -t >
mail.log";</programlisting>
or something to that effect.</para>
</note>
</step>
</procedure>
</step>
<step>
<para>Change all references in all files from
<filename>processmail</filename>
to
<filename>processmail.pl</filename>
, and rename
<filename>processmail</filename>
to
<filename>processmail.pl</filename>
.</para>
<note>
<para>Many think this may be a change we want to make for
main-tree Bugzilla. It's painless for the UNIX folks, and will
make the Win32 people happier.</para>
</note>
<note>
<para>Some people have suggested using the Net::SMTP Perl module
instead of NTsendmail or the other options listed here. You can
change processmail.pl to make this work.
<programlisting>
<![CDATA[
my $smtp = Net::SMTP->new('<Name of your SMTP server>'); #connect to SMTP server
$smtp->mail('<your name>@<you smpt server>');# use the sender's adress here
$smtp->to($tolist); # recipient's address
$smtp->data(); # Start the mail
$smtp->datasend($msg);
$smtp->dataend(); # Finish sending the mail
$smtp->quit; # Close the SMTP connection
$logstr = "$logstr; mail sent to $tolist $cclist";
}
]]>
</programlisting>
here is a test mail program for Net::SMTP:
<programlisting>
<![CDATA[
use Net::SMTP;
my $smtp = Net::SMTP->new('<Name of your SMTP server', Timeout => 30, Debug
=> 1, ); # connect to SMTP server
$smtp->auth;
$smtp->mail('you@yourcompany.com');# use the sender's adress
here
$smtp->to('someotherAddress@someotherdomain.com'); #
recipient's address
$smtp->data(); # Start the mail
$smtp->datasend('test');
$smtp->dataend(); # Finish sending the mail
$smtp->quit; # Close the SMTP connection
exit;
]]>
</programlisting>
</para>
</note>
</step>
<step>
<note>
<para>This step is optional if you are using IIS or another web
server which only decides on an interpreter based upon the file
extension (.pl), rather than the
<quote>shebang</quote>
line (#/usr/bonsaitools/bin/perl)</para>
</note>
<para>Modify the path to perl on the first line (#!) of all files
to point to your Perl installation, and add
<quote>perl</quote>
to the beginning of all Perl system calls that use a perl script as
an argument. This may take you a while. There is a
<quote>setperl.csh</quote>
utility to speed part of this procedure, available in the
<xref linkend="patches" />
section of The Bugzilla Guide. However, it requires the Cygwin
GNU-compatible environment for Win32 be set up in order to work.
See
<ulink url="http://www.cygwin.com/">http://www.cygwin.com/</ulink>
for details on obtaining Cygwin.</para>
</step>
<step>
<para>Modify the invocation of all system() calls in all perl
scripts in your Bugzilla directory. You should specify the full
path to perl for each system() call. For instance, change this line
in processmail:
<programlisting>
<![CDATA[
system ("./processmail",@ARGLIST);
</programlisting> to
<programlisting>
system ("C:\\perl\\bin\\perl", "processmail", @ARGLIST);
]]>
</programlisting>
</para>
</step>
<step>
<para>Add
<function>binmode()</function>
calls so attachments will work (
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=62000">bug
62000</ulink>
).</para>
<para>Because Microsoft Windows based systems handle binary files
different than Unix based systems, you need to add the following
lines to
<filename>createattachment.cgi</filename>
and
<filename>showattachment.cgi</filename>
before the
<function>require 'CGI.pl';</function>
line.</para>
<para>
<programlisting>
<![CDATA[
binmode(STDIN);
binmode(STDOUT);
]]>
</programlisting>
</para>
<note>
<para>According to
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=62000">
bug 62000</ulink>
, the perl documentation says that you should always use
<function>binmode()</function>
when dealing with binary files, but never when dealing with text
files. That seems to suggest that rather than arbitrarily putting
<function>binmode()</function>
at the beginning of the attachment files, there should be logic
to determine if
<function>binmode()</function>
is needed or not.</para>
</note>
</step>
</procedure>
<tip>
<para>If you are using IIS or Personal Web Server, you must add cgi
relationships to Properties -> Home directory (tab) ->
Application Settings (section) -> Configuration (button), such
as:</para>
<para>
<programlisting>.cgi to: <perl install directory>\perl.exe %s
%s .pl to: <perl install directory>\perl.exe %s %s
GET,HEAD,POST</programlisting>
Change the path to Perl to match your install, of course.</para>
</tip>
</section>
<section id="addlwintips">
<title>Additional Windows Tips</title>
<tip>
<para>From Andrew Pearson:
<blockquote>
<para>You can make Bugzilla work with Personal Web Server for
Windows 98 and higher, as well as for IIS 4.0. Microsoft has
information available at
<ulink
url=" http://support.microsoft.com/support/kb/articles/Q231/9/98.ASP">
http://support.microsoft.com/support/kb/articles/Q231/9/98.ASP</ulink>
</para>
<para>Basically you need to add two String Keys in the registry at
the following location:</para>
<para>
<programlisting>
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ScriptMap</programlisting>
</para>
<para>The keys should be called ".pl" and ".cgi", and both should
have a value something like:
<command>c:/perl/bin/perl.exe "%s" "%s"</command>
</para>
<para>The KB article only talks about .pl, but it goes into more
detail and provides a perl test script.</para>
</blockquote>
</para>
</tip>
<tip>
<para>If attempting to run Bugzilla 2.12 or older, you will need to
remove encrypt() calls from the Perl source. This is
<emphasis>not necessary</emphasis>
for Bugzilla 2.13 and later, which includes the current release,
Bugzilla &bz-ver;.
<example>
<title>Removing encrypt() for Windows NT Bugzilla version 2.12 or
earlier</title>
<para>Replace this:
<programlisting>SendSQL("SELECT encrypt(" . SqlQuote($enteredpwd) .
", " . SQLQuote(substr($realcryptpwd, 0, 2)) . ")"); my
$enteredcryptpwd = FetchOneColumn();</programlisting>
with this:
<programlisting>my $enteredcryptpwd = $enteredpwd</programlisting>
in cgi.pl.</para>
</example>
</para>
</tip>
</section>
</section>
<section id="osx">
<title>Mac OS X Installation Notes</title>
<para>There are a lot of common libraries and utilities out there that
Apple did not include with Mac OS X, but which run perfectly well on it.
The GD library, which Bugzilla needs to do bug graphs, is one of
these.</para>
<para>The easiest way to get a lot of these is with a program called
Fink, which is similar in nature to the CPAN installer, but installs
common GNU utilities. Fink is available from
<http://sourceforge.net/projects/fink/>.</para>
<para>Follow the instructions for setting up Fink. Once it's installed,
you'll want to run the following as root:
<command>fink install gd</command>
</para>
<para>It will prompt you for a number of dependencies, type 'y' and hit
enter to install all of the dependencies. Then watch it work.</para>
<para>To prevent creating conflicts with the software that Apple installs
by default, Fink creates its own directory tree at /sw where it installs
most of the software that it installs. This means your libraries and
headers for libgd will be at /sw/lib and /sw/include instead of /usr/lib
and /usr/local/include. Because of these changed locations for the
libraries, the Perl GD module will not install directly via CPAN, because it
looks for the specific paths instead of getting them from your
environment. But there's a way around that :-)</para>
<para>Instead of typing
<quote>install GD</quote>
at the
<prompt>cpan></prompt>
prompt, type
<command>look GD</command>.
This should go through the motions of downloading the latest version of
the GD module, then it will open a shell and drop you into the build
directory. Apply <ulink url="../xml/gd-makefile.patch">this patch</ulink>
to the Makefile.PL file (save the
patch into a file and use the command
<command>patch < patchfile</command>.)
</para>
<para>Then, run these commands to finish the installation of the GD
module:
<simplelist>
<member>
<command>perl Makefile.PL</command>
</member>
<member>
<command>make</command>
</member>
<member>
<command>make test</command>
</member>
<member>
<command>make install</command>
</member>
<member>And don't forget to run
<command>exit</command>
to get back to CPAN.</member>
</simplelist>
</para>
</section>
<section id="nonroot">
<title>UNIX (non-root) Installation Notes</title>
<section>
<title>Introduction</title>
<para>If you are running a *NIX OS as non-root, either due
to lack of access (web hosts, for example) or for security
reasons, this will detail how to install Bugzilla on such
a setup. It is recommended that you read through the
<xref linkend="installation" />
first to get an idea on the installation steps required.
(These notes will reference to steps in that guide.)</para>
</section>
<section>
<title>MySQL</title>
<para>You may have MySQL installed as root. If you're
setting up an account with a web host, a MySQL account
needs to be set up for you. From there, you can create
the bugs account, or use the account given to you.</para>
<warning>
<para>You may have problems trying to set up
<command>GRANT</command> permissions to the database.
If you're using a web host, chances are that you have a
separate database which is already locked down (or one big
database with limited/no access to the other areas), but you
may want to ask your system adminstrator what the security
settings are set to, and/or run the <command>GRANT</command>
command for you.</para>
<para>Also, you will probably not be able to change the MySQL
root user password (for obvious reasons), so skip that
step.</para>
</warning>
<section>
<title>Running MySQL as Non-Root</title>
<section>
<title>The Custom Configuration Method</title>
<para>Create a file .my.cnf in your
home directory (using /home/foo in this example)
as follows....</para>
<programlisting>
[mysqld]
datadir=/home/foo/mymysql
socket=/home/foo/mymysql/thesock
port=8081
[mysql]
socket=/home/foo/mymysql/thesock
port=8081
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/home/foo/mymysql/the.log
pid-file=/home/foo/mymysql/the.pid
</programlisting>
</section>
<section>
<title>The Custom Built Method</title>
<para>You can install MySQL as a not-root, if you really need to.
Build it with PREFIX set to <filename class="directory">/home/foo/mysql</filename>,
or use pre-installed executables, specifying that you want
to put all of the data files in <filename class="directory">/home/foo/mysql/data</filename>.
If there is another MySQL server running on the system that you
do not own, use the -P option to specify a TCP port that is not
in use.</para>
</section>
<section>
<title>Starting the Server</title>
<para>After your mysqld program is built and any .my.cnf file is
in place, you must initialize the databases (ONCE).</para>
<screen>
<prompt>bash$</prompt>
<command>mysql_install_db</command>
</screen>
<para>Then start the daemon with</para>
<screen>
<prompt>bash$</prompt>
<command>safe_mysql &</command>
</screen>
<para>After you start mysqld the first time, you then connect to
it as "root" and <command>GRANT</command> permissions to other
users. (Again, the MySQL root account has nothing to do with
the *NIX root account.)</para>
<note>
<para>You will need to start the daemons yourself. You can either
ask your system administrator to add them to system startup files, or
add a crontab entry that runs a script to check on these daemons
and restart them if needed.</para>
</note>
<warning>
<para>Do NOT run daemons or other services on a server without first
consulting your system administrator! Daemons use up system resources
and running one may be in violation of your terms of service for any
machine on which you are a user!</para>
</warning>
</section>
</section>
</section>
<section>
<title>Perl</title>
<para>On the extremely rare chance that you don't have Perl on
the machine, you will have to build the sources
yourself. The following commands should get your system
installed with your own personal version of Perl:</para>
<screen>
<prompt>bash$</prompt>
<command>wget http://perl.com/CPAN/src/stable.tar.gz</command>
<prompt>bash$</prompt>
<command>tar zvxf stable.tar.gz</command>
<prompt>bash$</prompt>
<command>cd perl-5.8.1</command> (or whatever the version of Perl is called)
<prompt>bash$</prompt>
<command>sh Configure -de -Dprefix=/home/foo/perl</command>
<prompt>bash$</prompt>
<command>make && make test && make install</command>
</screen>
<para>Once you have Perl installed into a directory (probably
in <filename class="directory">~/perl/bin</filename>), you'll have to
change the locations on the scripts, which is detailed later on
this page.</para>
</section>
<section>
<title>Perl Modules</title>
<para>Installing the Perl modules as a non-root user is probably the
hardest part of the process. There are two different methods: a
completely independant Perl with its own modules, or personal
modules using the current (root installed) version of Perl. The
independant method takes up quite a bit of disk space, but is
less complex, while the mixed method only uses as much space as the
modules themselves, but takes more work to setup.</para>
<section>
<title>The Independant Method</title>
<para>The independant method requires that you install your own
personal version of Perl, as detailed in the previous section. Once
installed, you can start the CPAN shell with the following
command:</para>
<para>
<screen>
<prompt>bash$</prompt>
<command>/home/foo/perl/bin/perl -MCPAN -e 'shell'</command>
</screen>
</para>
<para>And then:</para>
<para>
<screen>
<prompt>cpan></prompt>
<command>install Bundle::Bugzilla</command>
</screen>
</para>
<para>With this method, module installation will usually go a lot
smoother, but if you have any hang-ups, you can consult the next
section.</para>
</section>
<section>
<title>The Mixed Method</title>
<para>First, you'll need to configure CPAN to
install modules in your home directory. The CPAN FAQ says the
following on this issue:</para>
<para>
<programlisting>
5) I am not root, how can I install a module in a personal directory?
You will most probably like something like this:
o conf makepl_arg "LIB=~/myperl/lib \
INSTALLMAN1DIR=~/myperl/man/man1 \
INSTALLMAN3DIR=~/myperl/man/man3"
install Sybase::Sybperl
You can make this setting permanent like all "o conf" settings with "o conf commit".
You will have to add ~/myperl/man to the MANPATH environment variable and also tell your Perl programs to
look into ~/myperl/lib, e.g. by including
use lib "$ENV{HOME}/myperl/lib";
or setting the PERL5LIB environment variable.
Another thing you should bear in mind is that the UNINST parameter should never be set if you are not root.</programlisting>
</para>
<para>So, you will need to create a Perl directory in your home
directory, as well as the <filename class="directory">lib</filename>,
<filename class="directory">man</filename>,
<filename class="directory">man/man1</filename>, and
<filename class="directory">man/man3</filename> directories in that
Perl directory. Set the MANPATH variable and PERL5LIB variable, so
that the installation of the modules goes smoother. (Setting
UNINST=0 in your "make install" options, on the CPAN first-time
configuration, is also a good idea.)</para>
<para>After that, go into the CPAN shell:</para>
<para>
<screen>
<prompt>bash$</prompt>
<command>perl -MCPAN -e 'shell'</command>
</screen>
</para>
<para>From there, you will need to type in the above "o conf" command
and commit the changes. Then you can run through the installation:</para>
<para>
<screen>
<prompt>cpan></prompt>
<command>install Bundle::Bugzilla</command>
</screen>
</para>
<para>Most of the module installation process should go smoothly. However,
you may have some problems with Template. When you first start, you will
want to try to install Template with the XS Stash options on. If this
doesn't work, it may spit out C compiler error messages and croak back
to the CPAN shell prompt. So, redo the install, and turn it off. (In fact,
say no to all of the Template questions.) It may also start failing on a
few of the tests. If the total tests passed is a reasonable figure (90+%),
force the install with the following command:</para>
<para>
<screen>
<prompt>cpan></prompt>
<command>force install Template</command>
</screen>
</para>
<para>You may also want to install the other optional modules:</para>
<screen>
<prompt>cpan></prompt>
<command>install GD</command>
<prompt>cpan></prompt>
<command>install Chart::Base</command>
<prompt>cpan></prompt>
<command>install MIME::Parser</command>
</screen>
</section>
</section>
<section>
<title>HTTP Server</title>
<para>Ideally, this also needs to be installed as root and
run under a special webserver account. As long as
the web server will allow the running of *.cgi files outside of a
cgi-bin, and a way of denying web access to certain files (such as a
.htaccess file), you should be good in this department.</para>
<section>
<title>Running Apache as Non-Root</title>
<para>You can run Apache as a non-root user, but the port will need
to be set to one above 1024. If you type <command>httpd -V</command>,
you will get a list of the variables that your system copy of httpd
uses. One of those, namely HTTPD_ROOT, tells you where that
installation looks for its config information.</para>
<para>From there, you can copy the config files to your own home
directory to start editing. When you edit those and then use the -d
option to override the HTTPD_ROOT compiled into the web server, you
get control of your own customized web server.</para>
<note>
<para>You will need to start the daemons yourself. You can either
ask your system administrator to add them to system startup files, or
add a crontab entry that runs a script to check on these daemons
and restart them if needed.</para>
</note>
<warning>
<para>Do NOT run daemons or other services on a server without first
consulting your system administrator! Daemons use up system resources
and running one may be in violation of your terms of service for any
machine on which you are a user!</para>
</warning>
</section>
</section>
<section>
<title>Bugzilla</title>
<para>Since you probably can't set up a symbolic link to
<filename>/usr/bonsaitools/bin/perl</filename> as a non-root user,
you will need to hack the scripts to point to the right Perl:</para>
<para>
<programlisting>perl -pi -e
's@#\!/usr/bonsaitools/bin/perl@#\!/usr/bin/perl@' *cgi *pl Bug.pm
processmail syncshadowdb</programlisting>
Change <filename>/usr/bin/perl</filename> to match the location
of Perl on your machine. If you had to install Perl as non-root,
this would be the location in your home directory.
</para>
<note>
<para>Version 2.17+ of Bugzilla now already has the scripts
pointing to <filename>/usr/bin/perl</filename>.</para>
</note>
<para>Of course, the scripts will not work if they don't know the
location of your newly install Perl modules, so you will have to hack
the scripts to look for those, too:</para>
<para>
<programlisting>perl -pi -e
's@use strict\;@use strict\; use lib \"/home/foo/perl/lib\"\;@'
*cgi *pl Bug.pm processmail syncshadowdb</programlisting>
Change <filename class="directory">/home/foo/perl/lib</filename> to
your personal Perl library directory. You can probably skip this
step if you are using the independant method of Perl module
installation.
</para>
<para>When you run <command>./checksetup.pl</command> to create
the <filename>localconfig</filename> file, it will list the Perl
modules it finds. If one is missing, go back and double-check the
module installation from the CPAN shell, then delete the
<filename>localconfig</filename> file and try again.</para>
<warning>
<para>The one option in <filename>localconfig</filename> you
might have problems with is the web server group. If you can't
successfully browse to the <filename>index.cgi</filename> (like
a Forbidden error), you may have to relax your permissions,
and blank out the web server group. Of course, this may pose
as a security risk. Having a properly jailed shell and/or
limited access to shell accounts may lessen the security risk,
but use at your own risk.</para>
</warning>
</section>
</section>
<section id="troubleshooting">
<title>Troubleshooting</title>
<para>This section gives solutions to common Bugzilla installation
problems.
</para>
<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. Examples
can be found in <xref linkend="trouble-filetemp-errors"/>.
</para>
<figure id="trouble-filetemp-errors">
<title>Other File::Temp error messages</title>
<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>
</figure>
<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 patch in <xref linkend="trouble-filetemp-patch"/>. The patch is also
available as a <ulink url="../xml/filetemp.patch">patch file</ulink>.
</para>
<figure id="trouble-filetemp-patch">
<title>Patch for File::Temp in Perl 5.6.0</title>
<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>
</figure>
</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:
-->
|