User manual
Koha's Web Installer, Crontab, and Other Server Configurations
Rebuilding Zebra indexes
In Chapter 3, Installing Koha's Zebra Search Engine, we learned how to rebuild Zebra
indexes by passing different parameters to the
rebuild_zebra.pl
program. To
schedule index rebuilds, we script a cronjob as follows:
*/1 * * * *
perl /home /koha /kohaclone /misc /migration_ tools /rebuild_
zebra.pl -b -a -z » /dev /null 2 > &1
Note the following about this cronjob:
The */i at the beginning the cronjob signifies that the command will
be executed every minute
The output of the command is being redirected to the
/dev /null, which
means nowhere
The expression 2 > &l means, that the command's error messages (2) and
its standard output (1) will both be redirected to the same place, in this
case /dev/null
To redirect the output and error messages to a log file, we setup the cronjob as
follows:
*/i * * * *
perl / home /koha /kohaclone /misc /migration tools /rebuild
zebra.pl -b -a -z » /home /koha /logs /zebra.log
2 > &1
Note the use of the file
/home /koha /logs /zebra. log
instead of
/dev /null.
More crontab examples
There are several other programs that can be set up in the crontab depending on
your requirements. Take a look at the
/misc /cronj obs /crontab
. example file
for more information:
koha@koha@linux: -> vi / home /koha/ kohaclone /misc /cronjobs /crontab. example
Ensuring Koha starts automatically
on
server reboot
To make sure that Koha runs smoothly after a server reboot, we need to make sure
that Apache2, MySQL, and Zebra server start up automatically. In this section, we
demonstrate how to set this on Debian and openSuSE.
[so]