summaryrefslogtreecommitdiff
blob: 58301981d331864d73a7417dbe1e18560bbc161b (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>UNIX (non-root) Installation Notes</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="The Bugzilla Guide - 4.2 
    Development 
    Release"
HREF="index.html"><LINK
REL="UP"
TITLE="Installing Bugzilla"
HREF="installing-bugzilla.html"><LINK
REL="PREVIOUS"
TITLE="OS-Specific Installation Notes"
HREF="os-specific.html"><LINK
REL="NEXT"
TITLE="Upgrading to New Releases"
HREF="upgrade.html"></HEAD
><BODY
CLASS="section"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Bugzilla Guide - 4.2 
    Development 
    Release</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="os-specific.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 2. Installing Bugzilla</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="upgrade.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="nonroot"
>2.6. UNIX (non-root) Installation Notes</A
></H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN859"
>2.6.1. Introduction</A
></H2
><P
>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
      <A
HREF="installation.html"
>Section 2.1</A
>
      first to get an idea on the installation steps required.
      (These notes will reference to steps in that guide.)</P
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN863"
>2.6.2. MySQL</A
></H2
><P
>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.</P
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/warning.gif"
HSPACE="5"
ALT="Warning"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>You may have problems trying to set up
        <B
CLASS="command"
>GRANT</B
> 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 administrator what the security
        settings are set to, and/or run the <B
CLASS="command"
>GRANT</B
>
        command for you.</P
><P
>Also, you will probably not be able to change the MySQL
        root user password (for obvious reasons), so skip that
        step.</P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN871"
>2.6.2.1. Running MySQL as Non-Root</A
></H3
><DIV
CLASS="section"
><H4
CLASS="section"
><A
NAME="AEN873"
>2.6.2.1.1. The Custom Configuration Method</A
></H4
><P
>Create a file .my.cnf in your 
              home directory (using /home/foo in this example)
              as follows....</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;[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
              </PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="section"
><H4
CLASS="section"
><A
NAME="AEN877"
>2.6.2.1.2. The Custom Built Method</A
></H4
><P
>You can install MySQL as a not-root, if you really need to.
            Build it with PREFIX set to <TT
CLASS="filename"
>/home/foo/mysql</TT
>,
            or use pre-installed executables, specifying that you want
            to put all of the data files in <TT
CLASS="filename"
>/home/foo/mysql/data</TT
>.
            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.</P
></DIV
><DIV
CLASS="section"
><H4
CLASS="section"
><A
NAME="AEN882"
>2.6.2.1.3. Starting the Server</A
></H4
><P
>After your mysqld program is built and any .my.cnf file is 
            in place, you must initialize the databases (ONCE).</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;              <SAMP
CLASS="prompt"
>bash$</SAMP
>
              <B
CLASS="command"
>mysql_install_db</B
>
            </PRE
></FONT
></TD
></TR
></TABLE
><P
>Then start the daemon with</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;              <SAMP
CLASS="prompt"
>bash$</SAMP
>
              <B
CLASS="command"
>safe_mysql &#38;</B
>
            </PRE
></FONT
></TD
></TR
></TABLE
><P
>After you start mysqld the first time, you then connect to
            it as "root" and <B
CLASS="command"
>GRANT</B
> permissions to other
            users. (Again, the MySQL root account has nothing to do with
            the *NIX root account.)</P
><DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>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.</P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/warning.gif"
HSPACE="5"
ALT="Warning"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>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!</P
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN898"
>2.6.3. Perl</A
></H2
><P
>&#13;      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:
      </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;        <SAMP
CLASS="prompt"
>bash$</SAMP
>
        <B
CLASS="command"
>wget http://perl.org/CPAN/src/stable.tar.gz</B
>
        <SAMP
CLASS="prompt"
>bash$</SAMP
>
        <B
CLASS="command"
>tar zvxf stable.tar.gz</B
>
        <SAMP
CLASS="prompt"
>bash$</SAMP
>
        <B
CLASS="command"
>cd perl-5.8.1</B
> (or whatever the version of Perl is called)
        <SAMP
CLASS="prompt"
>bash$</SAMP
>
        <B
CLASS="command"
>sh Configure -de -Dprefix=/home/foo/perl</B
>
        <SAMP
CLASS="prompt"
>bash$</SAMP
>
        <B
CLASS="command"
>make &#38;&#38; make test &#38;&#38; make install</B
>
      </PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;      Once you have Perl installed into a directory (probably
      in <TT
CLASS="filename"
>~/perl/bin</TT
>), you will need to
      install the Perl Modules, described below.
      </P
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="install-perlmodules-nonroot"
>2.6.4. Perl Modules</A
></H2
><P
>&#13;      Installing the Perl modules as a non-root user is accomplished by
      running the <TT
CLASS="filename"
>install-module.pl</TT
>
      script. For more details on this script, see 
      <A
HREF="api/install-module.html"
TARGET="_top"
><TT
CLASS="filename"
>install-module.pl</TT
>
      documentation</A
>
      </P
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN920"
>2.6.5. HTTP Server</A
></H2
><P
>Ideally, this also needs to be installed as root and
      run under a special web server 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.</P
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN923"
>2.6.5.1. Running Apache as Non-Root</A
></H3
><P
>You can run Apache as a non-root user, but the port will need
        to be set to one above 1024. If you type <B
CLASS="command"
>httpd -V</B
>,
        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.</P
><P
>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.</P
><DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>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.</P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/warning.gif"
HSPACE="5"
ALT="Warning"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>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!</P
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN932"
>2.6.6. Bugzilla</A
></H2
><P
>&#13;      When you run <B
CLASS="command"
>./checksetup.pl</B
> to create
      the <TT
CLASS="filename"
>localconfig</TT
> file, it will list the Perl
      modules it finds. If one is missing, go back and double-check the
      module installation from <A
HREF="nonroot.html#install-perlmodules-nonroot"
>Section 2.6.4</A
>, 
      then delete the <TT
CLASS="filename"
>localconfig</TT
> file and try again.
      </P
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/warning.gif"
HSPACE="5"
ALT="Warning"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>One option in <TT
CLASS="filename"
>localconfig</TT
> you
        might have problems with is the web server group. If you can't
        successfully browse to the <TT
CLASS="filename"
>index.cgi</TT
> (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.</P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="suexec"
>2.6.6.1. suexec or shared hosting</A
></H3
><P
>If you are running on a system that uses suexec (most shared
        hosting environments do this), you will need to set the
        <EM
>webservergroup</EM
> value in <TT
CLASS="filename"
>localconfig</TT
>
        to match <EM
>your</EM
> primary group, rather than the one
        the web server runs under.  You will need to run the following
        shell commands after running <B
CLASS="command"
>./checksetup.pl</B
>,
        every time you run it (or modify <TT
CLASS="filename"
>checksetup.pl</TT
>
        to do them for you via the system() command).
        <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>        for i in docs graphs images js skins; do find $i -type d -exec chmod o+rx {} \; ; done
        for i in jpg gif css js png html rdf xul; do find . -name \*.$i -exec chmod o+r {} \; ; done
        find . -name .htaccess -exec chmod o+r {} \;
        chmod o+x . data data/webdot</PRE
></FONT
></TD
></TR
></TABLE
>
        Pay particular attention to the number of semicolons and dots.
        They are all important.  A future version of Bugzilla will
        hopefully be able to do this for you out of the box.</P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="os-specific.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="upgrade.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>OS-Specific Installation Notes</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="installing-bugzilla.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Upgrading to New Releases</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>