OAI-PMH-configuration¶
Configuring OAI-PMH in Koha¶
1. Configuration file¶
Save a configuration file to desired location, e.g /home/koha/koha-dev/etc/koha-oai.conf
Example content for the configuration file
format: vs: metadataPrefix: vs metadataNamespace: http://veryspecial.tamil.fr/vs/format-pivot/1.1/vs schema: http://veryspecial.tamil.fr/vs/format-pivot/1.1/vs.xsd xsl_file: /home/koha/Koha/xslt/vs.xsl marc21: metadataPrefix: marc21 metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd include_items: 1 marcxml: metadataPrefix: marxml metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd include_items: 1 oai_dc: metadataPrefix: oai_dc metadataNamespace: http://www.openarchives.org/OAI/2.0/oai_dc/ schema: http://www.openarchives.org/OAI/2.0/oai_dc.xsd xsl_file: /home/koha/Koha/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl
2. System preference OAI-PMH:ConfFile¶
Modify system preference OAI-PMH:ConfFile by setting absolute path to the configuration file defined above.
e.g.
OAI-PMH:ConfFile: /home/koha/koha-dev/etc/koha-oai.conf
3. System preference: OAI-PMH:MaxCount¶
Default value for OAI-PMH:MaxCount is 50. This is too small and causes unnecessary overhead. Increase the value to 500.
OAI-PMH:MaxCount: 500
4. System preference: OAI-PMH¶
Ensure this value is set to "Enabled". Possibly enabled by default.
OAI-PMH: Enabled
5. Test¶
GET /cgi-bin/koha/opac/oai.pl
If this page does not return Internal Server Error and you have ran the steps above, OAI-PMH should be configured correctly.
Troubleshooting¶
If changes do not seem to take effect, try restarting Plack.
$ sudo /home/koha/koha-dev/bin/koha-plack-daemon.sh restart
See /var/log/koha/plack-error.log for any errors.
Known issues:
Can't call method "start_element" on an undefined value at /usr/share/perl5/HTTP/OAI/Response.pm line 114.
Solution https://tiketti.koha-suomi.fi:83/issues/1919