source: gs3-extensions/fedora/trunk/src/README@ 26413

Last change on this file since 26413 was 26413, checked in by ak19, 11 years ago

Restructured GS3 Fedora extension to have a trunk folder with a src subfolder.

File size: 26.3 KB
RevLine 
[26380]1********************************************************************************************************************
2 CONTENTS
3********************************************************************************************************************
4
5A. To install your GS3 Fedora extension from fedora3-gs3ext.tar.gz
6
7B. How to manually build fedora collections
8
9C. The customisations that have been made for the extension
10
11D. 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
17Version:
18Greenstone 3.05
19Fedora 3.6.1
20Fedora GSearch 2.5
21
22Web services pages once installed:
23http://localhost:8383/fedora/services
24http://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
360. You will need Greenstone 3.05 or a fresh checkout from SVN, already installed.
37
381. Download the Fedora Extension for Greenstone 3: http://trac.greenstone.org/browser/gs3-extensions/fedora/fedora3-gs3ext.tar.gz
39
402. Save into your Greenstone3/ext folder
41
423. Untar and decompress it:
43 $ tar -xvzf fedora3-gs3ext.tar.gz
44
454. This will create a fedora3 folder in your Greenstone3/ext folder.
46
475. 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
54Uncomment 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
626. Use a terminal to go into this folder:
63 $ cd Greenstone3/ext/fedora3
64
657. 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
78That's it.
79Now you can start tomcat again and visit http://localhost:8383/fedora and http://localhost:8383/fedoragsearch/rest to check the pages display.
80
818. 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
86DETAILS ON STEP 7:
87a. From your Greenstone3/ext/fedora3 folder, run:
88 $ ant -Dgsdl3.home=<type-full-path-to-your-gs3> start-fedora-install
89
90This step prepares the fedora and gsearch war files for deployment (by customising template files) and moves them into Greenstone 3's tomcat.
91
92b. Start tomcat by going into your GS3 toplevel folder and running:
93 $ ant start
94
95This step gets Greenstone's tomcat to deploy the fedora and fedoragsearch war files.
96You may want to check your Greenstone library is working by visiting http://localhost:8383/greenstone3 in your browser
97
98c. Go back into Greenstone3/ext/fedora3 and run:
99 $ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> continue-fedora-install
100
101This 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
103d. Stop tomcat by going back into your GS3 toplevel folder and running:
104 $ ant stop
105
106You may want to check java instances running tomcat have indeed stopped:
107 $ ps aux | grep tomcat
108
109You 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
112e. 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
115This 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
119When 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
121Further, 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
137You can use FLI to create, build and preview Fedora collections using Greenstone.
138
139The same can be done manually by calling the g2f perl scripts from the command line.
140
1411. Fedora needs to be running, so ensure the Greenstone tomcat is running:
142 ant start
143
1442. Set up the GS3 environment:
145 source gs3-setup.bash
146
1473. Create a new collection with mkcol.pl. Call it "fedora1" for example
148 mkcol.pl -collectdir /<GS3>/web/sites/localsite/collect fedora1
149
1504. 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
[26413]1605. If building the GS3 demo collection as a fedora collection:
161
[26380]162- use FLI to transfer dls to dc metadata upon Gathering the documents.
163- then before building, turn on the description_tags in the HTMLPlugin.
164
[26413]165
166IMPORTANT NOTE: Fedora GSearch for some reason doesn't like the images in the default GS3 demo collection and is unable to index the documents because of them.
167If using the default GS3 demo collection, all the images -- both png and jpg alike -- need to first be resaved as their respective file types.
168Use Imagemagick to resave the many pngs, by going into each document's subfolder of the import folder and running:
169 mogrify -format png *.png
170
171Also open each folder's jpg document cover image in GIMP and resave under the same name (at 100% quality).
172
173
[26380]1746. If you ran FLI, exit it. It should stop the Greenstone server.
175
176With fedora installed, it's always good to check that the java process that launched tomcat has indeed stopped:
177 ps aux | grep "tomcat"
178
179(Since things will fail if multiple instances of this same tomcat are running, kill any java processes that are referring to tomcat.)
180
1817. Create an index folder in the new fedora collection folder. Create a buildConfig.xml file in it containing the following:
182
183<buildConfig>
184 <metadataList/>
185 <serviceRackList>
186 <serviceRack name="FedoraServiceProxy" />
187 </serviceRackList>
188</buildConfig>
189
190
1918. Restart the GS3 server.
192 ant start
193
1949. Visit the collection from the Greenstone collections page
195
[26382]19610. 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]197
[26382]198Deleting a Fedora GS3 collection is accomplished with the following 2 steps:
[26384]199- Run the g2f-deletecol.pl script over the collection to be deleted. Assuming the collection is called fedora1, you'd run:
[26391]200 g2f-deletecol.pl -hostname localhost -port 8383 -password pounamu -collectdir /<GS3>/web/sites/localsite/collect fedora1
[26382]201- manually delete the Greenstone collection directory from the filesystem
[26380]202
[26382]203
[26391]204To run this manually,
205- first remove the pids from the GSearch index:
206/<GS3>/packages/tomcat/webapps/fedoragsearch/client>/<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex deletePID greenstone:fedora1-HASH010313b14474bc72b296b15f
[26382]207
[26391]208It will ask for the fedoragsearch username and password, which by default are fedoraAdmin and pounamu, respectively.
209
210- then purge the necessary documents (pids) from the fedora repository:
211/<GS3>/ext/fedora3/client/bin>./fedora-purge.sh localhost:8383 fedoraAdmin pounamu greenstone:fedora1-HASHe14e36cba08bd41c663237 http "purging"
212
213- You can check it's all been deleted by visiting http://localhost:8383/fedora/search
214and searching for:
215
216greenstone:*
217or greenstone:<colname>*
218
219Visit http://localhost:8383/fedoragsearch/rest?operation=browseIndex
220and browse the PID field
221
222You can also visit http://localhost:8383/fedoragsearch/rest?operation=gfindObjects
223then you can search for a query term by prefixing the index field to it, e.g ds.fulltext:computers
224
225
[26380]226********************************************************************************************************************
227 C. The customisations that have been made for the extension
228********************************************************************************************************************
229
230This 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.
231
232The 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).
233
234Some 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
235
236They 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.
237
238That'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.
239
240
2411. The customisation files for Fedora 3.6.1 are:
242
243- ./install/install.properties.in
244- ./server/config/spring/akubra-llstore.xml.in
245- ./server/config/fedora.fcfg.in
246- ./server/config/fedora-users.xml.in
247
248All 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]249- @GSDL3SRCHOME@
250- @FEDORA_HOME@ (set to gsdl3srchome/ext/fedora3)
251- @tomcatserver@
252- @tomcatport@
253- @tomcatshutdownport@
254- @fedorapassw@
[26391]255- @indexwritelocktimeout@
[26380]256
[26391]257Except 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]258
[26391]259
[26380]2602. 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:
261
262- adjust_war_files/fedoragsearch/WEB-INF/web.xml
263- adjust_war_files/fedoragsearch/FgsConfig/fgsconfig-basic.properties.in
264- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLucene.xslt
265- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLuceneGenerated.xslt
[26391]266- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties
[26380]267- adjust_war_files/fedoragsearch/client/runRESTClient.sh
268- adjust_war_files/fedoragsearch/client/runSOAPClient.sh
269- adjust_war_files/fedoragsearch/client/runSOAPClient.bat
270
[26391]271
[26380]272All 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.
273
274
2753. 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.
276
277
278DETAILS TO STEP 2 (Fedora GSearch customisation files):
279
280a. The changes to web.xml are that the authorisation filters are commented out:
281
[26384]282<!--
283 <filter-mapping>
[26380]284 <filter-name>EnforceAuthnFilter</filter-name>
285 <servlet-name>AxisServlet</servlet-name>
286 </filter-mapping>
287 <filter-mapping>
288 <filter-name>EnforceAuthnFilter</filter-name>
289 <servlet-name>GenericSearchREST</servlet-name>
290 </filter-mapping>
291 <filter-mapping>
292 <filter-name>EnforceAuthnFilter</filter-name>
293 <url-pattern>/index.html</url-pattern>
294 </filter-mapping>
295 <filter-mapping>
296 <filter-name>EnforceAuthnFilter</filter-name>
297 <url-pattern>/rest</url-pattern>
298 </filter-mapping>
299-->
300
301
302b. 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.
303
304- 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:
305
306 # Need to run this script from its own directory instead of whichever directory it may be called from
307 thisdir="`dirname \"$0\"`"
308 thisdir="`cd \"$thisdir\" && pwd`"
309 cd "$thisdir"
310
311
312- Additions to the bat scripts are at the top and bottom:
313
314 @echo off
315
316 ::pushd "%CD%"
317 set startdir=%CD%
318 CD /D "%~dp0"
319
320 ...
321
322 :: popd
323 cd "%startdir%"
324 set startdir=
325
326
327c. The changes to fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene's foxmlToLucene.xslt and foxmlToLuceneGenerated.xslt are identical. The following xslt has been added:
328
329- Add the following namespaces to the namespace declarations at the top:
330 xmlns:ex="http://www.greenstone.org/namespace/fake/ex"
331 xmlns:dls="http://www.greenstone.org/namespace/fake/dls"
332
333- Add custom indexing for EX and DLS datastreams below the comment on datastreams:
334
335 <!-- a datastream is fetched, if its mimetype
336 can be handled, the text becomes the value of the field.
337 This is the version using PDFBox,
338 below is the new version using Apache Tika. -->
339
340 <xsl:for-each select="foxml:datastream[starts-with(@ID,'EX')]/foxml:datastreamVersion[last()]/foxml:xmlContent/ex:ex/ex:metadata">
341 <IndexField index="TOKENIZED" store="YES" termVector="YES">
342 <xsl:attribute name="IFname">
343 <xsl:value-of select="concat('ex.', @name)"/>
344 </xsl:attribute>
345 <xsl:value-of select="text()"/>
346 </IndexField>
347 </xsl:for-each>
348
349 <xsl:for-each select="foxml:datastream[starts-with(@ID,'DLS')]/foxml:datastreamVersion[last()]/foxml:xmlContent/dls:dls/dls:metadata">
350 <IndexField index="TOKENIZED" store="YES" termVector="YES">
351 <xsl:attribute name="IFname">
352 <xsl:value-of select="concat('dls.', @name)"/>
353 </xsl:attribute>
354 <xsl:value-of select="text()"/>
355 </IndexField>
356 </xsl:for-each>
357
358- 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:
359
360 <IndexField IFname="ds.fulltext" index="TOKENIZED" store="YES" termVector="YES">
361 <xsl:for-each select="//foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
362 <xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
363 <xsl:text> </xsl:text>
364 </xsl:for-each>
365 </IndexField>
366
367
368Further datastreams and metadata sets can be indexed by adding similar namespace declarations and xml elements to these 2 XSLT files.
369If 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
370
371
[26391]372d. 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]373
[26391]374The installation process will write out this property into GSearch's FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties:
375 fgsindex.defaultWriteLockTimeout = 1000
376
377When fedoragsearch then gets deployed, this value will be propagated into:
378 <GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/index.properties
379
380
381
[26380]382********************************************************************************************************************
383 D. To manually set up Fedora with Fedora GSearch 2.5 from scratch
384********************************************************************************************************************
385
[26384]386When 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]387
388The 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.
389
[26384]390In 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]391
392
393********************************
394INSTALLING FEDORA
395********************************
3961. Set FEDORA_HOME=/<GS3>/ext/fedora3 in .profile (emacs ~/.profile)
397source ~/.profile
398
3992. Run fedora installer:
400 java -jar fcrepo-installer-3.6.1.jar
401
402Install by specifying to use the existing tomcat (existingTomcat), and provide the Greenstone3 tomcat stop and start ports (usually 8383 and 8305).
403Then set the existingTomcat to the Greenstone3 one: /<GS3>/packages/tomcat
404Turn on messaging, as this is necessary for Fedora GSearch.
405
406- Installation options:
407
408custom
409FEDORA_HOME
410pwd: pounamu
411host: <full-tomcat.server-host-name>
412def server context: fedora
413default false for user authentication for APIA-A
414false for SSL availability
415existingTomcat
416path to tomcat: </full-path-to-GS3>/packages/tomcat
417tomcat listen port: 8383
418tomcat shutdown port:8305
419derby:included
420upstream HTTP authentication: (default) false
421FeSL AuthZ: (default) false
422XACML policy enforcement enabled: false
423Low Level Storage: (default) akubra-fs
424Resource Index: true
425Enable Messaging: true
426Messaging Provider URI: [default is vm:(broker:(tcp://localhost:61616))]
427Deploy local services and demos: (default) true
428
429
430- The Fedora installation options used are to be found (after installation) in fedora3/install/install.properties:
431
432#Install Options
433#Fri Sep 21 15:29:29 NZST 2012
434ri.enabled=true
435messaging.enabled=false
436apia.auth.required=false
437database.jdbcDriverClass=org.apache.derby.jdbc.EmbeddedDriver
438upstream.auth.enabled=false
439ssl.available=false
440database.jdbcURL=jdbc\:derby\:/<GS3>/ext/fedora3/derby/fedora3;create\=true
441database.password=fedoraAdmin
442database.username=fedoraAdmin
443fesl.authz.enabled=false
444tomcat.shutdown.port=8305
445deploy.local.services=true
446xacml.enabled=false
447tomcat.http.port=8383
448fedora.serverHost=<full-tomcat.server-host-name>
449database=included
450database.driver=included
451fedora.serverContext=fedora
452llstore.type=akubra-fs
453tomcat.home=/<GS3>/packages/tomcat
454fedora.home=/<GS3>/ext/fedora3
455install.type=custom
456servlet.engine=existingTomcat
457fedora.admin.pass=pounamu
458
459
460- 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:
461
462fedora3/install/install.properties
463fedora3/server/config/spring/akubra-llstore.xml
464fedora3/server/config/fedora.fcfg
465fedora3/server/config/fedora-users.xml
466
467Then you would rename these files with the suffix .in
468
469
4703. 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:
471
472 diff -w /<GS3>/packages/tomcat/conf/server.xml </GS3/ext/>fedora3/install/server.xml
473
4744. Copy the fedora war files from fedora3/install into packages/tomcat/webapps
475fedora.war, fedora-demo.war, fop.war, imagemanip.war, saxon.war
476
4775. 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.
478
479There's also a xalan.jar in /<GS3>/packages/tomcat/webapps/fop/WEB-INF/lib
480So this can be copied into /<GS3>/packages/tomcat/lib/. instead of the Greenstone version.
481
4826. Create the file /<GS3>/packages/tomcat/conf/Catalina/localhost/fedora.xml
483containing:
484
485<?xml version="1.0" encoding="UTF-8"?>
486<Context>
487 <Parameter name="fedora.home" value="/<GS3>/ext/fedora3" />
488</Context>
489
490
4917. 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.
492
4938. Visit http://localhost:8383/greenstone3 and
494 http://localhost:8383/fedora
495
496to confirm both work.
497
498
499********************************
500INSTALLING FEDORA GSEARCH
501********************************
5021. Download Fedora GSearch 2.5
503
5042. Stop tomcat. Copy the fedoragsearch.war files into /<GS3>/packages/tomcat/webapps
505
506If Fedora was not installed with messaging turned on, then turn it on in now /<GS3>/ext/fedora3/server/config/fedora.fcfg:
507
508 <module role="org.fcrepo.server.messaging.Messaging" class="org.fcrepo.server.messaging.MessagingModule">
509 <comment>Fedora's Java Messaging Service (JMS) Module</comment>
510 <param name="enabled" value="true"/>
511 ...
512
5133. Update the following properties in /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/fgsconfig-basic.properties
514
515gsearchBase=http://<tomcat.server>:8383
516gsearchUser=fedoraAdmin
517gsearchPass=<fedora.password>
518local.FEDORA_HOME=/<GS3>/ext/fedora3
519finalConfigPath=/<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes
520
521fedoraBase=http://<tomcat.server>:8383
522fedoraPass=<fedora.password>
523
5244. Add the edited foxmlToLucene.xslt & foxmlToLuceneGenerated.xslt files to /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene
525
5265. Add the edited runRESTClient.sh (and runSOAPClient.sh, runRESTClient.bat) to /<GS3>/packages/tomcat/webapps/fedoragsearch/client
527And give them execute permissions, unless they already have it.
528
5296. In a text editor, open up /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/web.xml
530and comment out the authentication filters (one or two of these is probably all that is necessary):
531
532<!--
533 <filter-mapping>
534 <filter-name>EnforceAuthnFilter</filter-name>
535 <servlet-name>AxisServlet</servlet-name>
536 </filter-mapping>
537 <filter-mapping>
538 <filter-name>EnforceAuthnFilter</filter-name>
539 <servlet-name>GenericSearchREST</servlet-name>
540 </filter-mapping>
541 <filter-mapping>
542 <filter-name>EnforceAuthnFilter</filter-name>
543 <url-pattern>/index.html</url-pattern>
544 </filter-mapping>
545 <filter-mapping>
546 <filter-name>EnforceAuthnFilter</filter-name>
547 <url-pattern>/rest</url-pattern>
548 </filter-mapping>
549-->
550
551Maybe what I really need to comment out is:
552 <filter>
553 <filter-name>EnforceAuthnFilter</filter-name>
554 <filter-class>org.fcrepo.server.security.servletfilters.FilterEnforceAuthn</filter-class>
555 </filter>
556
5577. Start tomcat to have it deploy fedoragsearch.
558This will unpack fedoragsearch.
559
5608. 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:
561
[26404]562 <GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig>ant -f fgsconfig-basic.xml
[26380]563
[26404]5649. 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]")
565
566 ./<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex createEmpty FgsIndex
567
56810. Check fedoragsearch has been properly installed by visiting:
[26380]569http://localhost:8383/fedoragsearch/rest
570
57110. 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.
572
573
574********************************
575DEBUGGING
576********************************
577
578Logs to consult when debugging:
579
5801. Check /<GS3>/packages/tomcat/logs/catalina.out
581
5822. </GS3/ext/>fedora3/server/logs/fedora.log for Fedora error logging.
583
[26384]5843. 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):
585
[26380]586- /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/log4j.xml is already set to output DEBUG statements and higher logging levels
587- So open </GS3/ext/>fedora3/server/logs/fedoragsearch.daily.log to look at debug messages in case fedoragsearch doesn't work as expected.
588
589
590********************************************************************************************************************
Note: See TracBrowser for help on using the repository browser.