Updated 2 Dec 2014
You need an Subversion client (1.5 or higher) to check out the source code.
You will also need Java and Ant to run FLAX.
Your Java version should be 1.4 or higher. We recommend Sun Java. You need the
SDK (development environment). Set the environment variable JAVA_HOME to be
the root of your Java installation.
Ant (Apache's Java based build tool) can be downloaded from
http://ant.apache.org/bindownload.cgi. Set the environment variable
ANT_HOME to be the root of your Ant installation, and make sure the Ant
executables are on your PATH.
FLAX requires Ant 1.7.1 or higher.
Installing FLAX from an SVN checkout:
Make sure an SVN executable is on your PATH.
Checkout the code:
svn co http://svn.greenstone.org/main/trunk/greenstone3
(Note, initial checkouts from SVN have a build.properties.in file. Running
'ant' will result in the build.properties file being generated from the .in
file - a straight copy.)
In the greenstone3 directory, edit the build.properties file (if file not found, edit build.properties.in instead). In particular:
1) set the Tomcat server and port number (you can leave the default settings if you like).
2) find the line "with.jni=true". Comment out the line by adding a # sign at the beginning.
3) locate the line "with.gli.and.gems". Comment it out as above
4) comment out "use.gnomelib.ext=true" and remove "#" from the line "#checkout.gnomelib.ext=true"
5) remove the "#" sign from the line #checkout.imagemagick.ext=true
6) scroll further down near the end of the file, remove the "#" sign from the line #install.flax=true.
7) FLAX uses perl to build collections. If your perl is installed in a location different than /usr/bin, uncomment and/or edit the line #perl.path=/usr/bin.
8) Unless you've installed your own FLAX server, external servers will be used for things like collocation extraction, gloss generation etc. If your machine is behind firewall, look for the lines (proxy.host, proxy.port, proxy.user, and proxy.password) and fill in the proxy information.
9) For Mac OSX users, also do the following:
- (a) set JAVA_HOME
- export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home (for versions before 10.5.8)
- export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home (for version 10.5.8)
10) For Windows users, Visual Studio is used for compiling. The VCVARS32.bat script needs
to be run in the command prompt. Equally important, you need a Perl installation and put it on your system path.
11) Then, run: ant prepare
The 'prepare' target will download additional code (using SVN and http), so you need to be online to run it.
It will also ask you if you accept the properties set in the build.properties file before starting.
12) Then, run: ant install
The 'install' target can be run offline
The installation process will take quite a while to finish
If everything goes well, in the end you'll see something like:
Total time: xx minutes yy seconds
which indicates the flax server has been installed properly.
13) To start the server, run:
Additional information on the installation process:
To log the output, run
ant -Dproperties.accepted=yes -logfile build.log prepare install
In the greenstone3 directory, you can run 'ant' which will give you a help
Running 'ant -projecthelp' gives a list of the targets that you can run - these
do various things like compile the source code, start up the server etc.