website/zebra.txt in zcc-0.1.0 vs website/zebra.txt in zcc-0.2.0
- old
+ new
@@ -1,77 +1,41 @@
h1. Very simple setup of local zebra server
-These instructions are probably incomplete for this release. Please let me know if you find errors.
+These instructions are probably still less complete than I would like them to be. Please let me know if you find errors.
Install all the dependencies to zcc and confirm that it is working.
-Install "zebra":http://www.indexdata.dk/zebra/ If using Debian or RedHat it is suggested that you add the indexdata repositories.
+Install the latest "zebra":http://www.indexdata.dk/zebra/ If using Debian or RedHat it is suggested that you add the indexdata repositories or build from source. Older versions of zebra are no longer compatible with the example zebra.cfg.
-You may have already moved the zebra directory into your .zcc directory. If not do the following:
+You may have already moved the zebra directory into your root zcc directory. If not do something like the following:
<pre syntax="ruby">
$ cd ~/.zcc
$ cp -r /var/lib/gems/1.8/gems/zcc-0.0.4/examples/zebra .
</pre>
Now change into the zebra directory:
<pre syntax="ruby>
$ cd zebra
</pre>
-Now edit the zebra.cfg file. You must replace 'jason' with your username in all places.
+Now you may need to edit the zebra.cfg file, but it is configured already to work with zcc. Stay in the zebra directory and run:
-<pre>
-$ zebraidx update records
-</pre>
-
-If the initial record update goes off without warnings or errors try this to start up the server in daemon mode (silent mode that runs in the background).
-
<pre syntax="ruby">
-$ zebrasrv -D
+$ zebrasrv @:9998 -l zebrasrv.log -D
</pre>
-You may see loaded filter module messages and then be returned to a prompt. Now you can try it out:
+Or you can configure your zcc.yaml configuration file to automatically start the zebra server on startup and stop it when you quit zcc.
-<pre syntax="ruby">
-$ yaz-client localhost:9999/zcc
-Z> f @attr 1=4 bicycle
-Z> show 1
-Sent presentRequest (1+1).
-Records: 1
-[zcc]Record type: USmarc
-00907pam a2200241 a 4500
-001 3487522
-005 19950117081431.7
-008 940606s1994 cauab b 001 0 eng
-035 $9 (DLC) 94026226
-906 $a 7 $b cbc $c orignew $d 1 $e ocip $f 19 $g y-gencatlg
-955 $a pc05 RUSH to sa00 06-06-94; sj06 06-07-94; sj09 06-07-94; sj04 06-08-94; CIP ver. ta06; to SL 01-17-95
-010 $a 94026226
-020 $a 0899971741 (pbk.)
-040 $a DLC $c DLC $d DLC
-050 00 $a GV1044 $b .B88 1994
-100 1 $a Butterman, Steve.
-245 10 $a Bicycle touring : $b how to prepare for long rides / $c Steve Butterman.
-260 $a Berkeley, CA : $b Wilderness Press, $c c1994.
-300 $a viii, 88 p. : $b ill., map ; $c 22 cm.
-504 $a Includes bibliographical references (p. 78) and index.
-650 0 $a Bicycle touring.
-650 0 $a Bicycle touring $x Equipment and supplies.
-991 $b c-GenColl $h GV1044 $i .B88 1994 $t Copy 1 $w BOOKS
-</pre>
-
-If you see a record displayed then it works! Congratulations.
-
Now you can configure your local zserver in the zcc.yaml file in ~/.zcc. Add (or uncomment) this line if necessary:
-<pre>- [localhost, 9999, zcc, 0]</pre>
+<pre>- [localhost, 9998, zcc, 0]</pre>
My suggestion is to put this server in group 0 (zero) of your zservers to check in see whether you already have an appropriate record.
-When you want to add records to the zebra database manually you will need to return to your ~/.zcc/zebra directory and reindex the whole bunk of records. Just drop a UTF-8 encoded MARC21 record (IS02709) anywhere in the directory below ~/.zcc/zebra/records and it will be indexed after running this:
+If you want to add records to the zebra database manually you will need to return to your ~/.zcc/zebra directory and reindex the whole bunk of records. Just drop a UTF-8 encoded MARCXML record anywhere in the directory below ~/.zcc/zebra/records. The record should contain a 901a field as a unique identifier and it will be indexed after running this:
<pre syntax="ruby">$ cd ~/.zcc/zebra
$ zebraidx update records</pre>
-To make this the default place to save records choose 'zebra' under save_record_syntax in zcc.yaml. This reindexing could take some time, especially if you have a large number of files, though zebra does index quickly. Right now the database is reindexed after each insertion of a record. Not optimal and I'm looking at other ways to do this (only reindex on quit?) We would like to add extended services for record insert and update to "ruby-zoom":http://ruby-zoom.rubyforge.org/ Currently the C-binding is incomplete. Please let me know if you're a developer willing to do the work (jronallo+zoom@gmail.com).
+This reindexing could take some time, especially if you have a large number of files, though zebra does index quickly. With version 0.2.0 ZCC now uses ruby-zoom (0.4.0+) extended services for safe insert of records. To make the zebra server a default place to save records enter 'zebra' (no quotes) under save_record_syntax in zcc.yaml.
-If you shutdown your computer make sure to restart the zebrasrv!
+If you shutdown your computer make sure to restart the zebrasrv or configure the zcc.yaml file to bring it back up for you!
-If port 9999, the default zebrasrv port, is exposed to the world, others may be able to search your database as well. You may find this a good thing :) or it may be a security risk? You can specify a different port on the command line. See the "zebra docs":http://www.indexdata.dk/zebra/doc/ for more information on changing the port and other configuration options for zebra. What you have been presented with here is just the simplest quickest way of getting I've found for getting zebra for zcc up and running on my Debian systems.
+If port 9998, the default zebrasrv port for zcc, is exposed to the world, others may be able to search your database as well. You may find this a good thing :) or it may be a security risk? You can specify a different port on the command line. See the "zebra docs":http://www.indexdata.dk/zebra/doc/ for more information on changing the port and other configuration options for zebra. What you have been presented with here is just the simplest quickest way of getting I've found for getting zebra for zcc up and running on my Debian systems.