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

Last change on this file since 26420 was 26420, checked in by ak19, 8 years ago

Additional corrections to README for when I tried to follow its instructions for manually creating (and building) a GS3 fedora collection.

File size: 27.1 KB
Line 
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 Deleting a Fedora GS3 collection
9
10C. The customisations that have been made for the extension
11
12D. How to manually set up Fedora 3.6.1 with Fedora GSearch 2.5 from scratch
13 Installing Fedora
14 Installing Fedora GSearch
15 Debugging
16
17
18Version:
19Greenstone 3.05
20Fedora 3.6.1
21Fedora GSearch 2.5
22
23Web services pages once installed:
24http://localhost:8383/fedora/services
25http://localhost:8383/fedoragsearch/services
26
27-- ak19, 2012
28
29
30
31********************************************************************************************************************
32 A. To install your Fedora extension for Greenstone 3 from the fedora3-gs3ext.tar.gz distribution file
33********************************************************************************************************************
34
35(Tested to work on Linux machines.)
36
370. You will need Greenstone 3.05 or a fresh checkout from SVN, already installed.
38You need a fresh x-term, one where the GS3 environment hasn't already been set up in.
39
401. Download the Fedora Extension for Greenstone 3: http://trac.greenstone.org/browser/gs3-extensions/fedora/trunk/fedora3-gs3ext.tar.gz
41
422. Save into your Greenstone3/ext folder
43
443. Untar and decompress it:
45 $ tar -xvzf fedora3-gs3ext.tar.gz
46
47This will create a fedora3 folder in your Greenstone3/ext folder.
48
494. Go to your Greenstone3 toplevel folder and now finally set up the GS3 environment:
50 $ source gs3-setup.sh
51
52This will now also have set up the fedora extension environment, such as FEDORA_HOME, FEDORA_VERSION and a PATH variable adjusted for Fedora.
53
545. Open Greenstone3/build.properties and find the section:
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
61Uncomment all these properties and change the value for the fedora password if necessary:
62
63 ##These need to be uncommented if using Fedora and Fedora GSearch with Greenstone's tomcat
64 fedora.home=${basedir}/ext/fedora3
65 fedora.maxpermsize=-XX:MaxPermSize=128m
66 fedora.password=pounamu
67
68
696. Use a terminal to go into this folder:
70 $ cd Greenstone3/ext/fedora3
71
727. 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):
73
74 $ ant -Dgsdl3.home=<type-full-path-to-your-gs3> start-fedora-install
75
76 $ ant start
77
78 $ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> continue-fedora-install
79
80 $ ant stop
81
82 $ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> finish-fedora-install
83
84
85That's it.
86Now you can start tomcat again and visit http://localhost:8383/fedora and http://localhost:8383/fedoragsearch/rest to check the pages display.
87
888. You can start creating Greenstone Fedora collections with FLI. Run FLI from the GS3 toplevel folder by typing:
89 $ ./gli/fli.sh
90
91
92
93DETAILS ON STEP 7:
94a. From your Greenstone3/ext/fedora3 folder, run:
95 $ ant -Dgsdl3.home=<type-full-path-to-your-gs3> start-fedora-install
96
97This step prepares the fedora and gsearch war files for deployment (by customising template files) and moves them into Greenstone 3's tomcat.
98
99b. Start tomcat by going into your GS3 toplevel folder and running:
100 $ ant start
101
102This step gets Greenstone's tomcat to deploy the fedora and fedoragsearch war files.
103You may want to check your Greenstone library is working by visiting http://localhost:8383/greenstone3 in your browser
104
105c. Go back into Greenstone3/ext/fedora3 and run:
106 $ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> continue-fedora-install
107
108This 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.
109
110d. Stop tomcat by going back into your GS3 toplevel folder and running:
111 $ ant stop
112
113You may want to check java instances running tomcat have indeed stopped:
114 $ ps aux | grep tomcat
115
116You 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).
117 $ kill -9 <process-id>
118
119e. Now that tomcat has stopped, go back into Greenstone3/ext/fedora3 and run:
120 ant -Dgsdl3src.home=<Full-Path-To-GS3> finish-fedora-install
121
122This 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.)
123
124
125
126When 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.
127
128Further, the Fedora extension installation process would have made tomcat deploy several webapps in packages/tomcat/webapps. The resulting folders are:
129- fedora
130- fedora-demo
131- fedoragsearch
132- fop
133- imagemanip
134- saxon
135
136(Note that the installation process will have removed the Fedora extension war files it put into packages/tomcat/webapps during installation.)
137
138
139
140********************************************************************************************************************
141 B. Manual building of fedora collections
142********************************************************************************************************************
143
144You can use FLI to create, build and preview Fedora collections using Greenstone.
145
146The same can be done manually by calling the g2f perl scripts from the command line.
147
1481. Fedora needs to be running, so ensure the Greenstone tomcat is running:
149 ant start
150
1512. Set up the GS3 environment:
152 source gs3-setup.bash
153
1543. Create a new collection with mkcol.pl. Call it "fedora1" for example
155 mkcol.pl -site localsite fedora1
156
157(Deprecated: mkcol.pl -gs3mode -collectdir /<GS3>/web/sites/localsite/collect fedora1)
158
1594. Run import and build to ingest the new collection. Make sure to use the correct host and port, as specified in your /<GS3>/build.properties file.
160
161- First put the documents you want into the import directory of your new collection.
162
163- g2f-import.pl -hostname localhost -port 8383 -password pounamu -removeold -collectdir /<GS3>/web/sites/localsite/collect fedora1
164(password may be optional at this stage, by include it for convenience)
165
166- g2f-buildcol.pl -hostname localhost -port 8383 -password pounamu -removeold -collectdir /<GS3>/web/sites/localsite/collect fedora1
167
168
169NOTE: The buildcol step would have created an index folder in the new fedora collection folder with a buildConfig.xml file in it containing the following:
170
171<buildConfig>
172 <metadataList/>
173 <serviceRackList>
174 <serviceRack name="FedoraServiceProxy" />
175 </serviceRackList>
176</buildConfig>
177
178
1795. If building the GS3 demo collection as a fedora collection:
180
181- use FLI to transfer dls to dc metadata upon Gathering the documents.
182- then before building, turn on the description_tags in the HTMLPlugin.
183
184
185IMPORTANT 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.
186If using the default GS3 demo collection, all the images -- both png and jpg alike -- need to first be resaved as their respective file types.
187Use Imagemagick to resave the many pngs, by going into each document's subfolder of the import folder and running:
188 mogrify -format png *.png
189
190Also open each folder's jpg document cover image in GIMP and resave under the same name (at 100% quality).
191
192
1936. If you ran FLI, exit it. It should stop the Greenstone server.
194
195With fedora installed, it's always good to check that the java process that launched tomcat has indeed stopped:
196 ps aux | grep "tomcat"
197
198(Since things will fail if multiple instances of this same tomcat are running, kill any java processes that are referring to tomcat.)
199
200
2017. Restart the GS3 server.
202 ant start
203
2048. To activate the collection, first visit the web page
205http://<host>:<port>/greenstone3/library?a=s&sa=a&st=collection&sn=<COLNAME>
206
2079. Then visit the collection from the Greenstone collections page
208
209
210*****************************************
211DELETING A FEDORA GS3 COLLECTION
212*****************************************
213
214Deleting 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.)
215
216
217Deleting a Fedora GS3 collection is accomplished with the following 2 steps:
218
2191. Run the g2f-deletecol.pl script over the collection to be deleted. Assuming the collection is called fedora1, you'd run:
220 g2f-deletecol.pl -hostname localhost -port 8383 -password pounamu -collectdir /<GS3>/web/sites/localsite/collect fedora1
2212. Manually delete the Greenstone collection directory from the filesystem
222
223
224To run this manually,
225- first remove the pids from the GSearch index:
226/<GS3>/packages/tomcat/webapps/fedoragsearch/client>/<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex deletePID <greenstone:fedora1-HASH010313b14474bc72b296b15f>
227
228It will ask for the fedoragsearch username and password, which by default are fedoraAdmin and pounamu, respectively.
229
230- then purge the necessary documents (pids) from the fedora repository:
231/<GS3>/ext/fedora3/client/bin>./fedora-purge.sh localhost:8383 fedoraAdmin pounamu greenstone:fedora1-HASHe14e36cba08bd41c663237 http "purging"
232
233- You can check it's all been deleted by visiting http://localhost:8383/fedora/search
234and searching for:
235
236greenstone:*
237or greenstone:<colname>*
238
239Visit http://localhost:8383/fedoragsearch/rest?operation=browseIndex
240and browse the PID field
241
242You can also visit http://localhost:8383/fedoragsearch/rest?operation=gfindObjects
243then you can search for a query term by prefixing the index field to it, e.g ds.fulltext:computers
244
245
246
247********************************************************************************************************************
248 C. The customisations that have been made for the extension
249********************************************************************************************************************
250
251This 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.
252
253The 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).
254
255Some 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/trunk/src/fedora-files and http://trac.greenstone.org/browser/gs3-extensions/fedora/trunk/src/fedoragsearch-files
256
257They 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.
258
259That'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.
260
261
2621. The customisation files for Fedora 3.6.1 are:
263
264- ./install/install.properties.in
265- ./server/config/spring/akubra-llstore.xml.in
266- ./server/config/fedora.fcfg.in
267- ./server/config/fedora-users.xml.in
268
269All 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
270- @GSDL3SRCHOME@
271- @FEDORA_HOME@ (set to gsdl3srchome/ext/fedora3)
272- @tomcatserver@
273- @tomcatport@
274- @tomcatshutdownport@
275- @fedorapassw@
276- @indexwritelocktimeout@
277
278Except 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.
279
280
2812. 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:
282
283- adjust_war_files/fedoragsearch/WEB-INF/web.xml
284- adjust_war_files/fedoragsearch/FgsConfig/fgsconfig-basic.properties.in
285- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLucene.xslt
286- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLuceneGenerated.xslt
287- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties
288- adjust_war_files/fedoragsearch/client/runRESTClient.sh
289- adjust_war_files/fedoragsearch/client/runSOAPClient.sh
290- adjust_war_files/fedoragsearch/client/runSOAPClient.bat
291
292
293All 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.
294
295
2963. 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.
297
298
299DETAILS TO STEP 2 (Fedora GSearch customisation files):
300
301a. The changes to web.xml are that the authorisation filters are commented out:
302
303<!--
304 <filter-mapping>
305 <filter-name>EnforceAuthnFilter</filter-name>
306 <servlet-name>AxisServlet</servlet-name>
307 </filter-mapping>
308 <filter-mapping>
309 <filter-name>EnforceAuthnFilter</filter-name>
310 <servlet-name>GenericSearchREST</servlet-name>
311 </filter-mapping>
312 <filter-mapping>
313 <filter-name>EnforceAuthnFilter</filter-name>
314 <url-pattern>/index.html</url-pattern>
315 </filter-mapping>
316 <filter-mapping>
317 <filter-name>EnforceAuthnFilter</filter-name>
318 <url-pattern>/rest</url-pattern>
319 </filter-mapping>
320-->
321
322
323b. 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.
324
325- 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:
326
327 # Need to run this script from its own directory instead of whichever directory it may be called from
328 thisdir="`dirname \"$0\"`"
329 thisdir="`cd \"$thisdir\" && pwd`"
330 cd "$thisdir"
331
332
333- Additions to the bat scripts are at the top and bottom:
334
335 @echo off
336
337 ::pushd "%CD%"
338 set startdir=%CD%
339 CD /D "%~dp0"
340
341 ...
342
343 :: popd
344 cd "%startdir%"
345 set startdir=
346
347
348c. The changes to fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene's foxmlToLucene.xslt and foxmlToLuceneGenerated.xslt are identical. The following xslt has been added:
349
350- Add the following namespaces to the namespace declarations at the top:
351 xmlns:ex="http://www.greenstone.org/namespace/fake/ex"
352 xmlns:dls="http://www.greenstone.org/namespace/fake/dls"
353
354- Add custom indexing for EX and DLS datastreams below the comment on datastreams:
355
356 <!-- a datastream is fetched, if its mimetype
357 can be handled, the text becomes the value of the field.
358 This is the version using PDFBox,
359 below is the new version using Apache Tika. -->
360
361 <xsl:for-each select="foxml:datastream[starts-with(@ID,'EX')]/foxml:datastreamVersion[last()]/foxml:xmlContent/ex:ex/ex:metadata">
362 <IndexField index="TOKENIZED" store="YES" termVector="YES">
363 <xsl:attribute name="IFname">
364 <xsl:value-of select="concat('ex.', @name)"/>
365 </xsl:attribute>
366 <xsl:value-of select="text()"/>
367 </IndexField>
368 </xsl:for-each>
369
370 <xsl:for-each select="foxml:datastream[starts-with(@ID,'DLS')]/foxml:datastreamVersion[last()]/foxml:xmlContent/dls:dls/dls:metadata">
371 <IndexField index="TOKENIZED" store="YES" termVector="YES">
372 <xsl:attribute name="IFname">
373 <xsl:value-of select="concat('dls.', @name)"/>
374 </xsl:attribute>
375 <xsl:value-of select="text()"/>
376 </IndexField>
377 </xsl:for-each>
378
379- 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:
380
381 <IndexField IFname="ds.fulltext" index="TOKENIZED" store="YES" termVector="YES">
382 <xsl:for-each select="//foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
383 <xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
384 <xsl:text> </xsl:text>
385 </xsl:for-each>
386 </IndexField>
387
388
389Further datastreams and metadata sets can be indexed by adding similar namespace declarations and xml elements to these 2 XSLT files.
390If 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
391
392
393d. 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.
394
395The installation process will write out this property into GSearch's FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties:
396 fgsindex.defaultWriteLockTimeout = 1000
397
398When fedoragsearch then gets deployed, this value will be propagated into:
399 <GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/index.properties
400
401
402
403********************************************************************************************************************
404 D. To manually set up Fedora with Fedora GSearch 2.5 from scratch
405********************************************************************************************************************
406
407When 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.
408
409The 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.
410
411In 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.
412
413
414********************************
415INSTALLING FEDORA
416********************************
4171. Set FEDORA_HOME=/<GS3>/ext/fedora3 in .profile (emacs ~/.profile)
418source ~/.profile
419
4202. Run fedora installer:
421 java -jar fcrepo-installer-3.6.1.jar
422
423Install by specifying to use the existing tomcat (existingTomcat), and provide the Greenstone3 tomcat stop and start ports (usually 8383 and 8305).
424Then set the existingTomcat to the Greenstone3 one: /<GS3>/packages/tomcat
425Turn on messaging, as this is necessary for Fedora GSearch.
426
427- Installation options:
428
429custom
430FEDORA_HOME
431pwd: pounamu
432host: <full-tomcat.server-host-name>
433def server context: fedora
434default false for user authentication for APIA-A
435false for SSL availability
436existingTomcat
437path to tomcat: </full-path-to-GS3>/packages/tomcat
438tomcat listen port: 8383
439tomcat shutdown port:8305
440derby:included
441upstream HTTP authentication: (default) false
442FeSL AuthZ: (default) false
443XACML policy enforcement enabled: false
444Low Level Storage: (default) akubra-fs
445Resource Index: true
446Enable Messaging: true
447Messaging Provider URI: [default is vm:(broker:(tcp://localhost:61616))]
448Deploy local services and demos: (default) true
449
450
451- The Fedora installation options used are to be found (after installation) in fedora3/install/install.properties:
452
453#Install Options
454#Fri Sep 21 15:29:29 NZST 2012
455ri.enabled=true
456messaging.enabled=false
457apia.auth.required=false
458database.jdbcDriverClass=org.apache.derby.jdbc.EmbeddedDriver
459upstream.auth.enabled=false
460ssl.available=false
461database.jdbcURL=jdbc\:derby\:/<GS3>/ext/fedora3/derby/fedora3;create\=true
462database.password=fedoraAdmin
463database.username=fedoraAdmin
464fesl.authz.enabled=false
465tomcat.shutdown.port=8305
466deploy.local.services=true
467xacml.enabled=false
468tomcat.http.port=8383
469fedora.serverHost=<full-tomcat.server-host-name>
470database=included
471database.driver=included
472fedora.serverContext=fedora
473llstore.type=akubra-fs
474tomcat.home=/<GS3>/packages/tomcat
475fedora.home=/<GS3>/ext/fedora3
476install.type=custom
477servlet.engine=existingTomcat
478fedora.admin.pass=pounamu
479
480
481- 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:
482
483fedora3/install/install.properties
484fedora3/server/config/spring/akubra-llstore.xml
485fedora3/server/config/fedora.fcfg
486fedora3/server/config/fedora-users.xml
487
488Then you would rename these files with the suffix .in
489
490
4913. 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:
492
493 diff -w /<GS3>/packages/tomcat/conf/server.xml </GS3/ext/>fedora3/install/server.xml
494
4954. Copy the fedora war files from fedora3/install into packages/tomcat/webapps
496fedora.war, fedora-demo.war, fop.war, imagemanip.war, saxon.war
497
4985. 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.
499
500There's also a xalan.jar in /<GS3>/packages/tomcat/webapps/fop/WEB-INF/lib
501So this can be copied into /<GS3>/packages/tomcat/lib/. instead of the Greenstone version.
502
5036. Create the file /<GS3>/packages/tomcat/conf/Catalina/localhost/fedora.xml
504containing:
505
506<?xml version="1.0" encoding="UTF-8"?>
507<Context>
508 <Parameter name="fedora.home" value="/<GS3>/ext/fedora3" />
509</Context>
510
511
5127. 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.
513
5148. Visit http://localhost:8383/greenstone3 and
515 http://localhost:8383/fedora
516
517to confirm both work.
518
519
520********************************
521INSTALLING FEDORA GSEARCH
522********************************
5231. Download Fedora GSearch 2.5
524
5252. Stop tomcat. Copy the fedoragsearch.war files into /<GS3>/packages/tomcat/webapps
526
527If Fedora was not installed with messaging turned on, then turn it on in now /<GS3>/ext/fedora3/server/config/fedora.fcfg:
528
529 <module role="org.fcrepo.server.messaging.Messaging" class="org.fcrepo.server.messaging.MessagingModule">
530 <comment>Fedora's Java Messaging Service (JMS) Module</comment>
531 <param name="enabled" value="true"/>
532 ...
533
5343. Update the following properties in /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/fgsconfig-basic.properties
535
536gsearchBase=http://<tomcat.server>:8383
537gsearchUser=fedoraAdmin
538gsearchPass=<fedora.password>
539local.FEDORA_HOME=/<GS3>/ext/fedora3
540finalConfigPath=/<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes
541
542fedoraBase=http://<tomcat.server>:8383
543fedoraPass=<fedora.password>
544
5454. Add the edited foxmlToLucene.xslt & foxmlToLuceneGenerated.xslt files to /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene
546
5475. Add the edited runRESTClient.sh (and runSOAPClient.sh, runRESTClient.bat) to /<GS3>/packages/tomcat/webapps/fedoragsearch/client
548And give them execute permissions, unless they already have it.
549
5506. In a text editor, open up /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/web.xml
551and comment out the authentication filters (one or two of these is probably all that is necessary):
552
553<!--
554 <filter-mapping>
555 <filter-name>EnforceAuthnFilter</filter-name>
556 <servlet-name>AxisServlet</servlet-name>
557 </filter-mapping>
558 <filter-mapping>
559 <filter-name>EnforceAuthnFilter</filter-name>
560 <servlet-name>GenericSearchREST</servlet-name>
561 </filter-mapping>
562 <filter-mapping>
563 <filter-name>EnforceAuthnFilter</filter-name>
564 <url-pattern>/index.html</url-pattern>
565 </filter-mapping>
566 <filter-mapping>
567 <filter-name>EnforceAuthnFilter</filter-name>
568 <url-pattern>/rest</url-pattern>
569 </filter-mapping>
570-->
571
572Maybe what I really need to comment out is:
573 <filter>
574 <filter-name>EnforceAuthnFilter</filter-name>
575 <filter-class>org.fcrepo.server.security.servletfilters.FilterEnforceAuthn</filter-class>
576 </filter>
577
5787. Start tomcat to have it deploy fedoragsearch.
579This will unpack fedoragsearch.
580
5818. 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:
582
583 <GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig>ant -f fgsconfig-basic.xml
584
5859. 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]")
586
587 ./<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex createEmpty FgsIndex
588
58910. Check fedoragsearch has been properly installed by visiting:
590http://localhost:8383/fedoragsearch/rest
591
59210. 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.
593
594
595********************************
596DEBUGGING
597********************************
598
599Logs to consult when debugging:
600
6011. Check /<GS3>/packages/tomcat/logs/catalina.out
602
6032. </GS3/ext/>fedora3/server/logs/fedora.log for Fedora error logging.
604
6053. 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):
606
607- /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/log4j.xml is already set to output DEBUG statements and higher logging levels
608- So open </GS3/ext/>fedora3/server/logs/fedoragsearch.daily.log to look at debug messages in case fedoragsearch doesn't work as expected.
609
610
611********************************************************************************************************************
Note: See TracBrowser for help on using the repository browser.