pick your script
[zcc.git] / website / zebra.html
blob3f0b74a19ff9a37db7a8ab36e64c43dbe240dbdf
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <title>
8 Very simple setup of local zebra server
9 </title>
10 <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11 <style>
13 </style>
14 <script type="text/javascript">
15 window.onload = function() {
16 settings = {
17 tl: { radius: 10 },
18 tr: { radius: 10 },
19 bl: { radius: 10 },
20 br: { radius: 10 },
21 antiAlias: true,
22 autoPad: true,
23 validTags: ["div"]
25 var versionBox = new curvyCorners(settings, document.getElementById("version"));
26 versionBox.applyCornersToAll();
28 </script>
29 </head>
30 <body>
31 <div id="main">
33 <h1>Very simple setup of local zebra server</h1>
34 <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/zcc"; return false'>
35 <p>Get Version</p>
36 <a href="http://rubyforge.org/projects/zcc" class="numbers">0.2.0</a>
37 </div>
38 <p>These instructions are probably incomplete for this release. Please let me know if you find errors.</p>
41 <p>Install all the dependencies to zcc and confirm that it is working.</p>
44 <p>Install <a href="http://www.indexdata.dk/zebra/">zebra</a> If using Debian or RedHat it is suggested that you add the indexdata repositories.</p>
47 You may have already moved the zebra directory into your .zcc directory. If not do the following:
48 <pre syntax="ruby">
49 $ cd ~/.zcc
50 $ cp -r /var/lib/gems/1.8/gems/zcc-0.0.4/examples/zebra .
51 </pre>
53 Now change into the zebra directory:
54 <pre syntax="ruby>
55 $ cd zebra
56 </pre>
58 <p>Now edit the zebra.cfg file. You must replace &#8216;jason&#8217; with your username in all places.</p>
61 <pre>
62 $ zebraidx update records
63 </pre>
65 <p>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).</p>
68 <pre syntax="ruby">
69 $ zebrasrv -D
70 </pre>
72 <p>You may see loaded filter module messages and then be returned to a prompt. Now you can try it out:</p>
75 <pre syntax="ruby">
76 $ yaz-client localhost:9999/zcc
77 Z&gt; f @attr 1=4 bicycle
78 Z&gt; show 1
79 Sent presentRequest (1+1).
80 Records: 1
81 [zcc]Record type: USmarc
82 00907pam a2200241 a 4500
83 001 3487522
84 005 19950117081431.7
85 008 940606s1994 cauab b 001 0 eng
86 035 $9 (DLC) 94026226
87 906 $a 7 $b cbc $c orignew $d 1 $e ocip $f 19 $g y-gencatlg
88 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
89 010 $a 94026226
90 020 $a 0899971741 (pbk.)
91 040 $a DLC $c DLC $d DLC
92 050 00 $a GV1044 $b .B88 1994
93 100 1 $a Butterman, Steve.
94 245 10 $a Bicycle touring : $b how to prepare for long rides / $c Steve Butterman.
95 260 $a Berkeley, CA : $b Wilderness Press, $c c1994.
96 300 $a viii, 88 p. : $b ill., map ; $c 22 cm.
97 504 $a Includes bibliographical references (p. 78) and index.
98 650 0 $a Bicycle touring.
99 650 0 $a Bicycle touring $x Equipment and supplies.
100 991 $b c-GenColl $h GV1044 $i .B88 1994 $t Copy 1 $w BOOKS
101 </pre>
103 <p>If you see a record displayed then it works! Congratulations.</p>
106 Now you can configure your local zserver in the zcc.yaml file in ~/.zcc. Add (or uncomment) this line if necessary:
107 <pre>- [localhost, 9999, zcc, 0]</pre>
108 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.
110 <p>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 <span class="caps">UTF</span>-8 encoded <span class="caps">MARC21</span> record (IS02709) anywhere in the directory below ~/.zcc/zebra/records and it will be indexed after running this:</p>
113 <pre syntax="ruby">$ cd ~/.zcc/zebra
114 $ zebraidx update records</pre>
116 <p>To make this the default place to save records choose &#8216;zebra&#8217; 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&#8217;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 <a href="http://ruby-zoom.rubyforge.org/">ruby-zoom</a> Currently the C-binding is incomplete. Please let me know if you&#8217;re a developer willing to do the work (jronallo+zoom@gmail.com).</p>
119 <p>If you shutdown your computer make sure to restart the zebrasrv!</p>
122 <p>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 <a href="http://www.indexdata.dk/zebra/doc/">zebra docs</a> 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&#8217;ve found for getting zebra for zcc up and running on my Debian systems.</p>
124 </div>
126 <!-- insert site tracking codes here, like Google Urchin -->
128 </body>
129 </html>