1 Installation of GForge is a non-trivial undertaking, since it integrates
2 with so many different components across your system. A skilled sysadmin
3 is required to pull it off, or at the least a great deal of patience.
5 The result of a complete installation means automatic creation of CVS
6 and Subversion repositories, and having access to them controlled by
7 GForge and stats gathered from them. CVSWEB and ViewCVS (used for
8 Subversion browsing) are two additional integration points.
10 BASICS OF INSTALLATION
11 ----------------------
19 Optional (but highly recommended)
20 PHP Accelerator ( http://www.php-accelerator.co.uk/ )
22 Optional Gantt Charting and Graphing Support:
23 JPGraph: ( http://www.aditus.nu/jpgraph/ )
25 (NOTE: An older version of JPGraph may be
26 required - it can be downloaded here:
27 http://gforge.org/frs/download.php/142/jpgraph-1.9.1.tar.gz)
29 IPC Run for Perl may be required on some platforms and is hard to find:
30 https://gforge.org/frs/download.php/143/IPC-Run-0.78.tar.gz
32 ViewCVS (now called ViewVC)
33 http://gforge.org/frs/download.php/152/viewvc-1.0-dev-gforge.tar.bz2
39 GForge has a lot of different pieces touching a lot of different components
40 in the system. Cronjobs are required to maintain the system, touching lots
41 of files on a daily and hourly basis, including /etc/* system files.
43 The plugins that now manage the CVS and SVN functionality have made
44 installation slightly harder because even more files have to be moved into
45 place during installation.
47 The manual installation of gforge is documented below. Be sure to follow
48 each step carefully, check the forums for frequently asked questions,
49 and ask your Apache, mailman, and postgresql installation questions in the
50 corresponding mailing lists rather than on the gforge forums where little
56 CVS is now managed via the scmcvs plugin which is included in the
57 plugins/ directory in the tarball downloaded from gforge.org. Most
58 of the files in scmcvs are intended for auto-installation on debian
59 systems and DO NOT APPLY to the majority of users. The scmcvs plugin
60 is activated by default in the gforge.sql database.
62 Cronjobs for CVS are included in cronjobs/crontab.in, but are commented
63 out by default for your security. cronjobs/cvs-cron/* contains the files
64 that are executed hourly to build permissions and create blank cvs trees.
65 Make sure these files are executed as root, and have proper execution bits
66 set. Each of these cronjobs has configuration parameters which you may
67 have to edit manually the paths in those files for your specific system.
69 CVSWeb works easily on most platforms, if you follow the instructions
70 below, but the IPCRUN lib may be missing and hard to find. Download it
71 here: https://gforge.org/frs/download.php/143/IPC-Run-0.78.tar.gz
77 If you want to use GForge's svn-over-DAV support, apache2 and
78 mod_auth_gforge are required.
80 SVN is also managed via plugin - the scmsvn plugin is included and
81 activated by default in gforge.
83 To install mod_auth_gforge, download it from
84 http://gforge.org/frs/?group_id=128
86 The sample etc/gforge-httpd.conf.example file in this tarball contains
87 a COMPLETE AND WORKING vhost for subversion-over-dav. The gforge-install.sh
88 script will copy this to /etc/gforge/httpd.conf You may have to
89 alter the passwords and any other config options, but the sample config
90 shown has been used in dozens or even hundreds of installs and DOES WORK.
92 Cronjobs - the /cronjobs/dav-svn/create_svn.php creates blank repositories
93 for subversion. You will likely have to edit this file to get the proper
96 ViewCVS (ViewVC now) - this is used to browse the SVN repository.
97 A modified version of ViewVC can be downloaded from GForge.org here:
98 http://gforge.org/frs/download.php/152/viewvc-1.0-dev-gforge.tar.bz2
99 This should be built using the instructions ( ./viewcvs-install )
100 then the viewcvs.conf should be modified to recognize the svnroots
102 root_parents = /svnroot : svn
104 The docroot var in viewcvs.conf should also be set to the location that the
105 files will be accessible from the web:
107 docroot = /plugins/scmsvn/viewcvs/
109 The viewcvs.cgi should then be placed in the same location as your
110 cvsweb cgi (usually placed into /etc/gforge/). The /etc/gforge/local.inc
111 has a path to this cgi, set in the sys_path_to_scmweb='' variable. This
112 variable is shared with the cvs plugin as well, so that's why both cvsweb
113 and viewcvs.cgi must be in the same location. gforge-install.sh takes care
114 of this step if you have viewvc installed in /opt/viewvc
116 Finally, the /usr/share/gforge/www/plugins/scmsvn/viewcvs/ directory should
117 be symlinked to the same location that you installed your viewvc/templates/docroot
118 gforge-install.sh takes care of this step if you have viewvc installed in /opt/viewvc
120 cd /usr/share/gforge/www/plugins/scmsvn/
121 ln -s /opt/viewvc/templates/docroot viewcvs
128 # mod_vhost_alias is used by the
129 # <projectname>.projects.gforge.company.com vhosts
130 # which are commented out by default in the sample apache conf
132 LoadModule vhost_alias_module modules/mod_vhost_alias.so
135 # these modules are all needed for mod_auth_gforge
137 LoadModule dav_module modules/mod_dav.so
138 LoadModule dav_fs_module modules/mod_dav_fs.so
139 LoadModule dav_svn_module modules/mod_dav_svn.so
140 LoadModule authz_svn_module modules/mod_authz_svn.so
141 LoadModule auth_gforge_module modules/mod_auth_gforge.so
146 The cvstracker plugin allows for some integration between CVS
147 commits and the bug tracker and task manager. So, for example,
148 when you commit, you can reference bug and task IDs in your
149 commit message and have the commit linked to the corresponding
152 This works by having a script in the cvs server issue a POST
153 to the main website ( /plugins/cvstracker/newcommit.php )
155 See the plugins/cvstracker/README file for details. This
156 plugin is enabled by default in the gforge.sql database file.
157 As with the other plugins, you may manually place the config
158 files in /etc/gforge/plugins/cvstracker/ and uncomment the
159 cronjob in crontab.in.
161 You will also have to copy the newcommit.php file to your
162 gforge www/plugins/cvstracker/ dir
167 The cronjobs require the PHP CGI to be installed and the php.ini
168 file to be properly configured with your include_path OR edit the
169 crontab.in file to set your include path.
174 Mailman is needed to create and use mailing lists with gforge.
175 Mailman is frequently installed in /var/mailman/ and the sample
176 vhost shown below will work with this setup without any changes.
178 Cronjobs for mailman are located in cronjobs/mail/*
180 cronjobs/mail/mailing_lists_create.php is used obviously to
181 create new mailing lists. You may have to edit /etc/gforge/local.inc
182 to change the location of the mailman bin/ directory.
184 For all problems with mailman installation and use, contact
185 the mailman mailing lists for help.
194 BLANK DATABASE - FRESH INSTALL
195 ------------------------------
197 First, make sure you create a 'gforge' user at the unix command prompt:
201 Create a MySQL database for gforge, replace adminuser with the name of a user with database create privileges:
203 # mysqladmin -u adminuser -p create gforge
205 Create the MySQL user for GForge, replace password with the desired password for the gforge account.
207 # mysql -u adminuser -p -D gforge -e "grant all privileges on gforge.* to gforge@localhost identified by 'password'"
209 Logon as the GForge user
213 $ mysql -u gforge -p gforge < db/gforge-struct-mysql.sql
215 $ mysql -u gforge -p gforge < db/gforge-data-mysql.sql
217 Be sure to watch for any errors during import and check the
220 UPGRADING DATABASE - EXISTING INSTALL
221 -------------------------------------
223 You will upgrade your database from a prior version by applying
224 each database schema change, in order, and applying it only once.
225 Only apply the schema changes in the db/ folder that are dated
226 AFTER your currently installed version!!
228 This process will apply your upgrades. BE SURE TO WATCH FOR ERRORS!
230 $ mysql -u gforge -p gforge < db/mysql-XXXXXXXXXX.sql >> import.log
232 There may also be migration scripts that have to be run. In the
233 db/ folder, look for XXXXXXXXXXX.php scripts and run them AFTER
234 YOU HAVE SET THE .htaccess file for your include_path.
237 WEB SETUP - MANUAL INSTALLATION
238 -------------------------------
240 The following are sample commands commonly issued for a manual installation:
242 tar -xjf gforge-4.5.6.tar.bz2
246 # BEFORE RUNNING THIS, determine your apacheuser/group
247 # and pass it as an argument as shown below.
249 # Argument 1: the main hostname you want to use.
250 # Argument 2: the IP address that you are listening on
252 ./gforge-restricted.sh gforge.company.com 100.100.100.100
255 # jpgraph install - use the 1.9.1 version from gforge.org
259 $ tar -xzf jpgraph-1.9.1.tar.gz
261 $ mv jpgraph-1.9.1/src/* ~/jpgraph
263 #you will have to edit jpgraph.php to set USE_CACHE=false
264 $ vim ~/jpgraph/jpgraph.php
271 Add the following lines to the .htaccess file in your ~/gforge/lib/www directory.
272 The crontab.in file also can be modified to include this path as well.
274 php_value register_globals Off
275 php_value magic_quotes_gpc Off
276 php_value file_uploads 1
277 php_value include_path = ".:~/gforge/lib/:~/gforge/lib/www/include/:~/gforge/etc/"
280 FRS - File Release System
281 -------------------------
283 FRS has been radically simplified, simply create a directory.
285 This directory will be referenced in the GForge Config File as $sys_upload_dir
291 Edit the ~/gforge/etc/local.inc and set any specific variables
292 like sys_default_domain and any paths to files that are not right
298 Site admins are anyone who is an admin of group_id=1
300 To give the first user "Site Admin" privileges, register a new user,
301 and confirm it via the email link. Then enter the following command
303 $ mkadmin.sh "new user name" -u gforge -p
310 This alias was already added by the gforge-install script:
318 Add yourself, and any others you wish, to the "Peer Ratings" project,
319 which should be at /projects/peerrating/ on the website. Make yourself
320 an "admin" of the project, and then proceed to "rate" other users on
323 Members of the "Peer Ratings" project, who are "admins" of the project
324 become the first trusted users. This is the only way to prime the pump
325 for the peer ratings system.
331 Cron jobs are in the cronjobs/ directory and the README file contains
332 a sample crontab. This gives you the basic cronjobs for updating
333 certain statistics and data on the site.
335 /cronjobs/cvs-cron/ contains scripts useful for creating blank cvs trees.
337 See /cronjobs/README.root for more info.
339 /cronjobs/mail/ contains files useful for the creation of new mailing
340 lists in mailman and creating the /etc/aliases file.
342 *********************************************************************
343 WARNING!!! the following command will blow away any existing crontab.
344 *********************************************************************
346 $ crontab cronjobs/crontab.in
348 Now edit the paths to the cron scripts:
352 IMPORTANT!!!! - the cvs-cron/usergroup.php cron script will meddle
353 with your /etc/passwd, /etc/group, and /etc/shadow files. By default,
354 this cron will save these files with a .new extension. You will have
355 to edit the cron script to remove the .new extension, but you must
356 make sure that it is properly generating your files or your server
359 Once you have manually run the usergroup.php file, look at the
360 /etc/*.new files and verify that they contain sensisble information.
361 When you are confident they are right, you can edit usergroup.php
362 to remove the .new extension and uncomment the cronjobs.
368 The installation was shown above. Be sure to use the 1.9.1 version
369 from gforge.org and set USE_CACHE=false as shown here.
371 DEFINE("USE_CACHE",false);
377 Q: I get a blank page when I visit http://gforge.company.com/
379 A: Most often you are missing the php-mysqli library that lets PHP
380 talk to the MySQL database. Find a php-pgsql RPM or recompile
381 php to have pgql support.
383 If you're sure you have php-pgsql support, you can edit
384 common/include/database-mysql.php and remove the @ symbol from
389 So that it looks like:
393 This will let debug output dump to the screen and may let you find
394 the problem. Search the forums for more solutions.
397 Q: "Error Occurred In the Logger" or other database permission problems
399 A: As stated in the installation instructions, the database must be created,
400 owned, and accessed by the gforge user. This user is the only one who will
401 have total acess to all the tables. Any other user would have to be specifically
402 granted permissions with the GRANT commands in postgres.
405 Q: Reporting or time tracking doesn't work
407 A: Go to the reporting tab and scroll down so you can choose
408 "Initialize/Rebuild Reporting Tables"
410 You may also be missing GD support or be missing JPGraph or have it installed
411 improperly. The jpgraph/src/ directory should be specified accurately in your
412 local.inc file, and you should include a / at the end of the path specified.
413 In addition, you should modify jpgraph.php to set USE_CACHE=false
416 Q: How do I upgrade my database?
418 A: As stated above, you must apply the changes that are listed in date order
419 in the db/ directory to your database. Only the changes that are not already
420 in your old db/ directory should be applied, and they should be applied and
424 Q: I'm getting an error about BaseLanguage.class.php not being found.
426 A: Make sure your localization path is correctly specified in the local.inc
427 file and that it is readable AND writable by the apache user.
430 Q: When I click on "/projects/" or "/users/" links, I get the source code
431 instead of the page I expected.
433 A: As shown in the example httpd.conf files above, you may have to switch
434 to using the <Files> or <Location> directives depending on your server
438 Q: How do I backup GForge?
440 A: The only proper way to backup the gforge database is with pg_dump.
441 Any attempt to backup the filesystem while pgsql is running will result
442 in a useless and corrupt backup. You can backup CVS trees using tar as
443 long as they are not actively and heavily used during the backup.
444 Mailman and the FRS uploads dir can also be backed up with tar.
447 Q: Large uploads into FRS or the doc manager fail.
449 A: Apache and the php.ini file need to have upload limits and possibly
450 memory limits increased.