[26380] | 1 | ********************************************************************************************************************
|
---|
| 2 | CONTENTS
|
---|
| 3 | ********************************************************************************************************************
|
---|
| 4 |
|
---|
| 5 | A. To install your GS3 Fedora extension from fedora3-gs3ext.tar.gz
|
---|
| 6 |
|
---|
| 7 | B. How to manually build fedora collections
|
---|
| 8 |
|
---|
| 9 | C. The customisations that have been made for the extension
|
---|
| 10 |
|
---|
| 11 | D. How to manually set up Fedora 3.6.1 with Fedora GSearch 2.5 from scratch
|
---|
| 12 | Installing Fedora
|
---|
| 13 | Installing Fedora GSearch
|
---|
| 14 | Debugging
|
---|
| 15 |
|
---|
| 16 |
|
---|
| 17 | Version:
|
---|
| 18 | Greenstone 3.05
|
---|
| 19 | Fedora 3.6.1
|
---|
| 20 | Fedora GSearch 2.5
|
---|
| 21 |
|
---|
| 22 | Web services pages once installed:
|
---|
| 23 | http://localhost:8383/fedora/services
|
---|
| 24 | http://localhost:8383/fedoragsearch/services
|
---|
| 25 |
|
---|
| 26 | -- ak19, 2012
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | ********************************************************************************************************************
|
---|
| 31 | A. To install your Fedora extension for Greenstone 3 from the fedora3-gs3ext.tar.gz distribution file
|
---|
| 32 | ********************************************************************************************************************
|
---|
| 33 |
|
---|
| 34 | (Tested to work on Linux machines.)
|
---|
| 35 |
|
---|
| 36 | 0. You will need Greenstone 3.05 or a fresh checkout from SVN, already installed.
|
---|
| 37 |
|
---|
| 38 | 1. Download the Fedora Extension for Greenstone 3: http://trac.greenstone.org/browser/gs3-extensions/fedora/fedora3-gs3ext.tar.gz
|
---|
| 39 |
|
---|
| 40 | 2. Save into your Greenstone3/ext folder
|
---|
| 41 |
|
---|
| 42 | 3. Untar and decompress it:
|
---|
| 43 | $ tar -xvzf fedora3-gs3ext.tar.gz
|
---|
| 44 |
|
---|
| 45 | 4. This will create a fedora3 folder in your Greenstone3/ext folder.
|
---|
| 46 |
|
---|
| 47 | 5. Open Greenstone3/build.properties and find the section:
|
---|
| 48 |
|
---|
| 49 | ##These need to be uncommented if using Fedora and Fedora GSearch with Greenstone's tomcat
|
---|
| 50 | fedora.home=#${basedir}/ext/fedora3
|
---|
| 51 | #fedora.maxpermsize=-XX:MaxPermSize=128m
|
---|
| 52 | #fedora.password=pounamu
|
---|
| 53 |
|
---|
| 54 | Uncomment all these properties and change the value for the fedora password if necessary:
|
---|
| 55 |
|
---|
| 56 | ##These need to be uncommented if using Fedora and Fedora GSearch with Greenstone's tomcat
|
---|
| 57 | fedora.home=${basedir}/ext/fedora3
|
---|
| 58 | fedora.maxpermsize=-XX:MaxPermSize=128m
|
---|
| 59 | fedora.password=pounamu
|
---|
| 60 |
|
---|
| 61 |
|
---|
| 62 | 6. Use a terminal to go into this folder:
|
---|
| 63 | $ cd Greenstone3/ext/fedora3
|
---|
| 64 |
|
---|
| 65 | 7. If you type `ant` in the x-term, it will print the Usage message which will display the list of commands available and the order in which to execute them for proper installation. It's a 5 step process (explained in detail further below):
|
---|
| 66 |
|
---|
| 67 | $ ant -Dgsdl3.home=<type-full-path-to-your-gs3> start-fedora-install
|
---|
| 68 |
|
---|
| 69 | $ ant start
|
---|
| 70 |
|
---|
| 71 | $ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> continue-fedora-install
|
---|
| 72 |
|
---|
| 73 | $ ant stop
|
---|
| 74 |
|
---|
| 75 | $ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> finish-fedora-install
|
---|
| 76 |
|
---|
| 77 |
|
---|
| 78 | That's it.
|
---|
| 79 | Now you can start tomcat again and visit http://localhost:8383/fedora and http://localhost:8383/fedoragsearch/rest to check the pages display.
|
---|
| 80 |
|
---|
| 81 | 8. You can start creating Greenstone Fedora collections with FLI. Run FLI from the GS3 toplevel folder by typing:
|
---|
| 82 | $ ./gli/fli.sh
|
---|
| 83 |
|
---|
| 84 |
|
---|
| 85 |
|
---|
| 86 | DETAILS ON STEP 7:
|
---|
| 87 | a. From your Greenstone3/ext/fedora3 folder, run:
|
---|
| 88 | $ ant -Dgsdl3.home=<type-full-path-to-your-gs3> start-fedora-install
|
---|
| 89 |
|
---|
| 90 | This step prepares the fedora and gsearch war files for deployment (by customising template files) and moves them into Greenstone 3's tomcat.
|
---|
| 91 |
|
---|
| 92 | b. Start tomcat by going into your GS3 toplevel folder and running:
|
---|
| 93 | $ ant start
|
---|
| 94 |
|
---|
| 95 | This step gets Greenstone's tomcat to deploy the fedora and fedoragsearch war files.
|
---|
| 96 | You may want to check your Greenstone library is working by visiting http://localhost:8383/greenstone3 in your browser
|
---|
| 97 |
|
---|
| 98 | c. Go back into Greenstone3/ext/fedora3 and run:
|
---|
| 99 | $ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> continue-fedora-install
|
---|
| 100 |
|
---|
| 101 | This target configures fedora-gsearch now that it has been deployed. It runs a fedora-gsearch ant build file to customise properties files that are internal to fedora-gsearch.
|
---|
| 102 |
|
---|
| 103 | d. Stop tomcat by going back into your GS3 toplevel folder and running:
|
---|
| 104 | $ ant stop
|
---|
| 105 |
|
---|
| 106 | You may want to check java instances running tomcat have indeed stopped:
|
---|
| 107 | $ ps aux | grep tomcat
|
---|
| 108 |
|
---|
| 109 | You will need to kill the process if any tomcat is still running at this stage (this can happen if you accidentally start tomcat several times in succession without stopping it).
|
---|
| 110 | $ kill -9 <process-id>
|
---|
| 111 |
|
---|
| 112 | e. Now that tomcat has stopped, go back into Greenstone3/ext/fedora3 and run:
|
---|
| 113 | ant -Dgsdl3src.home=<Full-Path-To-GS3> finish-fedora-install
|
---|
| 114 |
|
---|
| 115 | This will clean up the extension's war files in tomcat/packages/webapps now that they have already been deployed. (Do not perform this final step when tomcat is still running, else your fedora extension webapps will become undeployed.)
|
---|
| 116 |
|
---|
| 117 |
|
---|
| 118 |
|
---|
| 119 | When installation is completed, there will be a fedora3 folder in Greenstone3/ext, which you should not delete, since the Fedora Digital objects will be stored here, and the FedoraGSearch index will be created here.
|
---|
| 120 |
|
---|
| 121 | Further, the Fedora extension installation process would have made tomcat deploy several webapps in packages/tomcat/webapps. The resulting folders are:
|
---|
| 122 | - fedora
|
---|
| 123 | - fedora-demo
|
---|
| 124 | - fedoragsearch
|
---|
| 125 | - fop
|
---|
| 126 | - imagemanip
|
---|
| 127 | - saxon
|
---|
| 128 |
|
---|
| 129 | (Note that the installation process will have removed the Fedora extension war files it put into packages/tomcat/webapps during installation.)
|
---|
| 130 |
|
---|
| 131 |
|
---|
| 132 |
|
---|
| 133 | ********************************************************************************************************************
|
---|
| 134 | B. Manual building of fedora collections
|
---|
| 135 | ********************************************************************************************************************
|
---|
| 136 |
|
---|
| 137 | You can use FLI to create, build and preview Fedora collections using Greenstone.
|
---|
| 138 |
|
---|
| 139 | The same can be done manually by calling the g2f perl scripts from the command line.
|
---|
| 140 |
|
---|
| 141 | 1. Fedora needs to be running, so ensure the Greenstone tomcat is running:
|
---|
| 142 | ant start
|
---|
| 143 |
|
---|
| 144 | 2. Set up the GS3 environment:
|
---|
| 145 | source gs3-setup.bash
|
---|
| 146 |
|
---|
| 147 | 3. Create a new collection with mkcol.pl. Call it "fedora1" for example
|
---|
| 148 | mkcol.pl -collectdir /<GS3>/web/sites/localsite/collect fedora1
|
---|
| 149 |
|
---|
| 150 | 4. Run import and build to ingest the new collection
|
---|
| 151 |
|
---|
| 152 | - First put the documents you want into the import directory of your new collection.
|
---|
| 153 |
|
---|
| 154 | - g2f-import.pl -hostname localhost -port 8383 -password pounamu -removeold -collectdir /<GS3>/web/sites/localsite/collect fedora1
|
---|
| 155 | (password may be optional at this stage, by include it for convenience)
|
---|
| 156 |
|
---|
| 157 | - g2f-buildcol.pl -hostname localhost -port 8383 -password pounamu -removeold -collectdir /<GS3>/web/sites/localsite/collect fedora1
|
---|
| 158 |
|
---|
| 159 |
|
---|
| 160 | 5. If building the GS3 demo collection as a fedora collection:
|
---|
| 161 | - use FLI to transfer dls to dc metadata upon Gathering the documents.
|
---|
| 162 | - then before building, turn on the description_tags in the HTMLPlugin.
|
---|
| 163 |
|
---|
| 164 | 6. If you ran FLI, exit it. It should stop the Greenstone server.
|
---|
| 165 |
|
---|
| 166 | With fedora installed, it's always good to check that the java process that launched tomcat has indeed stopped:
|
---|
| 167 | ps aux | grep "tomcat"
|
---|
| 168 |
|
---|
| 169 | (Since things will fail if multiple instances of this same tomcat are running, kill any java processes that are referring to tomcat.)
|
---|
| 170 |
|
---|
| 171 | 7. Create an index folder in the new fedora collection folder. Create a buildConfig.xml file in it containing the following:
|
---|
| 172 |
|
---|
| 173 | <buildConfig>
|
---|
| 174 | <metadataList/>
|
---|
| 175 | <serviceRackList>
|
---|
| 176 | <serviceRack name="FedoraServiceProxy" />
|
---|
| 177 | </serviceRackList>
|
---|
| 178 | </buildConfig>
|
---|
| 179 |
|
---|
| 180 |
|
---|
| 181 | 8. Restart the GS3 server.
|
---|
| 182 | ant start
|
---|
| 183 |
|
---|
| 184 | 9. Visit the collection from the Greenstone collections page
|
---|
| 185 |
|
---|
[26382] | 186 | 10. Deleting a Fedora GS3 collection requires the collection's documents and the collection file to be purged from the Fedora repository and removed from the Fedora Gsearch index. (In the case of a normal GS3 collection, just the GS3 collection's directory will be deleted.) There's now a script to delete a Greenstone Fedora collection which will take care of these additional steps if you are manually managing your collections. (FLI calls this script when a collection is deleted from FLI.)
|
---|
[26380] | 187 |
|
---|
[26382] | 188 | Deleting a Fedora GS3 collection is accomplished with the following 2 steps:
|
---|
[26384] | 189 | - Run the g2f-deletecol.pl script over the collection to be deleted. Assuming the collection is called fedora1, you'd run:
|
---|
[26391] | 190 | g2f-deletecol.pl -hostname localhost -port 8383 -password pounamu -collectdir /<GS3>/web/sites/localsite/collect fedora1
|
---|
[26382] | 191 | - manually delete the Greenstone collection directory from the filesystem
|
---|
[26380] | 192 |
|
---|
[26382] | 193 |
|
---|
[26391] | 194 | To run this manually,
|
---|
| 195 | - first remove the pids from the GSearch index:
|
---|
| 196 | /<GS3>/packages/tomcat/webapps/fedoragsearch/client>/<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex deletePID greenstone:fedora1-HASH010313b14474bc72b296b15f
|
---|
[26382] | 197 |
|
---|
[26391] | 198 | It will ask for the fedoragsearch username and password, which by default are fedoraAdmin and pounamu, respectively.
|
---|
| 199 |
|
---|
| 200 | - then purge the necessary documents (pids) from the fedora repository:
|
---|
| 201 | /<GS3>/ext/fedora3/client/bin>./fedora-purge.sh localhost:8383 fedoraAdmin pounamu greenstone:fedora1-HASHe14e36cba08bd41c663237 http "purging"
|
---|
| 202 |
|
---|
| 203 | - You can check it's all been deleted by visiting http://localhost:8383/fedora/search
|
---|
| 204 | and searching for:
|
---|
| 205 |
|
---|
| 206 | greenstone:*
|
---|
| 207 | or greenstone:<colname>*
|
---|
| 208 |
|
---|
| 209 | Visit http://localhost:8383/fedoragsearch/rest?operation=browseIndex
|
---|
| 210 | and browse the PID field
|
---|
| 211 |
|
---|
| 212 | You can also visit http://localhost:8383/fedoragsearch/rest?operation=gfindObjects
|
---|
| 213 | then you can search for a query term by prefixing the index field to it, e.g ds.fulltext:computers
|
---|
| 214 |
|
---|
| 215 |
|
---|
[26380] | 216 | ********************************************************************************************************************
|
---|
| 217 | C. The customisations that have been made for the extension
|
---|
| 218 | ********************************************************************************************************************
|
---|
| 219 |
|
---|
| 220 | This section is of use when Fedora or GSearch is updated or if you want to update the fedora3-gs3ext.tar.gz distribution file with further customisations.
|
---|
| 221 |
|
---|
| 222 | The first version of the Fedora extension for Greenstone uses Fedora 3.6.1 and the GSearch 2.5 (which goes with Fedora 3.6.1).
|
---|
| 223 |
|
---|
| 224 | Some template files were added to Fedora and Fedora Gsearch's distribution files in order to customise these for installing them within a Greenstone 3 installation. These files are committed to SVN (without directory structure) at http://trac.greenstone.org/browser/gs3-extensions/fedora/fedora-files and http://trac.greenstone.org/browser/gs3-extensions/fedoragsearch-files
|
---|
| 225 |
|
---|
| 226 | They can be edited there if and when necessary, but they would then need to be included in the extension's distribution file fedora3-gs3ext.tar.gz to update its own existing copies.
|
---|
| 227 |
|
---|
| 228 | That's because these template files are included in the Fedora Extension for GS3 (fedora3-gs3ext.tar.gz). The extension's build.xml modifies these template files when installing the Fedora Extension into Greenstone 3. The template files contain placeholder strings that get updated when ant targets are run over the build.xml file.
|
---|
| 229 |
|
---|
| 230 |
|
---|
| 231 | 1. The customisation files for Fedora 3.6.1 are:
|
---|
| 232 |
|
---|
| 233 | - ./install/install.properties.in
|
---|
| 234 | - ./server/config/spring/akubra-llstore.xml.in
|
---|
| 235 | - ./server/config/fedora.fcfg.in
|
---|
| 236 | - ./server/config/fedora-users.xml.in
|
---|
| 237 |
|
---|
| 238 | All these files get converted to filenames without the ".in" suffix upon installation, and placeholder strings in these template files get replaced. The replacements are on the strings
|
---|
[26384] | 239 | - @GSDL3SRCHOME@
|
---|
| 240 | - @FEDORA_HOME@ (set to gsdl3srchome/ext/fedora3)
|
---|
| 241 | - @tomcatserver@
|
---|
| 242 | - @tomcatport@
|
---|
| 243 | - @tomcatshutdownport@
|
---|
| 244 | - @fedorapassw@
|
---|
[26391] | 245 | - @indexwritelocktimeout@
|
---|
[26380] | 246 |
|
---|
[26391] | 247 | Except for the first, which needs to be set when running the Fedora extension's ant targets, all the remaining ones can be specified in Greenstone 3's toplevel build.properties.
|
---|
[26380] | 248 |
|
---|
[26391] | 249 |
|
---|
[26380] | 250 | 2. The customisation files for Fedora GSearch 2.6 are located in the "adjust_war_files" subfolder of fedora3-gs3ext.tar.gz file. This custom folder contains the official unpacked fedoragsearch folder, but with the following customisation files:
|
---|
| 251 |
|
---|
| 252 | - adjust_war_files/fedoragsearch/WEB-INF/web.xml
|
---|
| 253 | - adjust_war_files/fedoragsearch/FgsConfig/fgsconfig-basic.properties.in
|
---|
| 254 | - adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLucene.xslt
|
---|
| 255 | - adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLuceneGenerated.xslt
|
---|
[26391] | 256 | - adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties
|
---|
[26380] | 257 | - adjust_war_files/fedoragsearch/client/runRESTClient.sh
|
---|
| 258 | - adjust_war_files/fedoragsearch/client/runSOAPClient.sh
|
---|
| 259 | - adjust_war_files/fedoragsearch/client/runSOAPClient.bat
|
---|
| 260 |
|
---|
[26391] | 261 |
|
---|
[26380] | 262 | All these files will get copied into the same locations within <GS3>/packages/tomcat/webapps/fedoragsearch. The file fgsconfig-basic.properties.in will get copied as fgsconfig-basic.properties but with the previously-listed placeholder strings replaced.
|
---|
| 263 |
|
---|
| 264 |
|
---|
| 265 | 3. There's also the fedora.xml.in inside the "adjust_war_files" folder of the unpacked extension. This template file will be copied over as <GS3>/packages/tomcat/conf/Catalina/localhost/fedora.xml during the extension installation process, also with placeholder strings replaced.
|
---|
| 266 |
|
---|
| 267 |
|
---|
| 268 | DETAILS TO STEP 2 (Fedora GSearch customisation files):
|
---|
| 269 |
|
---|
| 270 | a. The changes to web.xml are that the authorisation filters are commented out:
|
---|
| 271 |
|
---|
[26384] | 272 | <!--
|
---|
| 273 | <filter-mapping>
|
---|
[26380] | 274 | <filter-name>EnforceAuthnFilter</filter-name>
|
---|
| 275 | <servlet-name>AxisServlet</servlet-name>
|
---|
| 276 | </filter-mapping>
|
---|
| 277 | <filter-mapping>
|
---|
| 278 | <filter-name>EnforceAuthnFilter</filter-name>
|
---|
| 279 | <servlet-name>GenericSearchREST</servlet-name>
|
---|
| 280 | </filter-mapping>
|
---|
| 281 | <filter-mapping>
|
---|
| 282 | <filter-name>EnforceAuthnFilter</filter-name>
|
---|
| 283 | <url-pattern>/index.html</url-pattern>
|
---|
| 284 | </filter-mapping>
|
---|
| 285 | <filter-mapping>
|
---|
| 286 | <filter-name>EnforceAuthnFilter</filter-name>
|
---|
| 287 | <url-pattern>/rest</url-pattern>
|
---|
| 288 | </filter-mapping>
|
---|
| 289 | -->
|
---|
| 290 |
|
---|
| 291 |
|
---|
| 292 | b. The 3 client scripts runRESTClient.bat, runRESTClient.sh and runSOAPClient.sh have been modified to be runnable from any directory, as they will be called by GS3's g2f perl scripts.
|
---|
| 293 |
|
---|
| 294 | - The bash files have been made executable on extraction of the GS3 Fedora extension and the following has been added to the top of the files:
|
---|
| 295 |
|
---|
| 296 | # Need to run this script from its own directory instead of whichever directory it may be called from
|
---|
| 297 | thisdir="`dirname \"$0\"`"
|
---|
| 298 | thisdir="`cd \"$thisdir\" && pwd`"
|
---|
| 299 | cd "$thisdir"
|
---|
| 300 |
|
---|
| 301 |
|
---|
| 302 | - Additions to the bat scripts are at the top and bottom:
|
---|
| 303 |
|
---|
| 304 | @echo off
|
---|
| 305 |
|
---|
| 306 | ::pushd "%CD%"
|
---|
| 307 | set startdir=%CD%
|
---|
| 308 | CD /D "%~dp0"
|
---|
| 309 |
|
---|
| 310 | ...
|
---|
| 311 |
|
---|
| 312 | :: popd
|
---|
| 313 | cd "%startdir%"
|
---|
| 314 | set startdir=
|
---|
| 315 |
|
---|
| 316 |
|
---|
| 317 | c. The changes to fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene's foxmlToLucene.xslt and foxmlToLuceneGenerated.xslt are identical. The following xslt has been added:
|
---|
| 318 |
|
---|
| 319 | - Add the following namespaces to the namespace declarations at the top:
|
---|
| 320 | xmlns:ex="http://www.greenstone.org/namespace/fake/ex"
|
---|
| 321 | xmlns:dls="http://www.greenstone.org/namespace/fake/dls"
|
---|
| 322 |
|
---|
| 323 | - Add custom indexing for EX and DLS datastreams below the comment on datastreams:
|
---|
| 324 |
|
---|
| 325 | <!-- a datastream is fetched, if its mimetype
|
---|
| 326 | can be handled, the text becomes the value of the field.
|
---|
| 327 | This is the version using PDFBox,
|
---|
| 328 | below is the new version using Apache Tika. -->
|
---|
| 329 |
|
---|
| 330 | <xsl:for-each select="foxml:datastream[starts-with(@ID,'EX')]/foxml:datastreamVersion[last()]/foxml:xmlContent/ex:ex/ex:metadata">
|
---|
| 331 | <IndexField index="TOKENIZED" store="YES" termVector="YES">
|
---|
| 332 | <xsl:attribute name="IFname">
|
---|
| 333 | <xsl:value-of select="concat('ex.', @name)"/>
|
---|
| 334 | </xsl:attribute>
|
---|
| 335 | <xsl:value-of select="text()"/>
|
---|
| 336 | </IndexField>
|
---|
| 337 | </xsl:for-each>
|
---|
| 338 |
|
---|
| 339 | <xsl:for-each select="foxml:datastream[starts-with(@ID,'DLS')]/foxml:datastreamVersion[last()]/foxml:xmlContent/dls:dls/dls:metadata">
|
---|
| 340 | <IndexField index="TOKENIZED" store="YES" termVector="YES">
|
---|
| 341 | <xsl:attribute name="IFname">
|
---|
| 342 | <xsl:value-of select="concat('dls.', @name)"/>
|
---|
| 343 | </xsl:attribute>
|
---|
| 344 | <xsl:value-of select="text()"/>
|
---|
| 345 | </IndexField>
|
---|
| 346 | </xsl:for-each>
|
---|
| 347 |
|
---|
| 348 | - Near the end of the XSLT files, just after index for the "foxml.all.text" field, allow just the full text of the documents to be indexed by adding an index for the ds.fulltext field:
|
---|
| 349 |
|
---|
| 350 | <IndexField IFname="ds.fulltext" index="TOKENIZED" store="YES" termVector="YES">
|
---|
| 351 | <xsl:for-each select="//foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
|
---|
| 352 | <xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
|
---|
| 353 | <xsl:text>Â </xsl:text>
|
---|
| 354 | </xsl:for-each>
|
---|
| 355 | </IndexField>
|
---|
| 356 |
|
---|
| 357 |
|
---|
| 358 | Further datastreams and metadata sets can be indexed by adding similar namespace declarations and xml elements to these 2 XSLT files.
|
---|
| 359 | If the changes are not meant to apply for all Greenstone users, individual Greenstone users can add fields for indexing by making such changes to just the file fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLuceneGenerated.xslt
|
---|
| 360 |
|
---|
| 361 |
|
---|
[26391] | 362 | d. By default, Lucene's lock obtain timeout is set to 0 in its properties file, which is not acceptable for all but the smallest documents. The lock timeout can be customised in build.properties and by default is set to 10000 (or 1000), which can be adjusted before starting the Fedora extension installation process.
|
---|
[26380] | 363 |
|
---|
[26391] | 364 | The installation process will write out this property into GSearch's FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties:
|
---|
| 365 | fgsindex.defaultWriteLockTimeout = 1000
|
---|
| 366 |
|
---|
| 367 | When fedoragsearch then gets deployed, this value will be propagated into:
|
---|
| 368 | <GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/index.properties
|
---|
| 369 |
|
---|
| 370 |
|
---|
| 371 |
|
---|
[26380] | 372 | ********************************************************************************************************************
|
---|
| 373 | D. To manually set up Fedora with Fedora GSearch 2.5 from scratch
|
---|
| 374 | ********************************************************************************************************************
|
---|
| 375 |
|
---|
[26384] | 376 | When installing Fedora, you can choose to install it outside Greenstone, and also instruct it to use its own tomcat. However, in the following instructions, Fedora's installation location (FEDORA_HOME) is still taken to be /GS3/ext/fedora3, since it's assumed Fedora is be installed to use Greenstone's tomcat.
|
---|
[26380] | 377 |
|
---|
| 378 | The Fedora GSearch war file will need to be unpacked in the tomcat/webapps folder of whichever tomcat Fedora is using. In the following, this is still Greenstone's tomcat.
|
---|
| 379 |
|
---|
[26384] | 380 | In whichever location Fedora is installed, that's where Fedora will store its digital objects and their datastreams, and that's where Fedora GSearch will create its GSearch index.
|
---|
[26380] | 381 |
|
---|
| 382 |
|
---|
| 383 | ********************************
|
---|
| 384 | INSTALLING FEDORA
|
---|
| 385 | ********************************
|
---|
| 386 | 1. Set FEDORA_HOME=/<GS3>/ext/fedora3 in .profile (emacs ~/.profile)
|
---|
| 387 | source ~/.profile
|
---|
| 388 |
|
---|
| 389 | 2. Run fedora installer:
|
---|
| 390 | java -jar fcrepo-installer-3.6.1.jar
|
---|
| 391 |
|
---|
| 392 | Install by specifying to use the existing tomcat (existingTomcat), and provide the Greenstone3 tomcat stop and start ports (usually 8383 and 8305).
|
---|
| 393 | Then set the existingTomcat to the Greenstone3 one: /<GS3>/packages/tomcat
|
---|
| 394 | Turn on messaging, as this is necessary for Fedora GSearch.
|
---|
| 395 |
|
---|
| 396 | - Installation options:
|
---|
| 397 |
|
---|
| 398 | custom
|
---|
| 399 | FEDORA_HOME
|
---|
| 400 | pwd: pounamu
|
---|
| 401 | host: <full-tomcat.server-host-name>
|
---|
| 402 | def server context: fedora
|
---|
| 403 | default false for user authentication for APIA-A
|
---|
| 404 | false for SSL availability
|
---|
| 405 | existingTomcat
|
---|
| 406 | path to tomcat: </full-path-to-GS3>/packages/tomcat
|
---|
| 407 | tomcat listen port: 8383
|
---|
| 408 | tomcat shutdown port:8305
|
---|
| 409 | derby:included
|
---|
| 410 | upstream HTTP authentication: (default) false
|
---|
| 411 | FeSL AuthZ: (default) false
|
---|
| 412 | XACML policy enforcement enabled: false
|
---|
| 413 | Low Level Storage: (default) akubra-fs
|
---|
| 414 | Resource Index: true
|
---|
| 415 | Enable Messaging: true
|
---|
| 416 | Messaging Provider URI: [default is vm:(broker:(tcp://localhost:61616))]
|
---|
| 417 | Deploy local services and demos: (default) true
|
---|
| 418 |
|
---|
| 419 |
|
---|
| 420 | - The Fedora installation options used are to be found (after installation) in fedora3/install/install.properties:
|
---|
| 421 |
|
---|
| 422 | #Install Options
|
---|
| 423 | #Fri Sep 21 15:29:29 NZST 2012
|
---|
| 424 | ri.enabled=true
|
---|
| 425 | messaging.enabled=false
|
---|
| 426 | apia.auth.required=false
|
---|
| 427 | database.jdbcDriverClass=org.apache.derby.jdbc.EmbeddedDriver
|
---|
| 428 | upstream.auth.enabled=false
|
---|
| 429 | ssl.available=false
|
---|
| 430 | database.jdbcURL=jdbc\:derby\:/<GS3>/ext/fedora3/derby/fedora3;create\=true
|
---|
| 431 | database.password=fedoraAdmin
|
---|
| 432 | database.username=fedoraAdmin
|
---|
| 433 | fesl.authz.enabled=false
|
---|
| 434 | tomcat.shutdown.port=8305
|
---|
| 435 | deploy.local.services=true
|
---|
| 436 | xacml.enabled=false
|
---|
| 437 | tomcat.http.port=8383
|
---|
| 438 | fedora.serverHost=<full-tomcat.server-host-name>
|
---|
| 439 | database=included
|
---|
| 440 | database.driver=included
|
---|
| 441 | fedora.serverContext=fedora
|
---|
| 442 | llstore.type=akubra-fs
|
---|
| 443 | tomcat.home=/<GS3>/packages/tomcat
|
---|
| 444 | fedora.home=/<GS3>/ext/fedora3
|
---|
| 445 | install.type=custom
|
---|
| 446 | servlet.engine=existingTomcat
|
---|
| 447 | fedora.admin.pass=pounamu
|
---|
| 448 |
|
---|
| 449 |
|
---|
| 450 | - If trying to turn a custom installation into one for distribution, you would need to modify the following 4 files by inserting placeholder strings where applicable for the tomcatserver name, tomcat listen port and shutdown port, fedorapassword, GSLD3SRCHOME and FEDORA_HOME:
|
---|
| 451 |
|
---|
| 452 | fedora3/install/install.properties
|
---|
| 453 | fedora3/server/config/spring/akubra-llstore.xml
|
---|
| 454 | fedora3/server/config/fedora.fcfg
|
---|
| 455 | fedora3/server/config/fedora-users.xml
|
---|
| 456 |
|
---|
| 457 | Then you would rename these files with the suffix .in
|
---|
| 458 |
|
---|
| 459 |
|
---|
| 460 | 3. Just to confirm there are no differences between the server.xml fedora has generated for fedora, and the server.xml of GS3's tomcat, run a diff:
|
---|
| 461 |
|
---|
| 462 | diff -w /<GS3>/packages/tomcat/conf/server.xml </GS3/ext/>fedora3/install/server.xml
|
---|
| 463 |
|
---|
| 464 | 4. Copy the fedora war files from fedora3/install into packages/tomcat/webapps
|
---|
| 465 | fedora.war, fedora-demo.war, fop.war, imagemanip.war, saxon.war
|
---|
| 466 |
|
---|
| 467 | 5. Copy the jar files xalan.jar, serializer.jar (and xsltc.jar) from Greenstone3's web/WEB-INF/lib into Greenstone3's packages/tomcat/lib so that fedora has access to the xalan version of the TransformerFactoryImpl class.
|
---|
| 468 |
|
---|
| 469 | There's also a xalan.jar in /<GS3>/packages/tomcat/webapps/fop/WEB-INF/lib
|
---|
| 470 | So this can be copied into /<GS3>/packages/tomcat/lib/. instead of the Greenstone version.
|
---|
| 471 |
|
---|
| 472 | 6. Create the file /<GS3>/packages/tomcat/conf/Catalina/localhost/fedora.xml
|
---|
| 473 | containing:
|
---|
| 474 |
|
---|
| 475 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 476 | <Context>
|
---|
| 477 | <Parameter name="fedora.home" value="/<GS3>/ext/fedora3" />
|
---|
| 478 | </Context>
|
---|
| 479 |
|
---|
| 480 |
|
---|
| 481 | 7. Before running the Greenstone server, make a copy of the fedora3 folder. Because once you start up tomcat, and visit the fedora home page, it will create a lot of files customised to the location of the current installation.
|
---|
| 482 |
|
---|
| 483 | 8. Visit http://localhost:8383/greenstone3 and
|
---|
| 484 | http://localhost:8383/fedora
|
---|
| 485 |
|
---|
| 486 | to confirm both work.
|
---|
| 487 |
|
---|
| 488 |
|
---|
| 489 | ********************************
|
---|
| 490 | INSTALLING FEDORA GSEARCH
|
---|
| 491 | ********************************
|
---|
| 492 | 1. Download Fedora GSearch 2.5
|
---|
| 493 |
|
---|
| 494 | 2. Stop tomcat. Copy the fedoragsearch.war files into /<GS3>/packages/tomcat/webapps
|
---|
| 495 |
|
---|
| 496 | If Fedora was not installed with messaging turned on, then turn it on in now /<GS3>/ext/fedora3/server/config/fedora.fcfg:
|
---|
| 497 |
|
---|
| 498 | <module role="org.fcrepo.server.messaging.Messaging" class="org.fcrepo.server.messaging.MessagingModule">
|
---|
| 499 | <comment>Fedora's Java Messaging Service (JMS) Module</comment>
|
---|
| 500 | <param name="enabled" value="true"/>
|
---|
| 501 | ...
|
---|
| 502 |
|
---|
| 503 | 3. Update the following properties in /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/fgsconfig-basic.properties
|
---|
| 504 |
|
---|
| 505 | gsearchBase=http://<tomcat.server>:8383
|
---|
| 506 | gsearchUser=fedoraAdmin
|
---|
| 507 | gsearchPass=<fedora.password>
|
---|
| 508 | local.FEDORA_HOME=/<GS3>/ext/fedora3
|
---|
| 509 | finalConfigPath=/<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes
|
---|
| 510 |
|
---|
| 511 | fedoraBase=http://<tomcat.server>:8383
|
---|
| 512 | fedoraPass=<fedora.password>
|
---|
| 513 |
|
---|
| 514 | 4. Add the edited foxmlToLucene.xslt & foxmlToLuceneGenerated.xslt files to /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene
|
---|
| 515 |
|
---|
| 516 | 5. Add the edited runRESTClient.sh (and runSOAPClient.sh, runRESTClient.bat) to /<GS3>/packages/tomcat/webapps/fedoragsearch/client
|
---|
| 517 | And give them execute permissions, unless they already have it.
|
---|
| 518 |
|
---|
| 519 | 6. In a text editor, open up /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/web.xml
|
---|
| 520 | and comment out the authentication filters (one or two of these is probably all that is necessary):
|
---|
| 521 |
|
---|
| 522 | <!--
|
---|
| 523 | <filter-mapping>
|
---|
| 524 | <filter-name>EnforceAuthnFilter</filter-name>
|
---|
| 525 | <servlet-name>AxisServlet</servlet-name>
|
---|
| 526 | </filter-mapping>
|
---|
| 527 | <filter-mapping>
|
---|
| 528 | <filter-name>EnforceAuthnFilter</filter-name>
|
---|
| 529 | <servlet-name>GenericSearchREST</servlet-name>
|
---|
| 530 | </filter-mapping>
|
---|
| 531 | <filter-mapping>
|
---|
| 532 | <filter-name>EnforceAuthnFilter</filter-name>
|
---|
| 533 | <url-pattern>/index.html</url-pattern>
|
---|
| 534 | </filter-mapping>
|
---|
| 535 | <filter-mapping>
|
---|
| 536 | <filter-name>EnforceAuthnFilter</filter-name>
|
---|
| 537 | <url-pattern>/rest</url-pattern>
|
---|
| 538 | </filter-mapping>
|
---|
| 539 | -->
|
---|
| 540 |
|
---|
| 541 | Maybe what I really need to comment out is:
|
---|
| 542 | <filter>
|
---|
| 543 | <filter-name>EnforceAuthnFilter</filter-name>
|
---|
| 544 | <filter-class>org.fcrepo.server.security.servletfilters.FilterEnforceAuthn</filter-class>
|
---|
| 545 | </filter>
|
---|
| 546 |
|
---|
| 547 | 7. Start tomcat to have it deploy fedoragsearch.
|
---|
| 548 | This will unpack fedoragsearch.
|
---|
| 549 |
|
---|
| 550 | 8. With tomcat running, configure fedoragsearch, which will adjust various config files. You will need to go into the deployed fedoragsearch webapps folder's FgsConfig folder first to be able to run the configuration target:
|
---|
| 551 |
|
---|
[26404] | 552 | <GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig>ant -f fgsconfig-basic.xml
|
---|
[26380] | 553 |
|
---|
[26404] | 554 | 9. With tomcat still running, run updateIndex once to create the empty index for the first time (by running the runRESTClient.sh script with the command: "host:port updateIndex createEmpty [indexName]")
|
---|
| 555 |
|
---|
| 556 | ./<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex createEmpty FgsIndex
|
---|
| 557 |
|
---|
| 558 | 10. Check fedoragsearch has been properly installed by visiting:
|
---|
[26380] | 559 | http://localhost:8383/fedoragsearch/rest
|
---|
| 560 |
|
---|
| 561 | 10. If you wish to remove the various war files from GS3's tomcat webapps folder, you will need to stop tomcat first before deleting the war files, because doing so when tomcat is running will undeploy those webapps.
|
---|
| 562 |
|
---|
| 563 |
|
---|
| 564 | ********************************
|
---|
| 565 | DEBUGGING
|
---|
| 566 | ********************************
|
---|
| 567 |
|
---|
| 568 | Logs to consult when debugging:
|
---|
| 569 |
|
---|
| 570 | 1. Check /<GS3>/packages/tomcat/logs/catalina.out
|
---|
| 571 |
|
---|
| 572 | 2. </GS3/ext/>fedora3/server/logs/fedora.log for Fedora error logging.
|
---|
| 573 |
|
---|
[26384] | 574 | 3. To turn on FedoraGSearch's logging of debug statements (Huge files, can reach 500 Mb in a day if rebuilding the demo collection. So you may want to switch this off when not debugging by setting the debug level to INFO):
|
---|
| 575 |
|
---|
[26380] | 576 | - /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/log4j.xml is already set to output DEBUG statements and higher logging levels
|
---|
| 577 | - So open </GS3/ext/>fedora3/server/logs/fedoragsearch.daily.log to look at debug messages in case fedoragsearch doesn't work as expected.
|
---|
| 578 |
|
---|
| 579 |
|
---|
| 580 | ********************************************************************************************************************
|
---|