source: main/trunk/greenstone3/README-SVN.txt

Last change on this file was 36334, checked in by kjdon, 21 months ago

added a note about adding java_home/bin to your path, if you have more than one java installed. otherwise some places might find the wrong version

File size: 4.9 KB
Line 
1Greenstone 3 (GSDL3)
2Copyright (C) 2003 New Zealand Digital Libraries, University Of Waikato
3Greenstone3 comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
4This is free software, and you are welcome to redistribute it
5
6These are some extra notes for installing Greenstone from SVN. Please also
7read the README.txt file for general information as almost all of that applies
8here too.
9
10You will need Java and Ant to run Greenstone 3.
11
12Your Java version should be 1.6 or higher. We recommend Sun Java. You need the
13SDK (development environment). Set the environment variable JAVA_HOME to be
14the root of your Java installation.
15If you have several javas installed, please also add JAVA_HOME/bin to the start of your PATH environment variable.
16
17Ant (Apache's Java based build tool) can be downloaded from
18http://ant.apache.org/bindownload.cgi. Set the environment variable
19ANT_HOME to be the root of your Ant installation, and make sure the Ant
20executables are on your PATH.
21Greenstone 3 requires Ant 1.8.1 or higher.
22
23Installing Greenstone from an SVN checkout:
24---------------------------------------------------------------------
25
26Make sure an SVN executable is on your PATH.
27
28Checkout the code:
29
30 svn co https://svn.greenstone.org/greenstone3/trunk greenstone3
31
32
33Local Settings
34--------------
35
36You will then need to make sure 'ant' (version 1.8 or greater) and 'javac'
37(along with an appropriate JAVA_HOME environment variable) can be
38found from your command line.
39
40To help with getting such local command-line settings right, we have
41started to build up a set of 'local' folder examples available
42on our svn server. You can browse these at:
43
44 http://trac.greenstone.org/browser/local/
45
46For example, in the top-level folder of your Greenstone3 installation,
47for a build on a 64-bit linux computer you might like to check out:
48
49 svn co https://svn.greenstone.org/local/greenstone3/linux-64bit local
50
51You should then check files like 'local/gs3-setup.bash' and
52'local/gs3-devel.bash' and edit the values there, such as JAVA_HOME,
53to reflect where such programs exist on your local filesystem.
54to reflect where
55
56Prior to compiling, 'cd' into this folder and source the appropriate setup
57file (the developer 'gs3-devel' file if it exists, as in the case of cross
58compiling for Anroid), or else the 'gs3-setup' one (for instance gs-setup.sh,
59gs-setup.bash, or setup.bash)
60
61For example:
62
63 cd local
64 source ./gs3-setup.bash
65 cd ..
66
67Note: running 'source gs3-setup.sh' in the top-level greenstone folder will also source the local version.
68
69Build and install:
70-----------------
71
72In the greenstone3 directory, check and/or edit the build.properties file. In
73 particular, set the Tomcat port number. See 'Configuring your installation' in
74 README.txt for more information.
75
76Note, initial checkouts from SVN have a build.properties.in file. Running
77'ant' (no arguments) will result in the build.properties file being generated
78from the .in file (a straight copy).
79
80Then, run 'ant prepare install'. The two targets can be run separately if you
81like.
82
83The 'prepare' target will download additional code (using SVN and http), so
84you need to be online to run it. The 'install' target can be run offline.
85
86The prepare/install targets will ask you if you accept the properties before
87starting.
88To suppress this prompt, use the -Dproperties.accepted=yes flag. E.g.
89ant -Dproperties.accepted=yes prepare install
90
91To log the output, run
92ant -Dproperties.accepted=yes -logfile build.log prepare install
93
94On Windows, Visual Studio is used for compiling. The VCVARS32.bat script needs
95to be run in the command prompt before compiling with "ant install".
96
97In the greenstone3 directory, you can run 'ant' which will give you a help
98message.
99Running 'ant -projecthelp' gives a list of the targets that you can run - these
100do various things like compile the source code, start up the server etc.
101
102Extra Configuration notes:
103--------------------------------------------------------------
104
105Greenstone 3 uses some parts of Greenstone 2 for collection building,
106including external packages and the Librarian Interface. These will be
107installed during the Greenstone 3 installation process. If you do not want
108collection building capability, please set the disable.collection.building
109property to true in build.properties.
110
111
112Common install/update targets:
113---------------------------------------------------------------------
1141. Install for the first time from SVN:
115svn co https://svn.greenstone.org/greenstone3/trunk greenstone3
116cd greenstone3
117ant prepare install
118
1192. Install for the first time from SVN, mostly offline:
120[online]
121svn co https://svn.greenstone.org/greenstone3/trunk greenstone3
122cd greenstone3
123ant prepare
124[offline]
125ant install
126
1273. Updating your Greenstone installation from SVN (and reconfigure/recompile):
128cd greenstone3
129ant update
130
1314. Updating your Greenstone installation from SVN, mostly offline:
132cd greenstone3
133[online]
134ant svnupdate
135[offline]
136ant -Dnosvn.mode=yes update
137
Note: See TracBrowser for help on using the repository browser.