Installing GForge 3.3
Written by Sam Moffatt   
Sunday, 10 June 2007 01:10


Download the gforge source
Travel to /usr/local/apache/htdocs/ (create it if necessary)
Extract the gforge source (should be root at this point)
$ sudo bash (alternatively: su)
# cd /usr/local/apache/htdocs/
# tar -jxvf gforge-3.3.tar.bz2


Open up the apache configuration file (/usr/local/apache/conf/httpd.conf) and make the following changes:
DocumentRoot "/usr/local/apache/htdocs/gforge-3.3/www"
ScriptAlias /cgi-bin/ "/usr/local/apache/htdocs/gforge-3.3/cgi-bin/"

Add the following directory directives:

Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
ErrorDocument 404 /404.php

AllowOverride All
Options None
Order allow,deny
Allow from all

Note: More configuration options will be required after PHP installation


$ ./configure -prefix=/usr/local/postgres --without-readline
(Note: readline-devel was instaled, and configure still failed. readline should only be a terminal interface procedure and shouldn't affect the remainder of postgres)
$ make
# make install
# adduser postgres
# mkdir /usr/local/postgres/data
# chown postgres /usr/local/postgres/data
# su - postgres
$ /usr/local/postgres/bin/initdb -D /usr/local/postgres/data/
$ /usr/local/postgres/bin/postmaster -D /usr/local/postgres/data/ > logfile 2>&1 &
$ /usr/local/postgres/bin/createuser gforge -W
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y
Password: (gforge)
$ /usr/local/postgres/bin/createdb -U gforge gforge
$ exit
# cp contrib/start-scripts/linux /etc/init.d/postgresql
Edit the postgresql file and change the following:

Under the 'start' section, on the line beneath 'Starting PostgreSQL', change it to:
su - $PGUSER -c "$DAEMON start -o -i -D '$PGDATA' -s -l $PGLOG"
(adding -i)

# chkconfig --add postgresql
# chmod +x /etc/init.d/postgresql
# /etc/init.d/postgresql start

Installing the database into Postgres

# cd /usr/local/apache/htdocs/gforge-3.3/db
# /usr/local/postgres/bin/psql -a -U gforge gforge < gforge3.sql > /tmp/gfogre.sql.log 2>&1

Postgres installing and configuration should be completed!


./configure --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-zlib --with-gd --with-dbase --with-pgsql=/usr/local/postgres

Ensure that in httpd.conf, that the DirectoryIndex directive has "index.php" added to it, as well as the following:

ForceType application/x-httpd-php

ForceType application/x-httpd-php

php_value include_path ".:/usr/local/apache/htdocs/gforge-3.3/:/usr/local/apache/htdocs/gforge-3.3/www/include/:/usr/local/lib/php"
php_admin_value default_charset "UTF-8"
php_flag register_globals on
php_flag file_uploads on

PHP (again)

Uncomment the include_path line and change it to:
include_path = ".:/usr/local/apache/htdocs/gforge-3.3/:/usr/local/apache/htdocs/gforge-3.3/www/include/:/usr/local/lib/php"
Also enable file_uploads as well (file_uploads = On)

Install CVS as per the CVS installation (Note: not available at the moment) document.


Install the File::Temp (included with Perl 5.8.0), URI and IPC::Run, all available from CPAN. Webmin can be used to install these modules.


mkdir /usr/local/apache/htdocs/gforge-uploads
chmod -R nobody.nobody /usr/local/apache/htdocs/gforge-uploads
mkdir /etc/gforge
cp /usr/local/apache/htdocs/gforge-3.3/ /etc/gforge/
cp /usr/local/apache/htdocs/gforge-3.3/cvsweb.conf /etc/gforge/

Edit /etc/gforge/ and set the database configuration as:
$sys_urlroot = "/usr/local/apache/htdocs/gforge-3.3/www/"
$sys_name = "Insert Forge Name Here"

And change any occurance of "" to point to the hostname of the computer (eg

In /etc/gforge/cvsweb.conf change the CVSROOT to:
'GForge-CVS' => '/usr/local/cvsroot',

All going well, GForge should be set up and running.

Last Updated on Saturday, 31 May 2008 04:49