blob: 1cee3484c9562b920420c8dde298758f80a94702 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>UNIX (non-root) Installation Notes</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="The Bugzilla Guide - 2.20.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="Administering Bugzilla"
HREF="administration.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 - 2.20.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="administration.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="nonroot"
>2.5. UNIX (non-root) Installation Notes</A
></H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN857"
>2.5.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="AEN861"
>2.5.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 adminstrator 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="AEN869"
>2.5.2.1. Running MySQL as Non-Root</A
></H3
><DIV
CLASS="section"
><H4
CLASS="section"
><A
NAME="AEN871"
>2.5.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="AEN875"
>2.5.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="AEN880"
>2.5.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="AEN896"
>2.5.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"
>&#13; <SAMP
CLASS="prompt"
>bash$</SAMP
>
<B
CLASS="command"
>wget http://perl.com/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
>Once you have Perl installed into a directory (probably
in <TT
CLASS="filename"
>~/perl/bin</TT
>), you'll have to
change the locations on the scripts, which is detailed later on
this page.</P
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="install-perlmodules-nonroot"
>2.5.4. Perl Modules</A
></H2
><P
>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.</P
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN915"
>2.5.4.1. The Independant Method</A
></H3
><P
>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:</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <SAMP
CLASS="prompt"
>bash$</SAMP
>
<B
CLASS="command"
>/home/foo/perl/bin/perl -MCPAN -e 'shell'</B
>
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>And then:</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <SAMP
CLASS="prompt"
>cpan&#62;</SAMP
>
<B
CLASS="command"
>install Bundle::Bugzilla</B
>
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>With this method, module installation will usually go a lot
smoother, but if you have any hang-ups, you can consult the next
section.</P
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN928"
>2.5.4.2. The Mixed Method</A
></H3
><P
>First, you'll need to configure CPAN to
install modules in your home directory. The CPAN FAQ says the
following on this issue:</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;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.</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>So, you will need to create a Perl directory in your home
directory, as well as the <TT
CLASS="filename"
>lib</TT
>,
<TT
CLASS="filename"
>man</TT
>,
<TT
CLASS="filename"
>man/man1</TT
>, and
<TT
CLASS="filename"
>man/man3</TT
> 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.)</P
><P
>After that, go into the CPAN shell:</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <SAMP
CLASS="prompt"
>bash$</SAMP
>
<B
CLASS="command"
>perl -MCPAN -e 'shell'</B
>
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>From there, you will need to type in the above "o conf" command
and commit the changes. Then you can run through the installation:</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <SAMP
CLASS="prompt"
>cpan&#62;</SAMP
>
<B
CLASS="command"
>install Bundle::Bugzilla</B
>
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>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:</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <SAMP
CLASS="prompt"
>cpan&#62;</SAMP
>
<B
CLASS="command"
>force install Template</B
>
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>You may also want to install the other optional modules:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <SAMP
CLASS="prompt"
>cpan&#62;</SAMP
>
<B
CLASS="command"
>install GD</B
>
<SAMP
CLASS="prompt"
>cpan&#62;</SAMP
>
<B
CLASS="command"
>install Chart::Base</B
>
<SAMP
CLASS="prompt"
>cpan&#62;</SAMP
>
<B
CLASS="command"
>install MIME::Parser</B
>
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN961"
>2.5.5. HTTP Server</A
></H2
><P
>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.</P
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN964"
>2.5.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="AEN973"
>2.5.6. Bugzilla</A
></H2
><P
>If you had to install Perl modules as a non-root user
(<A
HREF="nonroot.html#install-perlmodules-nonroot"
>Section 2.5.4</A
>) or to non-standard
directories, you will need to change the scripts, setting the correct
location of the Perl modules:</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>perl -pi -e
's@use strict\;@use strict\; use lib \"/home/foo/perl/lib\"\;@'
*cgi *pl Bug.pm processmail syncshadowdb</PRE
></FONT
></TD
></TR
></TABLE
>
Change <TT
CLASS="filename"
>/home/foo/perl/lib</TT
> to
your personal Perl library directory. You can probably skip this
step if you are using the independant method of Perl module
installation.
</P
><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 the CPAN shell, 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
>The 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
></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="administration.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"
>Administering Bugzilla</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>