Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial on setting up Zebra: A Z39.50 Server ARD Prasad DRTC Indian Statistical Institute Bangalore.

Similar presentations


Presentation on theme: "Tutorial on setting up Zebra: A Z39.50 Server ARD Prasad DRTC Indian Statistical Institute Bangalore."— Presentation transcript:

1 Tutorial on setting up Zebra: A Z39.50 Server ARD Prasad DRTC Indian Statistical Institute Bangalore

2 Open Source Software Can be downloaded from –http://www.indexdata.dkhttp://www.indexdata.dk Written in ANSI C Can be compiled with gcc Runs on any flavor of Unix including Linux

3 Features of Zebra Server Can handle large files across many disks Records can be deleted or updated on the fly Can handle many input formats like SGML, XML, ISO-2709 Search supports Boolean, truncation, regular expressions, approximate matching

4 Features …

5 Extra Utilities Yaz: makes Zebra z39.50/SRW compliant Iconv: converts MARC data into various character encoding systems including UNICODE Expat: An XML parser useful for indexing records in XML format Perl Modules: for Zebra Perl filter facility Tcl: Record filters for Zebra

6 Two ways of Installation Using ‘rpm’ or 'deb' files Using tar.gz files ‘rpm’ / 'deb' installation is easier, but OS and version dependent tar.gz installation is complex but safer

7 RPM Installation Download rpm file from indexdata Issue the following command as root user –rpm –ivh idzebraxxx.rpm –Where xxx is version number

8 Debian Installation deb http://ftp.indexdata.dk/debian xxx main deb-src http://ftp.indexdata.dk/debian xx main NOTE: replace xxxxx by the version of debian e.g. etch lenny etc. Add the above lines in /etc/apt/sources.list

9 Getting the Key wget http://ftp.indexdata.dk/debian/indexdata.asc sudo apt-key add indexdata.asc

10 Ubuntu installation deb http://ftp.indexdata.dk/ubuntu xxx main deb-src http://ftp.indexdata.dk/ubuntu xxx main NOTE: replace xxx by Ubuntu version and add the above lines in /etc/apt/sources.list

11 Getting the Key wget http://ftp.indexdata.dk/debian/indexdata.asc sudo apt-key add indexdata.asc

12 tar.gz file installation Download idzebra-xxx.tar.gz file Unzip and untar –tar zxvf idzebra-xxx.tar.gz cd idzebra-xxx./configure –help./configure Make Make install

13 Files will be located in … /usr/bin /usr/include /usr/share/idzebra /usr/share/man

14 Optionally… If you are not the system administrator, you can run zebra server from you home directory. Run the following commands –tar zxvf idzebra-xxx.tar.gz –cd idzebra-xxx –./configure –prefix=$HOME –make –make install

15 Directory structure $HOME/bin –Will have zebraidx and zebrasrv $HOME/include –Include files $HOME/share –Manual pages

16 Testing with MARC21 cd idzebra-xxx/test/usmarc You should see… –zebra.cfg (configuration file) –records (directory ) Records directory will be having a file called ‘sample-marc’ ‘sample-marc’ contains MARC21 records in ISO- 2709 format

17 Generating the index Run the following command –zebraidx update records Index files are created with the extension ‘.mf’ This is essential for search Now you can start the z39.50 server

18 Starting Z39.50 Server Run the following command –zebrasrv You will see the following message 09:35:09-09/12 [log] zebra_start zebra.cfg 1.3.32 09:35:09-09/12 [server] Adding dynamic listener on tcp:@:9999 id=0 09:35:09-09/12 [server] Starting server zebrasrv pid=8856 1 st Line: version number of the zebra server 2 nd Line: zebra server is running on port 9999 3 rd Line: Process id of program is 8856

19 Testing with MARCXML cd test/marcxml You will see marcxml files –m1.xml, m2.xml, m3.xml Create a directory called ‘records’ and copy xml files into it –cd records –cp *.xml records Note: here each record is placed in a separate file, unlike the iso-2709 files where all the records are placed in one file

20 Generating Index and Running the server It is similar to the earlier approach Run the following commands –zebraidx update records –zebrasrv

21 Main commands Zebrasrv: Server and Search Engine Zebraidx: indexing tool Normally stored in /usr/bin If you are not super user and installed from your home directory, these files will be in $HOME/bin

22 Z39.50 server for your data Get your MARC21 records either in ISO- 2709 format or MARCXML Place them in a directory Run zebraidx and zebrasrv NOTE: In case of ISO-2709 format, all the records are in one file. Where as in case of MARCXML each record is in a separate XML file

23 zebraidx syntax zebraidx [ -options ] command [ file... ] Command: –update directory (update the register with the files in directory. Ex: update records means reads iso or xml files in the directory called ‘records’) –delete directory (remove the records corresponding to the files in directory)

24 zebraidx cont… Commands create database (Ex: ‘create drtc’. Creates a database called ‘drtc’, which can be accessed by that name using a z39.50 client. If no database name is given, the database will be called ‘default’ Drop database

25 zebrasrv options

26 iconv

27 Yaz-marcdump


Download ppt "Tutorial on setting up Zebra: A Z39.50 Server ARD Prasad DRTC Indian Statistical Institute Bangalore."

Similar presentations


Ads by Google