Changeset 10884 for trunk/gsdl3
- Timestamp:
- 2005-11-11T13:30:45+13:00 (18 years ago)
- Location:
- trunk/gsdl3
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/README.txt
r10870 r10884 14 14 do various things like compile the source code, start up the server etc. 15 15 16 On GNU/Linux mysqlseems to have trouble with spaces in paths, so it's best to install Greenstone into a path with no spaces.17 18 Installing Greenstone from a binary distribution:16 On GNU/Linux MySQL seems to have trouble with spaces in paths, so it's best to install Greenstone into a path with no spaces. 17 18 Installing Greenstone 19 19 --------------------------------------------------------- 20 20 21 Download the appropriate zip/tar file (greenstone-3.xx-linux.tar.gz/greenstone-3.xx-win32.zip/greenstone-3.xx-macOSX.tar.gz), and unzip/untar it. In the greenstone3 directory, edit the build.properties file (see 'Configuring your installation' below), and run 'ant install'. 22 23 Installing Greenstone from a CVS checkout (GNU/Linux, Windows, MacOS X): 24 --------------------------------------------------------------------- 25 26 Make sure the CVS executable is on your PATH. 27 28 Checkout the code: 29 30 cvs -d :pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src co greenstone3 31 32 Build and install: 33 34 In the greenstone3 directory, edit the build.properties file (see 'Configuring your installation' below), and run 'ant prepare install'. The two targets can be run separately if you like. 35 36 The 'prepare' target will download additional code (using CVS and http), so you need to be online to run it. The 'install' target can be run offline. 21 Download the appropriate zip/tar file (greenstone-3.xx-linux.tar.gz/greenstone-3.xx-win32.zip/greenstone-3.xx-macOSX.tar.gz) from sourceforge.net/projects/greenstone3, and unzip/untar it. In the greenstone3 directory, edit the build.properties file (see 'Configuring your installation' below), and run 'ant install'. 22 23 See 'Using External Tomcat' and 'Using External MySQL' sections below if you want to use an existing version. 37 24 38 25 Configuring your installation: 39 ------------------------------------ 26 -------------------------------------------------------- 40 27 41 28 The file build.properties contains various parameters that can be set by the user. Please check these settings before running the install. 42 29 43 Greenstone 3 uses the Tomcat servlet container. If you already have Tomcat running, you can set the 'tomcat.installed.path' property (in build.properties) to the base directory of your Tomcat installation, and Greenstone will not download/install its own Tomcat. Please read the section "Using External Tomcat" for details about how to configure Tomcat for Greenstone. 44 45 Greenstone 3 uses mysql for the collection database (with Greenstone 3 native building). If you already have mysql installed, set the 'mysql.installed.path' property (in build.properties) to the base directory of your mysql installation, and Greenstone will not download/install mysql. Please read the section "Using external mysql server" for details about how to configure mysql for Greenstone. 46 If you are using mysql that comes with greenstone 3, and you are installing greenstone 3 on an NFS drive, mysql may not work properly (it has problems removing locks on its data files). After installation, copy the data directory from greenstone3/packages/mysql to a local drive, then set the path to this directory in the mysql.datadir property in build.properties. 47 If the version of mysql that greenstone is using is not suitable for your setup (see notes on versions below), please install an appropriate version and set the mysql.installed.path property. 48 49 Greenstone 3 uses some parts of Greenstone 2 for collection building using the Librarian Interface. These will be installed during the Greenstone 3 installation process. If you have Greenstone 2 already installed and want to use that version instead, please set the gsdl2.installed.path property (in build.properties) to be the root of your Greenstone 2 installation. Greenstone 3 will then use this installation rather than its own bits. (Note, be careful about compatibility between versions.) If you are using Greenstone 3 from CVS, and don't want to download the Greenstone 2 stuff, set the gsdl2.installed.path to any non-empty string. 30 Greenstone 3 comes with MySQL and Tomcat bundled in. 31 32 If you already have Tomcat running, you can set the 'tomcat.installed.path' property (in build.properties) to the base directory of your Tomcat installation, and Greenstone will not use its own Tomcat. (You can delete the packages/tomcat directory if you like.) Please read the section "Using External Tomcat" for details about how to configure Tomcat for Greenstone. 33 34 Greenstone 3 uses MySQL for the collection database (with Greenstone 3 native building). If you already have MySQL installed, set the 'mysql.installed.path' property (in build.properties) to the base directory of your MySQL installation, and Greenstone will not use its local MySQL. (You can delete the packages/mysql directory if you like.) Please read the section "Using external MySQL server" for details about how to configure MySQL for Greenstone. 35 36 If you are using MySQL that comes with greenstone 3, and you are installing greenstone 3 on an NFS drive, MySQL may not work properly (it has problems removing locks on its data files). After installation, copy the data directory from greenstone3/packages/mysql to a local drive, then set the path to this directory in the mysql.datadir property in build.properties. 37 If the version of MySQL that greenstone is using is not suitable for your setup (see notes on versions below), please install an appropriate version and set the mysql.installed.path property. 38 50 39 Mac OS X: You need to have GDBM installed (http://www.gnu.org/software/gdbm/gdbm.html). Please set the gdbm.installed.path property (in build.properties) to the root of your gdbm installation if it is not installed in a default place. If you run GLI or GS2 collection building from the command line, you will need to set the DYLD_LIBRARY_PATH environment variable to include <path-to-gdbm>/lib. 51 40 52 The prepare/install target will ask you if you accept the properties before starting.41 The install target will ask you if you accept the properties before starting. 53 42 To suppress this prompt, use the -Dproperties.accepted=yes flag. E.g. 54 ant -Dproperties.accepted=yes prepare install (from CVS), or 55 ant -Dproperties.accepted=yes install (from binary dist). 43 ant -Dproperties.accepted=yes install 56 44 57 45 To log the output in build.log, run 58 ant -Dproperties.accepted=yes -logfile build.log prepare install (from CVS), or 59 ant -Dproperties.accepted=yes -logfile build.log install (from binary dist). 60 61 The compile target, under GNU/Linux and Mac OS X, does Java and C/C++ compilation. For Windows, since Visual Studio is not a standard component, only Java compilation is carried out. Pre-compiled binaries are provided for the C/C++ components (src/packages and Greenstone 2 style building). If you have Visual Studio installed (version 6), you can run the compile-windows-c++ targets to compile the code locally. (Don't forget to setup the Visual Studio environment first, by running, e.g. C:/Program Files/Microsoft Visual Studio/VC98/Bin/VCVARS32.BAT or equivalent.) 62 63 Common install/update targets (for use with Greenstone out of CVS). 64 ------------------------------- 65 1. Install for the first time from CVS: 66 cvs co greenstone3 67 cd greenstone3 68 ant prepare install 69 70 2. Install for the first time from CVS, mostly offline: 71 [online] 72 cvs co greenstone3 73 cd greenstone3 74 ant prepare 75 [offline] 76 ant install 77 78 3. Install for the first time, with CVS done outside of Ant (if you have problems running CVS commands from Ant): 79 cvs co -P greenstone3 80 cd greenstone3/src/packages 81 cvs co mgpp 82 cd ../.. 83 [if you want greenstone 2 building: 84 cvs co -P gli 85 cvs co -P gs2build 86 ] 87 [if you are on windows 88 cvs co winbin 89 ] 90 ant -Dnocvs.mode=yes prepare install (prepare needs to be online, install can be done offline) 91 92 4. Updating your Greenstone installation from CVS (and reconfigure/recompile): 93 cd greenstone3 94 ant update 95 96 5. Updating your Greenstone installation from CVS, offline: 97 cd greenstone3 98 [online] 99 ant cvsupdate 100 [offline] 101 ant -Dnocvs.mode=yes update 102 103 6. Updating your Greenstone installation, with CVS done outside of Ant: 104 cd greenstone3 105 cvs update -l 106 cvs update -dP extensions bin comms docs lib resources src winutil packages 107 cd web (or the path-to-tomcat/webapps/greenstone3 if have installed greenstone as a webapp in Tomcat, see Using External Tomcat section) 108 cvs update -dP 109 cd greenstone3 110 [ if you have greenstone 2 building: 111 cvs update -dP gli 112 cvs checkout -P gs2build 113 Note that the gs2build one uses checkout not update. 114 ] 115 ant -Dnocvs.mode=yes update 116 117 The main targets for installation/update are: 118 configure, configure-c++, clean, compile. 119 Any sub targets can be run by themselves. Run 'ant -projecthelp' for a list of public targets, otherwise you can look at the build.xml file to see which targets depend on other ones. 120 121 If you run your install using an external Tomcat, the SOAP web service for localsite (used by the gateway servlet) will not be loaded. You need to start up Tomcat, then run 'ant soap-deploy-site' and accept the defaults for sitename and siteuri (both localsite). If you want to use the gateway servlet without restarting Tomcat, you will need to reload the site information. Visit the URL localhost:8080/greenstone3/gateway?a=s&sa=c (substituting your server name and port number if necessary). See the user guide for more information about run time reconfiguration. 46 ant -Dproperties.accepted=yes -logfile build.log install 122 47 123 48 Running Greenstone: 124 ------------------- 125 126 To startup the local servers, run 'ant start'. 'ant restart' and 'ant stop' restarts and shuts down the servers. To start or stop just Tomcat or MYSQL, use the start-tomcat, start-mysql, stop-tomcat, stop-mysql targets. 127 These will only start/stop local servers (ones installed by Greenstone). You will need to manually start/stop external Tomcat/mysql. 128 129 Greenstone will be available in a browser at "http://localhost:8080/greenstone3". 130 49 --------------------------------------------------------- 50 51 To startup the local servers (Tomcat adn/or MySQL), run 'ant start'. 52 'ant restart' and 'ant stop' restarts and shuts down the servers. 53 To start or stop just Tomcat or MySQL, use the start-tomcat, start-mysql, stop-tomcat, stop-mysql targets. 54 These will only start/stop local servers (ones installed by Greenstone). You will need to manually start/stop external Tomcat/MySQL. if you are using both external Tomcat and external MySQL, then the start, restart, stop targets do nothing. 55 56 Once the Tomcat server is running, Greenstone will be available in a browser at "http://localhost:8080/greenstone3". 131 57 You can change the port number by changing the 'tomcat.port' property in build.properties, then running 'ant configure'. 132 58 133 134 Using SOAP: 135 ------------------------------- 136 137 Greenstone comes with Apache Axis installed as part of the Greenstone web application. A SOAP server on localsite is deployed during installation. You should be able to see all localsite's collections through the gateway servlet. (http://localhost:8080/greenstone3/gateway) 138 139 To set up a SOAP server on a new site, run 140 ant soap-deploy-site 141 This will prompt you for the sitename (the directory name), and the site uri - this should be a unique identifier for the site's web service. 142 143 For a non-interactive version, run 144 ant -Daxis.sitename=xxx -Daxis.siteuri=yyy soap-deploy-site 145 146 The service is accessible at http://localhost:8080/greenstone3/services/<siteuri> 147 (or http://<computer-web-address>:<port>/greenstone3/services/<siteuri>) 59 MySQL is only needed if you want to use the GS3MGDemo collection, or if you want to build collections using Greenstone3 native collection building. 60 148 61 149 62 Building Collections: 150 ----------------------- 63 ---------------------------------------------------------- 151 64 152 65 You can build collections using either Greenstone 2 style building, or native Greenstone 3 style. 153 66 154 Greenstone 2 :67 Greenstone 2 style: 155 68 156 69 You need to have Perl installed and on your PATH. Perl is included as part of the Windows binary distribution. 157 70 run 'ant gli", or cd to greenstone3/gli and run gli4gs3.sh/bat. This is a graphical tool for building collections. Once you have created and built a collection, you can see it by clicking 'Preview collection' on the Build panel. 158 71 159 Note that GLI doesn't start up the Greenstone server (Tomcat/ mysql) so you should run 'ant start' before previewing your collection.160 161 Greenstone 3 :72 Note that GLI doesn't start up the Greenstone server (Tomcat/MySQL) so you should run 'ant start' before previewing your collection. 73 74 Greenstone 3 style: 162 75 163 76 In the greenstone3 directory, run: 'source gs3-setup.sh' (GNU/Linux, Mac OS X) or 'gs3-setup' (Windows). … … 168 81 See the manual for more details about both styles of collection building. 169 82 170 Other Notes: 171 --------------- 172 173 See greenstone3/docs/manual/manual.pdf for more details about the software and installation etc. 174 175 Under GNU/Linux and Mac OS X, Tomcat logs output to logs/catalina.out in the Tomcat directory (greenstone3/packages/tomcat) 176 177 To prevent Tomcat showing directory listings, edit conf/web.xml file in the Tomcat directory and set the value of the "listings" servlet parameter to false. 178 179 ant can't seem to do cvs using authenticated cvs on windows: 180 there were some classes missing - www.ibiblio.org/maven/jsch/jars/jsch-0.1.17.jar 181 many ssh processes seemed to be started up - all waiting in the background for password?? 182 So should only use anonymous cvs. 83 Recompiling 84 ------------------------------------------------------- 85 To recompile your Greenstone3 installation, in the top level greenstone3 directory, run: 86 87 ant configure 88 ant configure-c++ 89 ant clean 90 ant compile 91 92 The compile target, under GNU/Linux and Mac OS X, does Java and C/C++ compilation. For Windows, since Visual Studio is not a standard component, only Java compilation is carried out. Pre-compiled binaries are provided for the C/C++ components (src/packages and Greenstone 2 style building). If you have Visual Studio installed (version 6), you can run the compile-windows-c++ targets to compile the code locally. (Don't forget to setup the Visual Studio environment first, by running, e.g. C:/Program Files/Microsoft Visual Studio/VC98/Bin/VCVARS32.BAT or equivalent.) 93 94 Any sub targets can be run by themselves. Run 'ant -projecthelp' for a list of public targets, otherwise you can look at the build.xml file to see which targets depend on other ones. 95 96 If you run your install using an external Tomcat, the SOAP web service for localsite (used by the gateway servlet) will not be loaded. You need to start up Tomcat, then run 'ant soap-deploy-site' and accept the defaults for sitename and siteuri (both localsite). If you want to use the gateway servlet without restarting Tomcat, you will need to reload the site information. Visit the URL http://localhost:8080/greenstone3/gateway?a=s&sa=c (substituting your server name and port number if necessary). See the user guide for more information about run time reconfiguration. 97 98 99 Using SOAP: 100 ------------------------------------------------------- 101 102 Greenstone comes with Apache Axis installed as part of the Greenstone web application. A SOAP server on localsite is deployed during installation. You should be able to see all localsite's collections through the gateway servlet. (http://localhost:8080/greenstone3/gateway) 103 104 To set up a SOAP server on a new site, run 105 ant soap-deploy-site 106 This will prompt you for the sitename (the directory name), and the site uri - this should be a unique identifier for the site's web service. 107 108 For a non-interactive version, run 109 ant -Daxis.sitename=xxx -Daxis.siteuri=yyy soap-deploy-site 110 111 The service is accessible at http://localhost:8080/greenstone3/services/<siteuri> 112 (or http://<computer-web-address>:<port>/greenstone3/services/<siteuri>) 113 183 114 184 115 Using External Tomcat: 185 ------------------------ 116 --------------------------------------------------- 186 117 187 118 If you want to use an existing Tomcat, set the path to its base directory 188 in build.properties (tomcat.installed.path) (on windows need to use double backslashes in paths '\\'). Then run 'ant prepare install'. If you have already done an install (e.g. using a local Tomcat), you don't need to do it again.119 in build.properties (tomcat.installed.path) (on windows need to use double backslashes in paths '\\'). 189 120 190 121 You will need to modify the Tomcat setup slightly. … … 192 123 1. Tell Tomcat about the Greenstone web app. There are two ways to do this. 193 124 194 A. Add in the Greenstone context to Tomcat's server.xml (In the Host name="localhost"..element)125 A. Add in the Greenstone context to Tomcat's server.xml (In the <Host name="localhost"..> element) 195 126 196 127 <Context path="/greenstone3" docBase="path-to-greenstone3/web" debug="1" … … 198 129 199 130 B. Alternatively, you can move (and rename) the greenstone3/web directory to tomcat/webapps/greenstone3 (i.e. the resulting directories will be like 200 tomcat/webapps/greenstone3/WEB-INF, no web directory). This should be done after running the initial 'ant [prepare] install'. 131 tomcat/webapps/greenstone3/WEB-INF, no web directory). This should be done after running the initial 'ant install'. 132 201 133 You will need to set the web.home property in the build.properties file 202 134 i.e. … … 238 170 Once all these changes have been made, you will need to restart the Tomcat server for them to take effect. 239 171 240 Using External mysql server241 ------------------------------ 172 Using External MySQL 173 ------------------------------------------------------------- 242 174 243 175 Set the mysql.installed.path property in build.xml to be non-empty (its not actually used) before installation. … … 245 177 You will need to add the two greenstone users: gsdl3reader and gsdl3admin. The reader user is only used for accessing the database, the admin user can be used for modification. 246 178 247 Run mysql as the root user.179 Run MySQL as the root user (or a user with account creation privileges). 248 180 249 181 Commands to add the two users: … … 253 185 You will need to edit the greenstone3/web/WEB-INF/classes/global.properties file and set the two passwords that you used in here: 254 186 mysql.admin.password and mysql.reader.password 255 The mysql.tcp.port property specified here should be set to the port that your mysqlis running on. (default 3306).187 The mysql.tcp.port property specified here should be set to the port that your MySQL is running on. (default 3306). 256 188 257 189 You should also load up the database for the gs3mgdemo collection: 258 190 create database localsite_gs3mgdemo; 259 191 260 Close mysql, then run192 Close MySQL, then run 261 193 mysql localsite_gs3mgdemo < <path-to-greenstone3>/web/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql 262 194 … … 267 199 268 200 Notes for Mac OS 269 ------------------ 201 ------------------------------------------------ 270 202 271 203 Set JAVA_HOME to be /Library/Java/Home 272 204 273 205 Notes on Versions 274 ------------------ 206 ----------------------------------------------- 275 207 276 208 Tomcat: 277 209 jakarta-tomcat-5.5.12.zip & jakarta-tomcat-5.5.12-compat.zip 278 My sql:210 MySQL: 279 211 mysql-standard-4.1.15-pc-linux-gnu-i686.tar.gz (GNU/Linux, x86, glibc-2.2, static (Standard only), gcc) 280 212 mysql-standard-4.1.15-apple-darwin7.9.0-powerpc.tar.gz (Mac OS X v10.3, without installer) … … 284 216 285 217 All available from www.greenstone.org/gs3files if not available at their respective websites. 218 219 Other Notes: 220 ------------------------------------------------- 221 222 See greenstone3/docs/manual/manual.pdf for more details about the software and installation etc. 223 224 Under GNU/Linux and Mac OS X, Tomcat logs output to logs/catalina.out in the Tomcat directory (greenstone3/packages/tomcat) 225 226 To prevent Tomcat showing directory listings, edit conf/web.xml file in the Tomcat directory and set the value of the "listings" servlet parameter to false. 227 228 The file web/WEB-INF/classes/global.properties is generated on install and contains some properties for the run time system. 229
Note:
See TracChangeset
for help on using the changeset viewer.