This chapter contains the following sections:
There are two methods for installing Galax from source:
This method may be preferable if you are an OCaml user, already have an installation of OCaml and its libraries, and do not want to install a new version of OCaml. Even if you are already an OCaml user, the first method is always recommended.
Warning: Installing packages using GODI is an ON-LINE process, so preferably, you should be connected to the Net by a fast, hard-wire connection.
Follow GODI installation instructions through "bootstrap_stage2"
command, adding the
<godi-prefix-path>/bin
and
<godi-prefix-path>/sbin
directories to your PATH as instructed.
Note: For OCaml users, after GODI bootstrapping phase, the
OCaml executables are located in <godi-prefix-path>/bin
and the
OCaml libraries are located in <godi-prefix-path>/lib/ocaml
.
Select [b]uild & install, then e[x]it.
GODI will give you the PCRE library configure options:
[ 1] GODI_BASEPKG_PCRE = no [ 2] GODI_PCRE_INCDIR = [ 3] GODI_PCRE_LIBDIR =
Select 2 to set the path to the directory containing pcre.h (version 5.0 or higher).
Select 3 to set the path to the directory containing libpcre.a (version 5.0 or higher).
Select e[x]it twice to return to the main menu.
Select [b]uild & install, then e[x]it.
GODI will give you the BDB library configure options:
[ 1] GODI_BDB_INCDIR = [ 2] GODI_BDB_LIBDIR =
Select 1 to set the path to the directory containing db.h. (version 4.4 or higher).
Select 2 to set the path to the directory containing libdb.a (version 4.4 or higher).
Select e[x]it twice to return to the main menu.
Select [b]uild & install, then e[x]it.
This will add all of Galax’s dependencies to your GODI configuration. GODI will give you Galax’s configure options:
[ 1] GODI_GALAX_INCLUDE_JUNGLE = no [ 2] GODI_GALAX_INCLUDE_C_API = no [ 3] GODI_GALAX_INCLUDE_JAVA_$ = no [ 4] GODI_GALAX_INCLUDE_UTF8 = yes [ 5] GODI_GALAX_INCLUDE_ISO88$ = yes [ 6] GODI_GALAX_JAVA_HOME = unset [ 7] GODI_GALAX_JAVA_BIN = unset [ 8] GODI_GALAX_JAVA_INCLUDE = unset [ 9] GODI_GALAX_REGRESSION_SU$ = unset
You can change the default Galax configuration as follows:
Select 1 to include Jungle, Galax’s secondary storage manager.
Select 2 to include Galax’s C API.
Select 3 to include Galax’s Java API (requires the C API).
Select 4(5) to exclude UTF8(ISO88) character set (reduces sizes of executables).
Select 6(7,8) to set the Java home(bin,include) directories.
Select 9 to set directory where XQuery 1.0 test suite is installed.
Select e[xi]t.
Select [s]tart/continue, which will report all dependencies.
Then select [s]tart/continue, which will report actual dependencies based on your current GODI installation.
Then select [o]k.
Add <godi-prefix-path>/bin to your PATH.
When installation has completed, Galax will be installed in <godi-prefix-path>/ with the following subdirectories:
Directory | Sub-directory | Content |
bin/ | Galax’s command-line executables | |
lib/ | ||
pervasive.xq | Signatures of XQuery 1.0 Function and Operators | |
c/ | C libraries and API header files | |
java/ | Java libraries and API interfaces | |
ocaml/pkg-lib/galax/ | OCaml libraries and interfaces | |
share/galax/ | ||
examples/ | Examples of using C, Java, and OCaml APIs | |
regress/ | Test harness and configuration for the W3C XQuery Test Suite | |
usecases/ | XQuery 1.0 usecases |
If you already have an OCaml installation, you can install the Galax source by hand. To do so, you need the following versions of the OCaml compiler and libraries, and C libraries:
Library | Version | GODI-Package |
OCaml compiler3 | 3.10 | godi-ocaml |
OCaml Libraries | ||
findlib4 | 1.1.2pl1 | godi-findlib |
Pcre-ocaml5 | 5.12.2 | godi-pcre |
Ocamlnet6 | 2.2.8.1 | godi-ocamlnet |
Caml IDL7 | 1.05 | godi-camlidl |
PXP8 | 1.2.0test1 | godi-pxp |
Camomile9 | 0.7.1 | godi-camomile |
C Libraries | ||
Berkeley DB (libdb) | 4.3 | Only for Jungle |
PCRE | > 4.5 |
tar xvf galax-1.0.tar
From the galax/
you just created, run:
./configure -galax-home $GALAXHOME
Where $GALAXHOME
is the target installation directory.
If you want the C API, add -with-c.
If you want the Java API, add -with-java -java-home <Top-level Java directory>.
The configure script will try to find your OCaml installation and other necessary libraries by itself. Review the default configuration before proceeding. If you need to change the default configuration, run ./configure -help for all options.
In galax/
run:
make world
Go get more coffee...
In galax/
run:
make install
Add $GALAXHOME/bin
to your PATH environment variable.
When installation has completed, Galax will be installed in
$GALAXHOME
with these subdirectories:
Directory | Content |
bin/ | Command-line executables |
examples/ | Examples of using C, Java, and OCaml APIs |
regress/ | Test harness and configuration for the W3C XQuery Test Suite |
usecases/ | XQuery 1.0 usecases |
The Galax distribution includes a test harness for the W3C XQuery tests suite. It can be run by following the steps listed below.
http://www.w3.org/XML/Query/test-suite/
The Test Suite comes as a zip
archive, which can be unzipped in
a directory of your choice (We use $XQTS
in the following
instructions).
-regression $XQTS
make
from the $GALAXHOME/regress
directory. This will produce a file
called:
testresults-W3C.xml
which contains the result of running the test suite (following the format required for test results by the XQTS).
$XQTS/ReportingResultsThe stylesheet can be run by:
$XQTS/ReportingResults/Results.xmlas follows:
<results> <result>$GALAXHOME/regress/testresults-W3C.xml</result> </results>
$XQTS/ReportingResults/Results.xmland running one of the two following commands (you will need a working installation of ant, and of an XSLT processor):
ant -f Build.xml create ant -f Build.xml createsimplewhich should respectively produce the following HTML files:
XQTSReportSimple.html XQTSReport.html
The Galax Web site and on-line demo are bundled with the source distribution (only).
The Galax Web site has only been tested with Apache Web servers. We recommend you use Apache as some of the CGI scripts might be sensitive to the server you are using. Apache is commonly installed with most Linux distributions, or can be downloaded from: http://www.apache.org/.
<Directory "/var/www/html/galax"> Options All AllowOverride None AddHandler cgi-script .cgi Order allow,deny Allow from all </Directory>This permits scripts with suffix .cgi in /var/www/html/galax to be executed. The Galax demo is available at http://localhost/galax.
Your sysadmin may already have set up an Apache server for general use, and allows CGI programs by any user. You can verify by finding directives similar to the following in httpd.conf (wherever it might be located on your system),
AddHandler cgi-script .cgi <DirectoryMatch "/galax/cgi-bin"> AllowOverride AuthConfig Options ExecCGI SetHandler cgi-script </DirectoryMatch>
In that case, simply follow the comments in website/Makefile.config to choose installation destinations for your CGI programs and the HTML documents should suffice. The URL for accessing the installed site will depend on how your webserver is set up. Consult your sysadmin or webadmin for further help.