Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 9e41a94a3e659caa5b91706d5c415d34 > files > 912

bugzilla-4.4.11-1.mga5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>2.2.&#160;Configuration</title><link rel="stylesheet" type="text/css" href="../../style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><meta name="keywords" content="Bugzilla, Guide, installation, FAQ, administration, integration, MySQL, Mozilla, webtools"><link rel="home" href="index.html" title="The Bugzilla Guide - 4.4.11 Release"><link rel="up" href="installing-bugzilla.html" title="Chapter&#160;2.&#160;Installing Bugzilla"><link rel="prev" href="installation.html" title="2.1.&#160;Installation"><link rel="next" href="extraconfig.html" title="2.3.&#160;Optional Additional Configuration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.2.&#160;Configuration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="installation.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;2.&#160;Installing Bugzilla</th><td width="20%" align="right">&#160;<a accesskey="n" href="extraconfig.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="configuration"></a>2.2.&#160;Configuration</h2></div></div></div><div class="warning" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
        Poorly-configured MySQL and Bugzilla installations have
        given attackers full access to systems in the past. Please take the
        security parts of these guidelines seriously, even for Bugzilla 
        machines hidden away behind your firewall. Be certain to read
        <a class="xref" href="security.html" title="Chapter&#160;4.&#160;Bugzilla Security">Chapter&#160;4, <i>Bugzilla Security</i></a> for some important security tips.
      </p></td></tr></table></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="localconfig"></a>2.2.1.&#160;localconfig</h3></div></div></div><p>
        You should now run <code class="filename">checksetup.pl</code> again, this time
        without the <code class="literal">--check-modules</code> switch.
      </p><pre class="screen"><code class="prompt">bash#</code> ./checksetup.pl</pre><p>
        This time, <code class="filename">checksetup.pl</code> should tell you that all
        the correct modules are installed and will display a message about, and
        write out a  file called, <code class="filename">localconfig</code>. This file
        contains the default settings for a number of Bugzilla parameters.
      </p><p>
        Load this file in your editor. The only two values you
        <span class="emphasis"><em>need</em></span> to change are $db_driver and $db_pass,
        respectively the type of the database and the password for
        the user you will create for your database. Pick a strong
        password (for simplicity, it should not contain single quote
        characters) and put it here. $db_driver can be either 'mysql',
        'Pg', 'Oracle' or 'Sqlite'.
      </p><div class="note" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
          In Oracle, <code class="literal">$db_name</code> should actually be 
          the SID name of your database (e.g. "XE" if you are using Oracle XE).
        </p></td></tr></table></div><p>
        You may need to change the value of 
        <span class="emphasis"><em>webservergroup</em></span> if your web server does not 
        run in the "apache" group.  On Debian, for example, Apache runs in 
        the "www-data" group.  If you are going to run Bugzilla on a 
        machine where you do not have root access (such as on a shared web 
        hosting account), you will need to leave
        <span class="emphasis"><em>webservergroup</em></span> empty, ignoring the warnings 
        that <code class="filename">checksetup.pl</code> will subsequently display 
        every time it is run.
      </p><div class="caution" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Caution"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
          If you are using suexec, you should use your own primary group
          for <span class="emphasis"><em>webservergroup</em></span> rather than leaving it
          empty, and see the additional directions in the suexec section
          <a class="xref" href="nonroot.html#suexec" title="2.6.6.1.&#160;suexec or shared hosting">Section&#160;2.6.6.1, &#8220;suexec or shared hosting&#8221;</a>.
        </p></td></tr></table></div><p>
        The other options in the <code class="filename">localconfig</code> file
        are documented by their accompanying comments. If you have a slightly
        non-standard database setup, you may wish to change one or more of
        the other "$db_*" parameters.
      </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="database-engine"></a>2.2.2.&#160;Database Server</h3></div></div></div><p>
        This section deals with configuring your database server for use
        with Bugzilla. Currently, MySQL (<a class="xref" href="configuration.html#mysql" title="2.2.2.2.&#160;MySQL">Section&#160;2.2.2.2, &#8220;MySQL&#8221;</a>),
        PostgreSQL (<a class="xref" href="configuration.html#postgresql" title="2.2.2.3.&#160;PostgreSQL">Section&#160;2.2.2.3, &#8220;PostgreSQL&#8221;</a>), Oracle (<a class="xref" href="configuration.html#oracle" title="2.2.2.4.&#160;Oracle">Section&#160;2.2.2.4, &#8220;Oracle&#8221;</a>)
        and SQLite (<a class="xref" href="configuration.html#sqlite" title="2.2.2.5.&#160;SQLite">Section&#160;2.2.2.5, &#8220;SQLite&#8221;</a>) are available.
      </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="database-schema"></a>2.2.2.1.&#160;Bugzilla Database Schema</h4></div></div></div><p>
          The Bugzilla database schema is available at
          <a class="ulink" href="http://www.ravenbrook.com/project/p4dti/tool/cgi/bugzilla-schema/" target="_top">Ravenbrook</a>.
          This very valuable tool can generate a written description of
          the Bugzilla database schema for any version of Bugzilla. It
          can also generate a diff between two versions to help someone
          see what has changed.
        </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="mysql"></a>2.2.2.2.&#160;MySQL</h4></div></div></div><div class="caution" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Caution"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
            MySQL's default configuration is insecure.
            We highly recommend to run <code class="filename">mysql_secure_installation</code>
            on Linux or the MySQL installer on Windows, and follow the instructions.
            Important points to note are:
            </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Be sure that the root account has a secure password set.</p></li><li class="listitem"><p>Do not create an anonymous account, and if it exists, say "yes"
                to remove it.</p></li><li class="listitem"><p>If your web server and MySQL server are on the same machine,
                you should disable the network access.</p></li></ol></div><p>
          </p></td></tr></table></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="mysql-max-allowed-packet"></a>2.2.2.2.1.&#160;Allow large attachments and many comments</h5></div></div></div><p>By default, MySQL will only allow you to insert things
          into the database that are smaller than 1MB. Attachments
          may be larger than this. Also, Bugzilla combines all comments
          on a single bug into one field for full-text searching, and the
          combination of all comments on a single bug could in some cases
          be larger than 1MB.</p><p>To change MySQL's default, you need to edit your MySQL
          configuration file, which is usually <code class="filename">/etc/my.cnf</code>
          on Linux. We recommend that you allow at least 4MB packets by
          adding the "max_allowed_packet" parameter to your MySQL 
          configuration in the "[mysqld]" section, like this:</p><pre class="screen">[mysqld]
# Allow packets up to 4MB
max_allowed_packet=4M
          </pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="idm140035943290112"></a>2.2.2.2.2.&#160;Allow small words in full-text indexes</h5></div></div></div><p>By default, words must be at least four characters in length
          in order to be indexed by MySQL's full-text indexes. This causes
          a lot of Bugzilla specific words to be missed, including "cc",
          "ftp" and "uri".</p><p>MySQL can be configured to index those words by setting the
          ft_min_word_len param to the minimum size of the words to index.
          This can be done by modifying the <code class="filename">/etc/my.cnf</code>
          according to the example below:</p><pre class="screen">[mysqld]
# Allow small words in full-text indexes
ft_min_word_len=2</pre><p>Rebuilding the indexes can be done based on documentation found at
          <a class="ulink" href="http://www.mysql.com/doc/en/Fulltext_Fine-tuning.html" target="_top">http://www.mysql.com/doc/en/Fulltext_Fine-tuning.html</a>.
          </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="install-setupdatabase-adduser"></a>2.2.2.2.3.&#160;Add a user to MySQL</h5></div></div></div><p>
            You need to add a new MySQL user for Bugzilla to use.
            (It's not safe to have Bugzilla use the MySQL root account.)
            The following instructions assume the defaults in
            <code class="filename">localconfig</code>; if you changed those,
            you need to modify the SQL command appropriately. You will
            need the <em class="replaceable"><code>$db_pass</code></em> password you
            set in <code class="filename">localconfig</code> in 
            <a class="xref" href="configuration.html#localconfig" title="2.2.1.&#160;localconfig">Section&#160;2.2.1, &#8220;localconfig&#8221;</a>.
          </p><p>
            We use an SQL <span class="command"><strong>GRANT</strong></span> command to create
            a <span class="quote">&#8220;<span class="quote">bugs</span>&#8221;</span> user. This also restricts the 
            <span class="quote">&#8220;<span class="quote">bugs</span>&#8221;</span>user to operations within a database
            called <span class="quote">&#8220;<span class="quote">bugs</span>&#8221;</span>, and only allows the account
            to connect from <span class="quote">&#8220;<span class="quote">localhost</span>&#8221;</span>. Modify it to
            reflect your setup if you will be connecting from another
            machine or as a different user.
          </p><p>
            Run the <code class="filename">mysql</code> command-line client and enter:
          </p><pre class="screen">
<code class="prompt">mysql&gt;</code> GRANT SELECT, INSERT,
       UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,
       CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.*
       TO bugs@localhost IDENTIFIED BY '<em class="replaceable"><code>$db_pass</code></em>';
<code class="prompt">mysql&gt;</code> FLUSH PRIVILEGES;
          </pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="idm140035943273936"></a>2.2.2.2.4.&#160;Permit attachments table to grow beyond 4GB</h5></div></div></div><p>
            By default, MySQL will limit the size of a table to 4GB.
            This limit is present even if the underlying filesystem
            has no such limit.  To set a higher limit, follow these
            instructions.
          </p><p>
            After you have completed the rest of the installation (or at least the
            database setup parts), you should run the <code class="filename">MySQL</code>
            command-line client and enter the following, replacing <code class="literal">$bugs_db</code>
            with your Bugzilla database name (<span class="emphasis"><em>bugs</em></span> by default):
          </p><pre class="screen">
<code class="prompt">mysql&gt;</code> use <em class="replaceable"><code>$bugs_db</code></em>
<code class="prompt">mysql&gt;</code> ALTER TABLE attachments
           AVG_ROW_LENGTH=1000000, MAX_ROWS=20000;
          </pre><p>
            The above command will change the limit to 20GB. Mysql will have 
            to make a temporary copy of your entire table to do this. Ideally, 
            you should do this when your attachments table is still small. 
          </p><div class="note" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
              This does not affect Big Files, attachments that are stored directly
              on disk instead of in the database.
            </p></td></tr></table></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="postgresql"></a>2.2.2.3.&#160;PostgreSQL</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="idm140035943264336"></a>2.2.2.3.1.&#160;Add a User to PostgreSQL</h5></div></div></div><p>You need to add a new user to PostgreSQL for the Bugzilla
          application to use when accessing the database. The following instructions
          assume the defaults in <code class="filename">localconfig</code>; if you
          changed those, you need to modify the commands appropriately. You will
          need the <em class="replaceable"><code>$db_pass</code></em> password you
          set in <code class="filename">localconfig</code> in 
          <a class="xref" href="configuration.html#localconfig" title="2.2.1.&#160;localconfig">Section&#160;2.2.1, &#8220;localconfig&#8221;</a>.</p><p>On most systems, to create the user in PostgreSQL, you will need to
          login as the root user, and then</p><pre class="screen"><code class="prompt">bash#</code> su - postgres</pre><p>As the postgres user, you then need to create a new user: </p><pre class="screen"><code class="prompt">bash$</code> createuser -U postgres -dRSP bugs</pre><p>When asked for a password, provide the password which will be set as
          <em class="replaceable"><code>$db_pass</code></em> in <code class="filename">localconfig</code>.
          The created user will not be a superuser (-S) and will not be able to create
          new users (-R). He will only have the ability to create databases (-d).</p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="idm140035943254784"></a>2.2.2.3.2.&#160;Configure PostgreSQL</h5></div></div></div><p>Now, you will need to edit <code class="filename">pg_hba.conf</code> which is
          usually located in <code class="filename">/var/lib/pgsql/data/</code>. In this file,
          you will need to add a new line to it as follows:</p><p>
            <code class="computeroutput">host   all    bugs   127.0.0.1    255.255.255.255  md5</code>
          </p><p>This means that for TCP/IP (host) connections, allow connections from
          '127.0.0.1' to 'all' databases on this server from the 'bugs' user, and use
          password authentication (md5) for that user.</p><p>Now, you will need to restart PostgreSQL, but you will need to fully
          stop and start the server rather than just restarting due to the possibility
          of a change to <code class="filename">postgresql.conf</code>. After the server has
          restarted, you will need to edit <code class="filename">localconfig</code>, finding
          the <code class="literal">$db_driver</code> variable and setting it to
          <code class="literal">Pg</code> and changing the password in <code class="literal">$db_pass</code>
          to the one you picked previously, while setting up the account.</p></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="oracle"></a>2.2.2.4.&#160;Oracle</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="idm140035943244560"></a>2.2.2.4.1.&#160;Create a New Tablespace</h5></div></div></div><p>
            You can use the existing tablespace or create a new one for Bugzilla.
            To create a new tablespace, run the following command:
          </p><pre class="programlisting">
CREATE TABLESPACE bugs
DATAFILE '<em class="replaceable"><code>$path_to_datafile</code></em>' SIZE 500M
AUTOEXTEND ON NEXT 30M MAXSIZE UNLIMITED
          </pre><p>
            Here, the name of the tablespace is 'bugs', but you can
            choose another name. <em class="replaceable"><code>$path_to_datafile</code></em> is
            the path to the file containing your database, for instance
            <code class="filename">/u01/oradata/bugzilla.dbf</code>.
            The initial size of the database file is set in this example to 500 Mb,
            with an increment of 30 Mb everytime we reach the size limit of the file.
          </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="idm140035943239888"></a>2.2.2.4.2.&#160;Add a User to Oracle</h5></div></div></div><p>
            The user name and password must match what you set in
            <code class="filename">localconfig</code> (<code class="literal">$db_user</code>
            and <code class="literal">$db_pass</code>, respectively). Here, we assume that
            the user name is 'bugs' and the tablespace name is the same
            as above. 
          </p><pre class="programlisting">
CREATE USER bugs
IDENTIFIED BY "<em class="replaceable"><code>$db_pass</code></em>"
DEFAULT TABLESPACE bugs
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT;
-- GRANT/REVOKE ROLE PRIVILEGES
GRANT CONNECT TO bugs;
GRANT RESOURCE TO bugs;
-- GRANT/REVOKE SYSTEM PRIVILEGES
GRANT UNLIMITED TABLESPACE TO bugs;
GRANT EXECUTE ON CTXSYS.CTX_DDL TO bugs;
          </pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="idm140035943234752"></a>2.2.2.4.3.&#160;Configure the Web Server</h5></div></div></div><p>
            If you use Apache, append these lines to <code class="filename">httpd.conf</code>
            to set ORACLE_HOME and LD_LIBRARY_PATH. For instance:
          </p><pre class="programlisting">
SetEnv ORACLE_HOME /u01/app/oracle/product/10.2.0/
SetEnv LD_LIBRARY_PATH /u01/app/oracle/product/10.2.0/lib/
          </pre><p>
            When this is done, restart your web server.
          </p></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="sqlite"></a>2.2.2.5.&#160;SQLite</h4></div></div></div><div class="caution" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Caution"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
            Due to SQLite's <a class="ulink" href="http://sqlite.org/faq.html#q5" target="_top">concurrency
            limitations</a> we recommend SQLite only for small and development
            Bugzilla installations.
          </p></td></tr></table></div><p>
          No special configuration is required to run Bugzilla on SQLite.
          The database will be stored in <code class="filename">data/db/$db_name</code>,
          where <code class="literal">$db_name</code> is the database name defined
          in <code class="filename">localconfig</code>.
        </p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idm140035943225376"></a>2.2.3.&#160;checksetup.pl</h3></div></div></div><p>
        Next, rerun <code class="filename">checksetup.pl</code>. It reconfirms
        that all the modules are present, and notices the altered 
        localconfig file, which it assumes you have edited to your
        satisfaction. It compiles the UI templates,
        connects to the database using the 'bugs'
        user you created and the password you defined, and creates the 
        'bugs' database and the tables therein. 
      </p><p>
        After that, it asks for details of an administrator account. Bugzilla
        can have multiple administrators - you can create more later - but
        it needs one to start off with.
        Enter the email address of an administrator, his or her full name, 
        and a suitable Bugzilla password.
      </p><p>
        <code class="filename">checksetup.pl</code> will then finish. You may rerun
        <code class="filename">checksetup.pl</code> at any time if you wish.
      </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="http"></a>2.2.4.&#160;Web server</h3></div></div></div><p>
        Configure your web server according to the instructions in the
        appropriate section. (If it makes a difference in your choice,
        the Bugzilla Team recommends Apache.) To check whether your web server
	is correctly configured, try to access <code class="filename">testagent.cgi</code>
	from your web server. If "OK" is displayed, then your configuration
	is successful. Regardless of which web server
        you are using, however, ensure that sensitive information is
        not remotely available by properly applying the access controls in
        <a class="xref" href="security-webserver.html#security-webserver-access" title="4.2.1.&#160;Disabling Remote Access to Bugzilla Configuration Files">Section&#160;4.2.1, &#8220;Disabling Remote Access to Bugzilla Configuration Files&#8221;</a>. You can run
        <code class="filename">testserver.pl</code> to check if your web server serves
        Bugzilla files as expected.
      </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="http-apache"></a>2.2.4.1.&#160;Bugzilla using Apache</h4></div></div></div><p>You have two options for running Bugzilla under Apache - 
          <a class="link" href="configuration.html#http-apache-mod_cgi" title="2.2.4.1.1.&#160;Apache httpd&#8482; with mod_cgi">mod_cgi</a> (the default) and
          <a class="link" href="configuration.html#http-apache-mod_perl" title="2.2.4.1.2.&#160;Apache httpd&#8482; with mod_perl">mod_perl</a> (new in Bugzilla
          2.23)
        </p><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="http-apache-mod_cgi"></a>2.2.4.1.1.&#160;Apache <span class="productname">httpd</span>&#8482; with mod_cgi</h5></div></div></div><p>
            To configure your Apache web server to work with Bugzilla while using
            mod_cgi, do the following:
            </p><div class="procedure"><ol class="procedure" type="1"><li class="step"><p>
                Load <code class="filename">httpd.conf</code> in your editor.
                In Fedora and Red Hat Linux, this file is found in
                <code class="filename">/etc/httpd/conf</code>.
                </p></li><li class="step"><p>
                Apache uses <code class="computeroutput">&lt;Directory&gt;</code>
                directives to permit fine-grained permission setting. Add the
                following lines to a directive that applies to the location
                of your Bugzilla installation. (If such a section does not
                exist, you'll want to add one.) In this example, Bugzilla has
                been installed at 
                <code class="filename">/var/www/html/bugzilla</code>.
                </p><pre class="programlisting">
&lt;Directory /var/www/html/bugzilla&gt;
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride All
&lt;/Directory&gt;
                </pre><p>
                These instructions: allow apache to run .cgi files found
                within the bugzilla directory; instructs the server to look
                for a file called <code class="filename">index.cgi</code> or, if not
                found, <code class="filename">index.html</code> if someone
                only types the directory name into the browser; and allows
                Bugzilla's <code class="filename">.htaccess</code> files to override
                some global permissions.
                </p><div class="note" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
                    It is possible to make these changes globally, or to the
                    directive controlling Bugzilla's parent directory (e.g.
                    <code class="computeroutput">&lt;Directory /var/www/html/&gt;</code>).
                    Such changes would also apply to the Bugzilla directory...
                    but they would also apply to many other places where they
                    may or may not be appropriate. In most cases, including
                    this one, it is better to be as restrictive as possible
                    when granting extra access.
                </p></td></tr></table></div><div class="note" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
                    On Windows, you may have to also add the
                    <code class="computeroutput">ScriptInterpreterSource Registry-Strict</code>
                    line, see <a class="link" href="os-specific.html#win32-http" title="2.5.1.3.&#160;Serving the web pages">Windows specific notes</a>.
                </p></td></tr></table></div></li><li class="step"><p>
                <code class="filename">checksetup.pl</code> can set tighter permissions
                on Bugzilla's files and directories if it knows what group the
                web server runs as. Find the <code class="computeroutput">Group</code>
                line in <code class="filename">httpd.conf</code>, place the value found
                there in the <em class="replaceable"><code>$webservergroup</code></em> variable
                in <code class="filename">localconfig</code>, then rerun
                <code class="filename">checksetup.pl</code>.
                </p></li><li class="step"><p>
                Optional: If Bugzilla does not actually reside in the webspace
                directory, but instead has been symbolically linked there, you
                will need to add the following to the
                <code class="computeroutput">Options</code> line of the Bugzilla 
                <code class="computeroutput">&lt;Directory&gt;</code> directive
                (the same one as in the step above):
                </p><pre class="programlisting">+FollowSymLinks</pre><p>
                Without this directive, Apache will not follow symbolic links
                to places outside its own directory structure, and you will be
                unable to run Bugzilla.
                </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="http-apache-mod_perl"></a>2.2.4.1.2.&#160;Apache <span class="productname">httpd</span>&#8482; with mod_perl</h5></div></div></div><p>Some configuration is required to make Bugzilla work with Apache
            and mod_perl</p><div class="procedure"><ol class="procedure" type="1"><li class="step"><p>
                Load <code class="filename">httpd.conf</code> in your editor.
                In Fedora and Red Hat Linux, this file is found in
                <code class="filename">/etc/httpd/conf</code>.
                </p></li><li class="step"><p>Add the following information to your httpd.conf file, substituting
                where appropriate with your own local paths.</p><div class="note" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>This should be used instead of the &lt;Directory&gt; block
                shown above. This should also be above any other <code class="literal">mod_perl</code>
                directives within the <code class="filename">httpd.conf</code> and must be specified
                in the order as below.</p></td></tr></table></div><div class="warning" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>You should also ensure that you have disabled <code class="literal">KeepAlive</code>
                support in your Apache install when utilizing Bugzilla under mod_perl</p></td></tr></table></div><pre class="programlisting">
PerlSwitches -w -T
PerlConfigRequire /var/www/html/bugzilla/mod_perl.pl
                </pre></li><li class="step"><p>
					<code class="filename">checksetup.pl</code> can set tighter permissions
					on Bugzilla's files and directories if it knows what group the
					web server runs as. Find the <code class="computeroutput">Group</code>
					line in <code class="filename">httpd.conf</code>, place the value found
					there in the <em class="replaceable"><code>$webservergroup</code></em> variable
					in <code class="filename">localconfig</code>, then rerun
					<code class="filename">checksetup.pl</code>.
				</p></li></ol></div><p>On restarting Apache, Bugzilla should now be running within the
            mod_perl environment. Please ensure you have run checksetup.pl to set
		    permissions before you restart Apache.</p><div class="note" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>Please bear the following points in mind when looking at using 
                Bugzilla under mod_perl: 
            </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                    mod_perl support in Bugzilla can take up a HUGE amount of RAM. You could be
                    looking at 30MB per httpd child, easily. Basically, you just need a lot of RAM.
                    The more RAM you can get, the better. mod_perl is basically trading RAM for
                    speed. At least 2GB total system RAM is recommended for running Bugzilla under
                    mod_perl.
                </p></li><li class="listitem"><p>
                    Under mod_perl, you have to restart Apache if you make any manual change to
                    any Bugzilla file. You can't just reload--you have to actually 
					<span class="emphasis"><em>restart</em></span> the server (as in make sure it stops and starts 
					again). You <span class="emphasis"><em>can</em></span> change localconfig and the params file 
					manually, if you want, because those are re-read every time you load a page.
                </p></li><li class="listitem"><p>
                    You must run in Apache's Prefork MPM (this is the default). The Worker MPM
                    may not work--we haven't tested Bugzilla's mod_perl support under threads.
					(And, in fact, we're fairly sure it <span class="emphasis"><em>won't</em></span> work.)
                </p></li><li class="listitem"><p>
                    Bugzilla generally expects to be the only mod_perl application running on
                    your entire server. It may or may not work if there are other applications also
                    running under mod_perl. It does try its best to play nice with other mod_perl
                    applications, but it still may have conflicts.
                </p></li><li class="listitem"><p>
                    It is recommended that you have one Bugzilla instance running under mod_perl
                    on your server. Bugzilla has not been tested with more than one instance running.
                </p></li></ul></div><p>
            </p></td></tr></table></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="http-iis"></a>2.2.4.2.&#160;Microsoft <span class="productname">Internet Information Services</span>&#8482;</h4></div></div></div><p>
          If you are running Bugzilla on Windows and choose to use
          Microsoft's <span class="productname">Internet Information Services</span>&#8482;
          or <span class="productname">Personal Web Server</span>&#8482; you will need
          to perform a number of other configuration steps as explained below.
          You may also want to refer to the following Microsoft Knowledge
          Base articles: 
          <a class="ulink" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;245225" target="_top">245225</a> 
          <span class="quote">&#8220;<span class="quote">HOW TO: Configure and Test a PERL Script with IIS 4.0,
          5.0, and 5.1</span>&#8221;</span> (for <span class="productname">Internet Information
          Services</span>&#8482;) and 
          <a class="ulink" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;231998" target="_top">231998</a>          
          <span class="quote">&#8220;<span class="quote">HOW TO: FP2000: How to Use Perl with Microsoft Personal Web
          Server on Windows 95/98</span>&#8221;</span> (for <span class="productname">Personal Web
          Server</span>&#8482;).
        </p><p>
          You will need to create a virtual directory for the Bugzilla
          install.  Put the Bugzilla files in a directory that is named
          something <span class="emphasis"><em>other</em></span> than what you want your
          end-users accessing.  That is, if you want your users to access
          your Bugzilla installation through 
          <span class="quote">&#8220;<span class="quote">http://&lt;yourdomainname&gt;/Bugzilla</span>&#8221;</span>, then do
          <span class="emphasis"><em>not</em></span> put your Bugzilla files in a directory
          named <span class="quote">&#8220;<span class="quote">Bugzilla</span>&#8221;</span>.  Instead, place them in a different
          location, and then use the IIS Administration tool to create a
          Virtual Directory named "Bugzilla" that acts as an alias for the
          actual location of the files.  When creating that virtual directory,
          make sure you add the <span class="quote">&#8220;<span class="quote">Execute (such as ISAPI applications or
          CGI)</span>&#8221;</span> access permission.
        </p><p>
          You will also need to tell IIS how to handle Bugzilla's
          .cgi files. Using the IIS Administration tool again, open up
          the properties for the new virtual directory and select the
          Configuration option to access the Script Mappings. Create an
          entry mapping .cgi to:
        </p><pre class="programlisting">
&lt;full path to perl.exe &gt;\perl.exe -x&lt;full path to Bugzilla&gt; -wT "%s" %s
        </pre><p>
          For example:
        </p><pre class="programlisting">
c:\perl\bin\perl.exe -xc:\bugzilla -wT "%s" %s
        </pre><div class="note" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
            The ActiveState install may have already created an entry for
            .pl files that is limited to <span class="quote">&#8220;<span class="quote">GET,HEAD,POST</span>&#8221;</span>. If
            so, this mapping should be <span class="emphasis"><em>removed</em></span> as
            Bugzilla's .pl files are not designed to be run via a web server.
          </p></td></tr></table></div><p>
          IIS will also need to know that the index.cgi should be treated
          as a default document.  On the Documents tab page of the virtual
          directory properties, you need to add index.cgi as a default
          document type.  If you  wish, you may remove the other default
          document types for this particular virtual directory, since Bugzilla 
          doesn't use any of them.
        </p><p>
          Also, and this can't be stressed enough, make sure that files
          such as <code class="filename">localconfig</code> and your
          <code class="filename">data</code> directory are
          secured as described in <a class="xref" href="security-webserver.html#security-webserver-access" title="4.2.1.&#160;Disabling Remote Access to Bugzilla Configuration Files">Section&#160;4.2.1, &#8220;Disabling Remote Access to Bugzilla Configuration Files&#8221;</a>.
        </p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="install-config-bugzilla"></a>2.2.5.&#160;Bugzilla</h3></div></div></div><p>
        Your Bugzilla should now be working. Access 
        <code class="filename">http://&lt;your-bugzilla-server&gt;/</code> - 
        you should see the Bugzilla
        front page. If not, consult the Troubleshooting section,
        <a class="xref" href="troubleshooting.html" title="Appendix&#160;A.&#160;Troubleshooting">Appendix&#160;A, <i>Troubleshooting</i></a>.
      </p><div class="note" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
          The URL above may be incorrect if you installed Bugzilla into a 
          subdirectory or used a symbolic link from your web site root to 
          the Bugzilla directory.
        </p></td></tr></table></div><p>
        Log in with the administrator account you defined in the last 
        <code class="filename">checksetup.pl</code> run. You should go through 
        the Parameters page and see if there are any you wish to change.
        They key parameters are documented in <a class="xref" href="parameters.html" title="3.1.&#160;Bugzilla Configuration">Section&#160;3.1, &#8220;Bugzilla Configuration&#8221;</a>;
        you should certainly alter 
        <span class="command"><strong>maintainer</strong></span> and <span class="command"><strong>urlbase</strong></span>; 
        you may also want to alter 
        <span class="command"><strong>cookiepath</strong></span> or <span class="command"><strong>requirelogin</strong></span>.
      </p><p>
        Bugzilla has several optional features which require extra 
        configuration. You can read about those in
        <a class="xref" href="extraconfig.html" title="2.3.&#160;Optional Additional Configuration">Section&#160;2.3, &#8220;Optional Additional Configuration&#8221;</a>.
      </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="installation.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="installing-bugzilla.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="extraconfig.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.1.&#160;Installation&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;2.3.&#160;Optional Additional Configuration</td></tr></table></div></body></html>