3. Installation

3.1. Overview
3.2. Installing on Debian
3.3. Installing on RPM-based systems
3.4. Installing GForge
3.5. Configuring the Database (PostgreSQL)
3.6. Configuring DNS Server (BIND)
3.7. Configuring PHP
3.8. Configuring the Web Server (Apache)
3.9. Configuring Mail Transport Agent (Any)
3.10. File Release System (FRS)
3.11. Configuring GNU Mailman
3.12. Source Code Management (SCM)
3.13. Cron Jobs
3.14. Verifying the Installation
3.15. Creating the Admin User
3.16. Customizing Front Page
3.17. Optional Features

3.1. Overview

Important

The INSTALL file in GForge package and README files in plugin directories are the authoritive sources for installation instructions and they should have more precedence over this guide.

Note

This installation guide is for GForge 4.5.3.

GForge has a lot of different pieces touching a lot of different components in the system. Cronjobs are required to maintain the system, touching lots of files on a daily and hourly basis, including /etc/* system files.

The plugins that now manage the CVS and SVN functionality have made installation slightly harder because even more files have to be moved into place during installation.

The manual installation of GForge is documented below. Be sure to follow each step carefully, check the forums for frequently asked questions, and ask your Apache, Mailman, and PostgreSQL installation questions in the corresponding mailing lists rather than on the GForge forums where little help is available.

3.2. Installing on Debian

You can simply add lines found at http://people.debian.org/~bayle/ or http://roland.mas.free.fr/ to /etc/apt/sources.list and type apt-get install gforge to install a working GForge system, thanks to Christian Bayle and Roland Mas.

Note that GForge is now part of official Debian, and so you can find it in all debian mirrors all other the planet. Package versions of GForge may lag behind upstream versions. From scratch install snapshot are also available for a guided installation.

3.3. Installing on RPM-based systems

Guillaume Smet makes RPM packages for installing GForge. If you are using Fedora Core or Red Hat Enterprise Linux, you may want to try them.

3.4. Installing GForge

3.4.1. Directory Layout

Instructions below assume that gforge is unpacked into /var/www/gforge. There are some other directories where GForge stores files. In this installation guide, they are put in /var/www too.

Note

If you want to be FHS-compliant, GForge should be unpacked into /usr/local/share/gforge, and directories for storing files should be in /var/lib/gforge or /var/local/gforge. You may use symbolic links to physically place files in FHS-compliant places and still use directory paths that are presented in this manual.

3.4.2. Unpacking

To install GForge, follow these steps (as root):

# bzip2 -dc gforge-4.5.tar.bz2 | tar xvf -
# mv gforge-4.5 /var/www/gforge

3.4.3. Checking out from Branch_4_5

Alternative way to get GForge 4.5.3 is to check out from Branch_4_5 in CVS. This gets latest fixes as well. Each of the plugins need to be checked out separately.

$ CVSROOT=:pserver:anonymous@cvs.gforge.org:/cvsroot/gforge; export CVSROOT
$ cvs checkout -P -rBranch_4_5 gforge
$ mkdir gforge/plugins
$ cd gforge/plugins

$ cvs checkout -P -rBranch_4_5 gforge-plugin-scmcvs
$ ln -s gforge-plugin-scmcvs scmcvs

$ cvs checkout -P -rBranch_4_5 gforge-plugin-scmsvn
$ ln -s gforge-plugin-scmsvn scmsvn

$ cvs checkout -P -rBranch_4_5 gforge-plugin-cvstracker
$ ln -s gforge-plugin-cvstracker cvstracker

$ cd ../www
$ mkdir plugins
$ cd plugins
$ ln -s ../../plugins/scmcvs/www scmcvs
$ ln -s ../../plugins/scmsvn/www scmsvn
$ ln -s ../../plugins/cvstracker/www cvstracker
				
3.4.3.1. Updating checked out Branch_4_5

To get latest updates in Branch_4_5, run the following commands:

$ cd gforge
$ cvs -q update -Pd
$ cd plugins/gforge-plugin-scmcvs
$ cvs -q update -Pd
$ cd ../gforge-plugin-scmsvn
$ cvs -q update -Pd
$ cd ../gforge-plugin-cvstracker
$ cvs -q update -Pd
					

To monitor latest changes in GForge, including Branch_4_5, subscribe to gforge-commits mailing list.

3.4.3.2. Fixing access rights

You may want to make sure that permissions are correct (replace apache-group with the system group used by Apache server):

# cd gforge
# chown -R root:apache-group .
# chmod -R 644 .
# find -type d | xargs chmod 755
# chmod -R 755 cronjobs
					

3.4.4. GForge Config File

In the GForge distribution, you will find etc/local.inc.example. Copy it to /etc/gforge/local.inc and edit all of the settings. In later sections, there is more information about specific configuration settings. Usually, you will want to make it readable only by webserver user (see Section 3.8, “Configuring the Web Server (Apache)” for apache-user and apache-group):

# mkdir /etc/gforge
# chown root: /etc/gforge
# chmod 755 /etc/gforge
# cp /var/www/gforge/etc/local.inc.example /etc/gforge/local.inc
# chown apache-user:apache-group /etc/gforge/local.inc
# chmod 600 /etc/gforge/local.inc

3.4.5. Configuring GForge

Open /etc/gforge/local.inc, configuring the following basic parameters:

  1. Database configuration:

    $sys_dbhost="localhost"
    $sys_dbname="gforge"
    $sys_dbuser="gforge"
    $sys_dbpasswd="gforge-password"
    
  2. Change the following basic variables::

    $sys_urlroot="/var/www/gforge/www/";
    $sys_themeroot="/var/www/gforge/www/themes/";
    $sys_plugins_path="/var/www/gforge/plugins/";
    
  3. The directive $sys_default_domain should contain the domain of your server, e.g. gforge.company.com. You may want to replace all occurences of company.com with company's domain name.

3.5. Configuring the Database (PostgreSQL)

3.5.1. Initialization of PostgreSQL

In some distributions, PostgreSQL database cluster is not initialised. Consult distribution documentation for more information. If database cluster is not created, you can do so by running:

# su - postgres
$ initdb

Caution

This will wipe out any existing PostgreSQL databases!

3.5.2. PostgreSQL Authentication Configuration

The postgres PostgreSQL user is used only during installation. Usually, it can connect via UNIX socket without password when invoked by postgresql system account. Check by running this:

# su - postgres
$ psql template1

If connection fails, add the following line to pg_hba.conf:

local all postgres ident sameuser

GForge uses gforge PostgreSQL user to connect to gforge database by using password. (You can change that name by editing local.inc.) In order this to work, assure that you have the following line in your pg_hba.conf (before other host directives):

host gforge gforge 127.0.0.1 255.255.255.255 md5

This line assumes that GForge will always use local PostgreSQL database (localhost). If this is not the case, consult PostgreSQL manual for ways to allow connection.

The following option should be set in postgresql.conf because connection to localhost uses TCP/IP:

tcpip_socket = true

After all these changes to PostgreSQL configuration files are made, PostgreSQL should be restarted. This depends on the distribution. In Debian, it's like this:

# /etc/init.d/postgresql restart

3.5.3. Importing Database

Create GForge database user:

# su - postgres
$ psql template1
template1=# CREATE USER gforge NOCREATEUSER NOCREATEDB
template1-# PASSWORD 'gforge-password';

Create GForge database:

template1=# CREATE DATABASE gforge OWNER gforge ENCODING 'UNICODE';

Add PL/pgSQL support using the commands:

# su - postgres
$ createlang plpgsql gforge

Finally, install the database:

$ cd /var/www/gforge/db
$ psql -a -U gforge -W -h localhost -f gforge.sql gforge &> /tmp/gforge.sql.log

Note

You may experience the following errors. They are harmless and you can safely ignore them:

ERROR:  permission denied for language c
ERROR:  must be superuser to create procedural language
ERROR:  permission denied for schema public

3.6. Configuring DNS Server (BIND)

GForge needs its own domain. In example GForge configuration file, it's gforge.company.com. You should search for company.com in example GForge configuration file and replace it with your domain name.

Here some example configuration files for BIND are presented that can help you if you are not familiar with BIND but it's not meant to be complete. Don't ask BIND-related questions in GForge forums – consult documentation that come with your distribution and search in Internet. Distributions put files in different places and so there are no file locations here. The example configuration below is only quick start example and doesn't include reverse mapping.

New subdomain in gforge.company.com should be created. In company.com zone file, it may look like that:

gforge          IN      NS      ns.gforge.company.com.
ns.gforge       IN      A       1.2.3.4

Note

Do not add the latter resource record (ns.gforge) if this DNS server serves both company.com and gforge.company.com zones.

New zone file for gforge.company.com may look like this:

$TTL    2d
@       IN      SOA     gforge.company.com. hostmaster.gforge.company.com. (
                              1         ; Serial
                         172800         ; Refresh
                            900         ; Update retry
                        2419200         ; Expire
                           3600 )       ; Negative Cache TTL
;
@               IN      NS      ns.gforge.company.com.
@               IN      A       1.2.3.4
ns              IN      A       1.2.3.4

download        IN      A       1.2.3.4
shell           IN      A       1.2.3.4
users           IN      A       1.2.3.4
lists           IN      A       1.2.3.4
cvs             IN      A       1.2.3.4
svn             IN      A       1.2.3.4
scm             IN      A       1.2.3.4
ldap            IN      A       1.2.3.4
jabber          IN      A       1.2.3.4

The new zone must be added in main BIND configuration file:

zone "gforge.company.com" {
        type master;
        file "/dist-specific/path/to/zone-file";
};

Of course, changes will take effect after reloading BIND.

3.7. Configuring PHP

Make sure you have installed pgsql and mbstring modules.

PHP is used in two ways:

  1. Serving Web pages. In this case, PHP is usually used as module and its configuration is in virtual host configuration, as shown later in the document. If you prefer to configure php.ini, the following directives are required by GForge:

    register_globals = On
    magic_quotes_gpc = On
    file_uploads = On
    include_path=".:/var/www/gforge:/var/www/gforge/www/include:/etc/gforge"
    
  2. Cron jobs and some scripts require PHP Command-Line Interface (CLI). Scripts are usually invoked with command like this:

    $ php4 -f cronjobs/mail/mailing_lists_create.php
    

    Note

    The -f is optional when using PHP CLI but it's required when PHP CGI executable is used.

    You must set include_path in PHP CLI php.ini, like already shown above. Increase memory_limit configuration parameter to at least 32M. To find where php.ini is located, use the following command:

    $ php4 -i | fgrep php.ini
    

3.8. Configuring the Web Server (Apache)

Find what system user and group are used by Apache server and change $sys_apache_user and $sys_apache_group (in GForge configuration) respectively.

You should decide where to put GForge configuration of Apache. It's best if own configuration file that is included by main Apache configuration is used. Consult documentation of your distribution on recommended ways for doing this.

You may use etc/gforge-httpd.conf.example as template for your configuration. The rest of the section is guide to making GForge virtual host configuration for Apache from scratch. All is inside the following template:

NameVirtualHost 1.2.3.4
<VirtualHost 1.2.3.4>

# Put the rest of the directives here.

</VirtualHost>

Note

Configuring for SSL is not discussed in this guide.

  1. Set basic virtual host settings:

    ServerName  gforge.company.com
    ServerAdmin webmaster@gforge.company.com
    
  2. Define log files:

    CustomLog "/var/log/gforge/gforge/access.log" combined
    ErrorLog  "/var/log/gforge/gforge/error.log"
    

    Usual practice is to use logrotate on these files. Alternative is to pipe logs to cronolog which will automatically make directory with access.log and error.log for each day:

    CustomLog "|/usr/bin/cronolog /var/log/gforge/gforge/%Y/%m/%d/access.log" combined
    ErrorLog  "|/usr/bin/cronolog /var/log/gforge/gforge/%Y/%m/%d/error.log"
    

    Note

    In FHS-compliant install, you may want to use /var/local/gforge/log instead of /var/log/gforge. In any cases, the relevant directories should be created with appropriate permissions.

  3. Set up document root:

    DocumentRoot "/var/www/gforge/www"
    <Directory "/var/www/gforge/www">
        Options        FollowSymLinks
        AllowOverride  None
        Order          allow,deny
        Allow from all
        ErrorDocument  404 /404.php
    </Directory>
    
  4. Configuring PHP for Apache

    Ensure that PHP module is loaded. You may need to consult your distribution manual. Typical lines that load and configure PHP module are like this:

    LoadModule php_module	modules/libphp.so
    AddModule mod_php.c
    
    AddType application/x-httpd-php .php
    

    Insert the following instructions after the DocumentRoot directive:

    <Location /projects>
      ForceType application/x-httpd-php
    </Location>
    <Location /users>
      ForceType application/x-httpd-php
    </Location>
    

    Note

    If you use Apache 2, you may need to use a different configuration. Usually, this is not needed. If you receive a Page Not Found summary pages, you better try this different style of configuring.

    Change the existing Files directive to:

    <Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
        AcceptPathInfo On
        LimitRequestBody 2097152
    </Files>
    

    The LimitRequestBody directive allows you to limit the maximum number of bytes of a request (including uploads). The default is 524288 (512Kb). This means that you cannot upload files with a size greater than 512Kb. With this directive, we set it to 2MB. If you wish to set this value higher than 2MB, you must also edit the upload_max_filesize directive in PHP configuration file.

    Add the following lines:

    <Files projects>
    SetOutputFilter PHP
    SetInputFilter PHP
    AcceptPathInfo on
    </Files>
    
    <Files users>
    SetOutputFilter PHP
    SetInputFilter PHP
    AcceptPathInfo on
    </Files>
    
  5. Set up PHP module:

    php_flag   register_globals On
    php_flag   magic_quotes_gpc On
    php_flag   files_uploads    On
    php_value  include_path     ".:/etc/gforge:/var/www/gforge:/var/www/gforge/www/include"
    php_value  default_charset  "UTF-8"
    
  6. Set up directory index script name:

    DirectoryIndex index.php
    

Of course, all changes will take effect only after reloading or restarting Apache.

3.9. Configuring Mail Transport Agent (Any)

Add the following line to /etc/aliases and run newaliases:

noreply: /dev/null

Make sure that the following domain names are accepted as local destinations by mail transport agent:

  • gforge.company.com

  • lists.gforge.company.com

  • users.gforge.company.com

You may want to consider adding MX (mail exchanger) resource records for the above domain names. This is meaningful only if you want fallback mail routes or if firewall doesn't allow incoming port 25 for the server.

3.9.1. Mail gateways to forum and tracker

When forum or tracker is monitored, replying to monitor mails are processed by mail gateways. These gateways use GForge configuration file /etc/gforge/local.inc so that they can access database but the problem is that they run with different user than that of Apache. So if you want to use these gateways, you'll have to change access mode of local.inc.

3.10. File Release System (FRS)

Create a directory (e.g. /var/lib/gforge/download) and make it owned by the webserver user. This directory will be referenced in the GForge Config File /etc/gforge/local.inc as $sys_upload_dir.

# mkdir /var/lib/gforge/download
# chown -R apache-user /var/lib/gforge/download

Note

For FHS-compliance, use /var/local/gforge/download.

3.11. Configuring GNU Mailman

GNU Mailman is used to help manage the GForge mailing lists. Mailman is frequently installed in /usr/lib/mailman but sometimes it can be found in /var/mailman. You should change GForge configuration variable $sys_path_to_mailman to that Mailman directory.

Cronjobs for Mailman are located in cronjobs/mail/*. cronjobs/mail/mailing_lists_create.php is used obviously to create new mailing lists.

For all problems with Mailman installation and use, contact the Mailman mailing lists for help.

To install it:

  1. Install a GNU Mailman package or compile it

  2. Don't integrate Mailman with Postfix (or other MTA) by delegating it generation of alias-style file. GForge generates such file. But you'll need to put mail aliases in /etc/aliases for the required standard mailman mailing list. Create it with:

    # /usr/lib/mailman/bin/newlist mailman
    
  3. Configure mm_cfg.py:

    • DEFAULT_HOST_NAME and DEFAULT_URL should point to lists.gforge.company.com. These variable names may vary depending on Mailman distribution.

    • Strip ugly cgi-bin from URLs in configuration parameters.

  4. su to root and set the Mailman password by using the mmsitepass command

  5. Create directory /var/www/mailman/. It will be document root for lists.gforge.company.com.

  6. In Web server configuraton, create virtual host for Mailman, adjusting ScriptAlias and Alias directives:

    <VirtualHost 1.2.3.4>
      ServerName    lists.gforge.company.com
      ServerAdmin   webmaster@gforge.company.com
    
    # You may want to add these files to logrotate, or just use cronolog as shown below
      CustomLog "/var/log/gforge/lists/access.log" combined
      ErrorLog  "/var/log/gforge/lists/error.log"
    
    #  CustomLog "|/usr/bin/cronolog /var/log/gforge/lists/%Y/%m/%d/access.log" combined
    #  ErrorLog  "|/usr/bin/cronolog /var/log/gforge/lists/%Y/%m/%d/error.log"
    
      DocumentRoot  /var/www/mailman
      DirectoryIndex index.html
      ScriptAlias   /mailman/ /usr/lib/cgi-bin/mailman/
      Alias         /pipermail/ /var/lib/mailman/archives/public/
      Alias         /images/ /usr/share/images/
    </VirtualHost>
    

    Note

    Check that ScriptAlias and Alias directories are correct. The example values are for Debian 3.1 (Sarge).

3.11.1. Mailing list for commits

When repositories are created, mailing list project-commits@lists.gforge.company.com is created too. Note that project administrators should manually set Privacy Options... / Sender filters / accept_these_nonmembers to something like ^.*@servername\.company\.com where servername.company.com is name of the host where Mailman is installed (lists.gforge.company.com).

3.12. Source Code Management (SCM)

CVS and Subversion (SVN) are popular SCM systems that may be installed as plugins, as shown later. You'll have to make their needed directories:

# mkdir /var/www/scmtarballs
# mkdir /var/www/scmsnapshots

These directories correspond to GForge configuration variables $sys_scm_tarballs_path and $sys_scm_snapshots_path.

Note

For FHS-compliance, use /var/local/gforge/scmtarballs and /var/local/gforge/scmsnapshots.

3.13. Cron Jobs

Cron jobs are in the cronjobs/ directory and the crontab.in file contains a sample crontab. This gives you the basic cronjobs for updating certain statistics and data on the site.

cronjobs/cvs-cron/ contains scripts useful for creating blank cvs trees and managing the /etc/groups, /etc/passwd and /etc/shadow files. See cronjobs/README.root and CVS plugins section for more info.

cronjobs/mail/ contains files useful for the creation of new mailing lists in mailman and creating the /etc/aliases file.

Prepare for cronjobs/cvs-cron/usergroup.php and cronjobs/mail/mailaliases.php.

# adduser anonymous
# cp /etc/aliases /etc/aliases.org
# cp /etc/shadow /etc/shadow.org
# cp /etc/passwd /etc/passwd.org
# cp /etc/group /etc/group.org

Note

There are two other ways to authenticate GForge users: LDAP and NSS with PostgreSQL backend. They are not discussed in this guide.

Caution

The cronjobs/cvs-cron/usergroup.php cron script will meddle with your /etc/passwd, /etc/group, and /etc/shadow files. By default, this cron will save these files with a .new extension. You will have to edit the cron script to remove the .new extension, but you must make sure that it is properly generating your files or your server could be unusable.

Warning

The following command will blow away any existing root crontab:

# crontab cronjobs/crontab.in

Now edit the paths to the cron scripts by setting the value of GFORGE and PHP variables:

# crontab -e

Uncomment entries for cronjobs/cvs-cron/usergroup.php, cronjobs/mail/mailing_lists_create.php, and cronjobs/mail/mailaliases.php but not before understanding the consequences.

3.14. Verifying the Installation

To verify if everything was installed correctly, use the browser and connect to GForge. You should see the GForge homepage. You will need to either disable CVS and SVN plugins in some way, or configure them before making the first test.

Note

If you get an Error: Could Not Connect to Database, check if you have followed all installation instructions for the database. Also, you can experiment with making the settings in pg_hba.conf a bit more trusting - for example, change the last work of the second line from md5 to trust.

3.15. Creating the Admin User

Site admins are anyone who is an admin of group_id=1.

  1. Connect to GForge and register a new account.

  2. Insert a valid email address; this will be used for the account confirmation.

  3. Open your e-mail client, wait for the email from GForge site and follow the link that appears on the message.

  4. Verify in Account Maintenance the user id of the user registered.

    Usually this is 102, but you can verify this by running the following SQL query via the PostgreSQL psql utility:

    $ psql -U gforge -W -h localhost gforge
    gforge=> SELECT user_id FROM users WHERE user_name='YOUR USER NAME';
    
  5. Now set up the newly added user to be a GForge administrator:

    gforge=> INSERT INTO user_group (user_id,group_id,admin_flags)
    gforge-> VALUES (102,1,'A');
    

One of the first string as GForge administrator is to initialize once the reporting tables from Reporting tab.

Note

Once you have set up this user as an administrator, you can use GForge web interface to add more administrators.

3.16. Customizing Front Page

If you want to customize front page, you'll have to provide new index_std.php:

  1. Create /etc/gforge/custom directory.

  2. Set $sys_custom_path configuration variable to /etc/gforge/custom.

  3. Copy /var/www/gforge/www/index_std.php to /etc/gforge/custom/index_std.php and edit it as you like.

3.17. Optional Features

3.17.1. Project webs

Each project can have its own virtual host projectname.projects.gforge.company.com. Location of project files is configured with $groupdir_prefix variable in GForge configuration file. Each project has directory with project's name and contains htdocs subdirectory where Web files are placed. Project directories are created by cronjobs/cvs-cron/usergroup.php.

3.17.1.1. DNS Server Configuration (BIND)

Project virtual hosts require new DNS zone. Making this new zone is similar to making DNS zone for GForge itself.

  1. Declare new zone in gforge.company.com zone:

    projects        IN      NS      ns.projects.gforge.company.com
    

    If DNS server doesn't serve the new projects.gforge.company.com zone, add the following line too:

    ns.projects     IN      A       1.2.3.4
    

    Don't forget to change serial number of gforge.company.com zone!

  2. Create new zone file with following content:

    $TTL    2d
    @       IN      SOA     projects.gforge.company.com. hostmaster.gforge.company.com. (
                                  1         ; Serial
                             172800         ; Refresh
                                900         ; Update retry
                            2419200         ; Expire
                               3600 )       ; Negative Cache TTL
    ;
    @               IN      NS      ns.projects.gforge.company.com.
    @               IN      A       1.2.3.4
    ns              IN      A       1.2.3.4
    
    *               IN      A       1.2.3.4
    
  3. The new zone must be added in main BIND configuration file:

    zone "projects.gforge.company.com" {
            type master;
            file "/dist-specific/path/to/zone-file";
    };
    
  4. Reload BIND and test if all works:

    $ host test.projects.gforge.company.com
    test.projects.gforge.company.com has address 1.2.3.4
    
3.17.1.2. Web Server Configuration (Apache)

Module vhost_alias should be enabled and the following directives should be added to httpd.conf (if /var/www/homedirs/groups is what you have chosen in $groupdir_prefix):

Note

If you want to be FHS-compliant, you may use /var/local/gforge/log and /var/local/gforge/homedirs.

#
#	WARNING - security is degraded by having this
#	on the same machine as the primary GForge
#
NameVirtualHost 1.2.3.4
<VirtualHost 1.2.3.4>
  ServerName        projects.gforge.company.com
  ServerAlias       *.projects.gforge.company.com
  ServerAdmin       webmaster@gforge.company.com
  UseCanonicalName  Off

# You may want to add these files to logrotate, or just use cronolog as shown below
  CustomLog "/var/log/gforge/projects/access.log" combined
  ErrorLog  "/var/log/gforge/projects/error.log"

#  CustomLog "|/usr/bin/cronolog /var/log/gforge/projects/%Y/%m/%d/access.log" combined
#  ErrorLog  "|/usr/bin/cronolog /var/log/gforge/projects/%Y/%m/%d/error.log"

  DocumentRoot        /var/www/homedirs/groups
  VirtualDocumentRoot /var/www/homedirs/groups/%1/htdocs
  <Directory /var/www/homedirs/groups>
    Options Indexes
#
#	WARNING - turning on php will allow any user
#	to upload a php file to your server, and include 
#	the gforge local.inc file and get your password to 
#	connect to the database and have total control.
#
    php_flag engine off
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
  DirectoryIndex index.html index.htm
</VirtualHost>

Note

cronjobs/cvs-cron/usergroup.php copies from cronjobs/cvs-cron/default_page.php to /var/www/homedirs/groups/projectname/htdocs/index.php but the above configuration disables PHP.

3.17.2. Full Text Indexing

If you want to enable full text indexing, follow these steps:

  • Find tsearch2.sql in your distribution of PostgreSQL and run it:

    # su - postgres
    $ psql -f /path/to/tsearch2.sql gforge
    

    Since gforge PostgreSQL user is not superuser, access to some Tsearch2 tables should be additionally granted:

    # su - postgres
    $ psql gforge
    gforge=# GRANT SELECT ON pg_ts_dict TO gforge;
    gforge=# GRANT SELECT ON pg_ts_parser TO gforge;
    gforge=# GRANT SELECT ON pg_ts_cfg TO gforge;
    gforge=# GRANT SELECT ON pg_ts_cfgmap TO gforge;
    
  • Import data definitions:

    $ cd /var/www/gforge/db
    $ psql -U gforge -W -h localhost -f FTI.sql gforge
    $ psql -U gforge -W -h localhost -f FTI-20050315.sql gforge
    $ psql -U gforge -W -h localhost -f FTI-20050401.sql gforge
    $ psql -U gforge -W -h localhost -f FTI-20050530.sql gforge
    
  • Enable Full Text Indexing by setting $sys_use_fti in GForge Configuration File local.inc.

3.17.3. JPGraph

PHP must be compiled with --with-gd, or appropriate package must be installed. Extra fonts for JPGraph are not necessary. Be sure your /etc/gforge/local.inc file contains the proper path to the jpgraph/src/ directory.

Manual installation can be done like this:

# tar -xzf jpgraph-1.19.tar.gz
# mkdir /var/www/jpgraph
# cp -R jpgraph-1.19/src/* /var/www/jpgraph

Note

If you want FHS-compliance, /usr/local/share/jpgraph

When you get your preferred version of JPGraph installed, you will have to edit one setting in jpgraph.php (or jpg-config.php, depending on JPGraph version):

DEFINE("USE_CACHE", false);

Warning

Be careful with JPGraph license: versions > 1.5.2 are not free (as in free speech). You must check license before use.

3.17.4. Perl

If you want to use some of the Perl scripts that access the database, you'll need the DBI and DBD::Pg Perl modules. On Red Hat systems (and variants), you can get them by installing the libdbi and libdbd-pgsql packages. On Debian systems (and variants), the packages are called libdbi-perl and libdbd-pg-perl.

You'll also need to install utils/include.pl to /var/www/gforge/lib/, and put some configuration variables into /etc/gforge/local.pl. In particular, you'll need something like the following in local.pl:

$sys_default_domain = 'gforge.company.com' ;
$sys_dbhost = '192.168.12.34' ;
$sys_dbname = 'gforge' ;
$sys_dbuser = 'gforge' ;
$sys_dbpasswd = 'p455w0rd' ;

3.17.5. Jabber Support

GForge supports the sending of messages to jabber accounts. To accomplish this, you must have a user account setup on the jabber server that gforge can connect to and send messages.

Once you have that user account, server, and password set up, just edit /etc/gforge/local.inc and add the information to the jabber section.

3.17.6. Peer Ratings

Add yourself, and any others you wish, to the “Peer Ratings” project, which should be at /projects/peerrating/ on the website. Make yourself an admininistrator of the project, and then proceed to “rate” other users on the website.

Members of the “Peer Ratings” project, who are administrator of the project, become the first trusted users. This is the only way to prime the pump for the peer ratings system.