[Koha] How to set up SRU Server on Koha
Magnus Enger
magnus at enger.priv.no
Thu Feb 16 20:39:35 NZDT 2017
On 10 February 2017 at 19:47, Dalton Fury <daltonfury42 at gmail.com> wrote:
> Hi,
>
> One of our patrons are going to develop an app for our library. He asked me
> to provide him with an API. He wants to search for books, and then get item
> information.
> After googling around, I think that SRU might do the job.
Yes, it should be well suited to the task.
> I read through koha-conf.xml and koha-conf-site.xml.in and I understand
> that I am to uncomment a few lines.
>
> Specifically I uncommented comments starting from line 86 and 161 in
> koha-conf.xml and 81 and 150 in koha-conf-site.xml.in
koha-conf-site.xml.in is just a template that is used to create a site
specific koha-conf.xml when koha-create is run. You should probably
never edit this.
Assuming you installed using the Debian packages, you should be
editing the file at /etc/koha/sites/<your instance name>/koha-conf.xml
There are two places you should remove comments. In the file at
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=etc/koha-conf.xml;h=1e5c7997c8046f5e1f46dd427d1b35fe9d46194e;hb=HEAD
it would be the following locations:
- Line 13 and 15
- Line 59 and 72
> Which port should I use?
That is up to you. 9999 is often used in examples.
> Where do I set that?
On line 14 of the file above you would replace
__ZEBRA_SRU_BIBLIOS_PORT__ with 9999:
<listen id="publicserver" >tcp:@:__ZEBRA_SRU_BIBLIOS_PORT__</listen>
<listen id="publicserver" >tcp:@:9999</listen>
> Shouldn't I also set apache to listen on that port?
No, Zebra provides it's own server that listens on the chosen port,
independently of Apache. Setting Apache to listen to the same port as
Zebra will result in a conflict.
Hope that helps!
Magnus Enger
Libriotech
More information about the Koha
mailing list