Running VuFind2

MPDL,Admin

= Installation =

single installation of VuFind2 with multiple sites, see Installing Multiple Instances.


 * installation as system user
 * installation path /srv/web/vufind2/vufind
 * svn checkout /srv/web/vufind2/svn_checkout
 * instances: site001, etc.
 * dedicated database, Solr core
 * shared Solr, Jetty (VUFIND_HOME/vufind.pid)
 * Perl: root, cpan
 * Java 1.7 required as of VuFind 2.3
 * PHP, MySQL

php install.php --multisite

/srv/web/vufind2/vufind/site001

local directories
 * ../site001
 * ../themes/site001
 * ../modules/site001

symlinks
 * public-site001 -> public

Apache  Alias /ebooks /srv/web/vufind2/vufind/public-site001  ...   RewriteCond %{REQUEST_URI} ^/ebooks/AJAX/ [OR] RewriteCond %{REQUEST_URI} ^/ebooks/Cover/ [OR] RewriteCond %{REQUEST_URI} ^/ebooks/Search/ [OR] RewriteCond %{REQUEST_URI} ^/ebooks/Record/ [OR] RewriteCond %{REQUEST_URI} ^/ebooks/Author/ [OR] RewriteCond %{REQUEST_URI} ^/ebooks/Cart/ [OR] RewriteCond %{REQUEST_URI} ^/ebooks/Help/ [OR] RewriteCond %{REQUEST_URI} ^/ebooks/Static/
 * config
 * caching - presently the entire application relies on no caching being applied (will be introduced asap)
 * include config at /etc/apache2/vhosts.d
 * VUFIND_HOME/site001/httpd-vufind.conf
 * support selected VuFind modules / services only (= avoid presentation of uncustomized views)
 * 1) ... support modules / services ...

RewriteRule ^.*$ index.php [NC,L]

RewriteRule ^.*$ - [R=404,L] 
 * 1) otherwise ...

system user: vufindadm
 * runs service
 * runs indexing - note: ulimit -v should be "unlimited"
 * owner of VUFIND_HOME/*

sysconfig see vufind.sysconf

example of running service      ... /usr/java/jdk1.7.0_76/jre/bin/java -server -Xms1024m -Xmx1024m -XX:+UseParallelGC -XX:NewRatio=5 -Djetty.port= -Dsolr.solr.home=/srv/web/vufind2/vufind/solr -Djetty.logs=/srv/web/vufind2/vufind/solr/jetty/logs -Djetty.home=/srv/web/vufind2/vufind/solr/jetty -jar /srv/web/vufind2/vufind/solr/jetty/start.jar -Djava.util.logging.config.file=/srv/web/vufind2/vufind/solr/jetty/etc/logging.properties /srv/web/vufind2/vufind/solr/jetty/etc/jetty.xml 

= Logging =  [Site] ... timezone      = "Europe/Berlin" ... [Logging] ... file          = /var/log/vufind2/ /vufind.log:alert,error,notice    note: see also java.util.TimeZone#getTimeZone  ... -Djava.util.logging.config.file=/srv/web/vufind2/vufind/solr/jetty/etc/logging.properties  logging.properties  .level = INFO
 * Apache see /etc/apache2/vhosts.d
 * VuFind see /config/vufind/config.ini
 * file          = /var/log/vufind2/ /vufind.log:alert,error,notice,debug
 * Solr transaction logs see solr/ /tlog/
 * Jetty request log see solr/jetty/etc/jetty.xml
 * Jetty console output, logging
 * console output JETTY_CONSOLE=VUFIND_HOME/vufind.log
 * logging see solr/jetty/etc/logging.properties - enable VUFIND_HOME/vufind.sh - JAVA_OPTIONS
 * 1) Default global logging level:

org.apache.solr.update.processor.LogUpdateProcessor.level = FINE
 * 1) Log every update command (add, delete, commit, ...)

java.util.logging.FileHandler.limit = 100000000
 * 1) 100 MB max. size

java.util.logging.FileHandler.pattern = ./solr/jetty/logs/solr%u.log
 * 1) Log to the logs directory, with log files named solrxxx.log

java.util.logging.FileHandler.count = 10
 * 1) create max. 10 logfiles

java.util.logging.FileHandler.append=true </PRE>
 * 1) append onto existing logfiles

note: Jetty logging has been set up following the advice in logging.properties  </PRE> Probably since logging has not been enabled via slf4j, the Solr Admin - Logging is unable to show events.
 * 1) To use this log config, start solr with the following system property:
 * 2) -Djava.util.logging.config.file=etc/logging.properties

SolrMarc logging (during data import)  ./import-marc.sh ... -Dlog4j.configuration=file://$VUFIND_LOCAL_DIR/import/log4j.properties ... </PRE> log4j.properties  log4j.logger.org.solrmarc.marc.MarcImporter=DEBUG log4j.logger.org.solrmarc.marc.MarcHandler=DEBUG log4j.logger.org.solrmarc.tools.Utils=DEBUG ... log4j.appender.file.File=VUFIND_HOME/ /import/logs/solrmarc.log log4j.appender.file.MaxFileSize=100000KB log4j.appender.file.MaxBackupIndex=10
 * MARC import script import-marc.sh writes events to STDERR at INFO level (captured by import cronjob in VUFIND_HOME/ /import/import.log, previous run only)
 * otherwise SolrMarc logging is presently inappropriate due to property log4j.appender.file.MaxFileSize=100KB - TODO enable site-specific logging, rotate - TESTING

</PRE>

= Cronjobs =

edit /etc/cron.d/vufind2

 00 05 * * 1-5 vufindadm /srv/web/vufind2/vufind/update-index-mpdl.sh -q /srv/web/vufind2/vufind/site001
 * 1) schedule rebuilding index

00 08 * * * vufindadm /srv/web/vufind2/bin/ip_download.sh
 * 1) update IP list of service

00 08 * * 1-5 vufindadm mail -s "VuFind2:eBooks site001 update-index-mpdl.sh" svcgroup < /srv/web/vufind2/vufind/update-index-mpdl.log 00 12 * * * vufindadm cat /srv/web/vufind2/bin/anonymize/anon-ebooks-access.log /srv/web/vufind2/bin/anonymize/anon-ebooks-error.log | mail -s "vm94 VuFind2:eBooks anonymize.sh" svcgroup </PRE>
 * 1) email logfiles

= Import =

Import MARC records into Solr index

Note: For automatic download/indexing of data set download source in VUFIND_HOME/ /config/vufind/data.ini  [MARCData] marcUrl = http(s):// / /<MARC file> ... </PRE>

import-marc.sh customized /import/import.properties - esp  solr.hosturl = http://localhost:8081/solr/ /update </PRE>
 * source ... vufind.sysconf
 * source ... .profile # load profile of system user
 * set VUFIND_LOCAL_DIR (absolute path)
 * pass log4j.properties, see Logging - SolrMarc
 * set timezone -Duser.timezone="Europe/Berlin"

http traffic during indexing  ... 2015-06-02 15:30:15,123 [main] INFO main org.solrmarc.marc.MarcImporter - Connecting to remote Solr server at URL http://localhost:8081/solr/ebx/update ... </PRE>

note: testing of alternative unsuccessful  solrmarc.solr.war.path=VUFIND_HOME/solr/jetty/webapps/solr.war ... solr.path = VUFIND_HOME/solr ... solr.core.name = </PRE> ERROR "No such core: ..." running  export SOLRCORE= ; ./import-marc.sh path/to/marc </PRE>
 * 1) IF this is not provided, SolrMarc can only work
 * 2) by communicating with a running Solr server.

= Config =

Most config files are in /config/vufind, esp config.ini.

For local settings of customized VuFind see local.ini.

= Monitoring =

URLs by http status

Details see https://devtools.mpdl.mpg.de/projects/library2.0/ticket/55

= Services =


 * Demo
 * Production

= Info =
 * VuFind 2 documentation

tbc.