Koha-clms/debian/docs/koha-common.xml

272 lines
10 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<article xmlns='http://docbook.org/ns/docbook'>
<title>koha-common</title>
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha Community</orgname>
<uri>https://koha-community.org/</uri>
</author>
</info>
<refentry xml:id="koha-common">
<refmeta>
<refentrytitle>koha-common</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
<refnamediv>
<refname>koha-common</refname>
<refpurpose>Create and manage Koha instances.</refpurpose>
<refclass>UNIX/Linux</refclass>
</refnamediv>
<refsect1><title>Description</title>
<para>koha-common provides a number of scripts for creating and administering Koha instances. It is meant for sites that provide Koha hosting, and serves several sites from the same host.</para>
</refsect1>
<refsect1><title>Service management</title>
<para>Each Koha instance runs several daemons: Plack (the web application), Zebra (search) and its indexer or the Elasticsearch indexer, two background job workers, and optionally the SIP2 and Z39.50/SRU servers. koha-common is a metapackage; the daemons are supervised by whichever of these two packages it pulled in:</para>
<variablelist>
<varlistentry>
<term><option>koha-systemd</option></term>
<listitem>
<para>The default on systemd hosts. Every daemon of every instance is its own unit: <literal>koha-plack@INSTANCE.service</literal>, <literal>koha-zebra@INSTANCE.service</literal>, <literal>koha-indexer@INSTANCE.service</literal>, <literal>koha-es-indexer@INSTANCE.service</literal>, <literal>koha-worker@INSTANCE.service</literal>, <literal>koha-worker-long_tasks@INSTANCE.service</literal>, <literal>koha-sip@INSTANCE.service</literal> and <literal>koha-z3950@INSTANCE.service</literal>, grouped by <literal>koha@INSTANCE.target</literal> per instance and <literal>koha.target</literal> for the whole host. <literal>systemctl restart koha-common</literal> still restarts everything. Each daemon's standard output and error are captured to the same <filename>/var/log/koha/INSTANCE/NAME-output.log</filename> and <filename>NAME-error.log</filename> files as with koha-sysv; systemd's own messages about a unit are in the journal (<literal>journalctl -u koha-zebra@INSTANCE</literal>). See <filename>/usr/share/doc/koha-systemd/README.Debian</filename>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-sysv</option></term>
<listitem>
<para>The traditional <filename>/etc/init.d/koha-common</filename> script, which starts all daemons of all enabled instances through the daemon(1) wrapper. Used where systemd is not PID 1, for example in containers. Each daemon's standard output and error are captured to <filename>/var/log/koha/INSTANCE/NAME-output.log</filename> and <filename>NAME-error.log</filename>.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The koha-* commands below (koha-plack, koha-zebra, koha-worker, ...) work the same way with either package. <filename>/etc/default/koha-common</filename> holds host-wide settings such as USE_INDEXER_DAEMON and is read by both.</para>
</refsect1>
<refsect1><title>Commands</title>
<para>The following commands are available after when koha-common has been installed. See individual manual pages for each command for optios and other details related to their usage.</para>
<refsect2><title>Administer instances</title>
<variablelist>
<varlistentry>
<term><option>koha-create</option></term>
<listitem>
<para>Create new Koha instances.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-disable</option></term>
<listitem>
<para>Disable a Koha instance.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-enable</option></term>
<listitem>
<para>Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-restore</option></term>
<listitem>
<para>Restore a Koha site from a dump (from koha-dump).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-dump</option></term>
<listitem>
<para>Dump all contents and configs for a Koha site.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-run-backups</option></term>
<listitem>
<para>Performs backups of the koha installations on the system, except an instance called 'demo'.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-remove</option></term>
<listitem>
<para>Remove a Koha instance.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Database-related</title>
<variablelist>
<varlistentry>
<term><option>koha-dump-defaults</option></term>
<listitem>
<para>Create default contents from an existing Koha site.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-upgrade-schema</option></term>
<listitem>
<para>Upgrade the DB schema for Koha instances. Done automatically on package upgrades.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-reset-passwd</option></term>
<listitem>
<para>Reset password for a user in a Koha instance.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-mysql</option></term>
<listitem>
<para>Provide an interactive mysql shell set up for the specified koha instance.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Zebra-related</title>
<variablelist>
<varlistentry>
<term><option>koha-zebra</option></term>
<listitem>
<para>Manage the Zebra daemon for named Koha instances.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-rebuild-zebra</option></term>
<listitem>
<para>Rebuild the Zebra database for a Koha instance.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-indexer</option></term>
<listitem>
<para>Manage the indexer daemon for named Koha instances.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-worker</option></term>
<listitem>
<para>Manage the worker daemon for named Koha instances.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>Elasticsearch-related</title>
<variablelist>
<varlistentry>
<term><option>koha-elasticsearch</option></term>
<listitem>
<para>Manage Elasticsearch-related tasks for Koha instances.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>E-mail</title>
<variablelist>
<varlistentry>
<term><option>koha-email-enable</option></term>
<listitem>
<para>Turn on the email for a Koha instance.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-email-disable</option></term>
<listitem>
<para>Turn off the email for a Koha instance.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>SIP2-related</title>
<variablelist>
<varlistentry>
<term><option>koha-sip</option></term>
<listitem>
<para>Manage the SIP server for named Koha instances.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Misc</title>
<variablelist>
<varlistentry>
<term><option>koha-upgrade-to-3.4</option></term>
<listitem>
<para>Performs the necessary changes to upgrade a Koha system from 3.2 to 3.4. If no instance names are provided, this will run it on all of them.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Utilities</title>
<variablelist>
<varlistentry>
<term><option>koha-create-dirs</option></term>
<listitem>
<para>Create dirs for a Koha instance.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-list</option></term>
<listitem>
<para>Lists Koha instances, optionally only those that are enabled or have email turned on.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-foreach</option></term>
<listitem>
<para>Run a command for each Koha instance. Takes the same arguments as koha-list.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>koha-shell</option></term>
<listitem>
<para>This command behaves something like su(1), but provides you with a shell as the koha user, and with the environment pointing to the right places.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1><title>Bugs</title>
<para>The scripts are a bit fragile. If something goes wrong, they do not clean up after themselves.</para>
<para>Bugs can be reported here: <uri>https://bugs.koha-community.org</uri></para>
</refsect1>
<refsect1><title>About Koha</title>
<para>Koha is the first free software library automation package. In use worldwide, its development is steered by a growing community of users collaborating to achieve their technology goals. Koha’s feature set continues to evolve and expand to meet the needs of its user base.</para>
</refsect1>
</refentry>
</article>