745 lines
14 KiB
HTML
745 lines
14 KiB
HTML
<!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 - 3.6.1
|
|
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 - 3.6.1
|
|
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="AEN897"
|
|
>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="AEN901"
|
|
>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="AEN909"
|
|
>2.6.2.1. Running MySQL as Non-Root</A
|
|
></H3
|
|
><DIV
|
|
CLASS="section"
|
|
><H4
|
|
CLASS="section"
|
|
><A
|
|
NAME="AEN911"
|
|
>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"
|
|
> [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="AEN915"
|
|
>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="AEN920"
|
|
>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"
|
|
> <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"
|
|
> <SAMP
|
|
CLASS="prompt"
|
|
>bash$</SAMP
|
|
>
|
|
<B
|
|
CLASS="command"
|
|
>safe_mysql &</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="AEN936"
|
|
>2.6.3. Perl</A
|
|
></H2
|
|
><P
|
|
> 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"
|
|
> <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 && make test && make install</B
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> 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
|
|
> 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="AEN958"
|
|
>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="AEN961"
|
|
>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="AEN970"
|
|
>2.6.6. Bugzilla</A
|
|
></H2
|
|
><P
|
|
> 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
|
|
> |