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.