|
26 | 26 |
|
27 | 27 | <sect1 xml:id="headless">
|
28 | 28 | <title>Headless Installation</title>
|
29 |
| - |
30 | 29 | <para>The <link xlink:href="basic-installation">Basic Installation</link> of eXist-db
|
31 | 30 | requires a graphical desktop. You can also install eXist on a headless (no GUI) system.
|
32 | 31 | For this launch the installer from the command line, using the <code>-console</code>
|
|
35 | 34 | <para>In console mode, the installer will prompt for several parameters (almost like the GUI
|
36 | 35 | version does). A dump of a sample interaction is shown below:</para>
|
37 | 36 | <programlisting xlink:href="listings/listing-2.txt"/>
|
| 37 | + <sect2 xml:id="docker-compose"><title>Multi-container environments</title> |
| 38 | + <para>We highly recommend configuring a <literal>docker-compose.yml</literal> for local development or integration into multi-container environments.</para> |
| 39 | + <programlisting xlink:href="listings/listing-1.txt"/> |
| 40 | + <para>You can see an example configuration file below. Note that e.g.<code>${EXIST_DATA_DIR}</code> can be passed from an external file, and the use of the <code>volume</code> instructions. For all the available options please consult the <link xlink:href="https://docs.docker.com/compose/">docker compose</link> documentation.</para> |
| 41 | + <programlisting xlink:href="listings/listing-6.txt"/> |
| 42 | + </sect2> |
38 | 43 | </sect1>
|
39 | 44 |
|
40 | 45 | <!-- ================================================================== -->
|
41 | 46 |
|
42 | 47 | <sect1 xml:id="service">
|
43 | 48 | <title>Running eXist-db as a Service</title>
|
44 |
| - |
45 | 49 | <para>Instead of manually running the eXist-db server in a shell window, you can run it as a
|
46 | 50 | background service which is automatically launched during system start-up. This can be
|
47 | 51 | convenient, especially for servers. eXist-db continues to run even after users have
|
|
51 | 55 |
|
52 | 56 | <sect2 xml:id="windows">
|
53 | 57 | <title>Windows</title>
|
54 |
| - |
55 | 58 | <para>On Windows there are three identical options:</para>
|
56 | 59 | <itemizedlist>
|
57 | 60 | <listitem>
|
|
83 | 86 | <title>Unix/Linux</title>
|
84 | 87 | <para> If your system supports <code>systemd</code> you can run the service wrapper as a
|
85 | 88 | non-privileged user.</para>
|
86 |
| - <para>Begin by creating a new user in your system which is being created specifically to run eXist-db as a service. |
87 |
| - You can do this by typing the following command:</para> |
88 |
| - <programlisting>sudo adduser --system --shell /sbin/nologin --comment "eXist-db Service Account" existdb</programlisting> |
89 |
| - <para>This command creates a new system user named "existdb" which does not need to login in order to run a service. |
90 |
| - In order for this new system user to be able to run eXist-db, we need to change the permission of eXist-db to |
91 |
| - match this new user. You do so by navigating to your <literal>$EXIST_HOME</literal> folder and typing the following two commands:</para> |
92 |
| - <programlisting xlink:href="listings/listing-3.txt"/> |
93 |
| - <para>These two commmands modify the ownership and group permissions recursively throughout the whole eXist-db project |
94 |
| - to your new existdb system user. Now only this user can run eXist-db. |
95 |
| - Next, navigate to the <literal>/etc/systemd/system</literal> |
96 |
| - sub-directory. Once there, create an exist-db.service file which contains the following information at |
97 |
| - a minimum:</para> |
98 |
| - <programlisting xlink:href="listings/listing-4.txt"/> |
99 |
| - <para>Once this file is stored in this location, you need to update permissions. |
100 |
| - Give ownership of this file to the exist user by using the following commands:</para> |
101 |
| - <programlisting xlink:href="listings/listing-5.txt"/> |
102 |
| - <para>Below is a list of common commands to interact with the newly created and configured service:</para> |
| 89 | + <para>Begin by creating a new user in your system which is being created specifically to |
| 90 | + run eXist-db as a service. You can do this by typing the following command:</para> |
| 91 | + <programlisting>sudo adduser --system --shell /sbin/nologin --comment "eXist-db Service Account" existdb</programlisting> |
| 92 | + <para>This command creates a new system user named "existdb" which does not need to |
| 93 | + login in order to run a service. In order for this new system user to be able to run |
| 94 | + eXist-db, we need to change the permission of eXist-db to match this new user. You |
| 95 | + do so by navigating to your <literal>$EXIST_HOME</literal> folder and typing the |
| 96 | + following two commands:</para> |
| 97 | + <programlisting xlink:href="listings/listing-3.txt"/> |
| 98 | + <para>These two commmands modify the ownership and group permissions recursively |
| 99 | + throughout the whole eXist-db project to your new existdb system user. Now only this |
| 100 | + user can run eXist-db. Next, navigate to the <literal>/etc/systemd/system</literal> |
| 101 | + sub-directory. Once there, create an exist-db.service file which contains the |
| 102 | + following information at a minimum:</para> |
| 103 | + <programlisting xlink:href="listings/listing-4.txt"/> |
| 104 | + <para>Once this file is stored in this location, you need to update permissions. Give |
| 105 | + ownership of this file to the exist user by using the following commands:</para> |
| 106 | + <programlisting xlink:href="listings/listing-5.txt"/> |
| 107 | + <para>Below is a list of common commands to interact with the newly created and |
| 108 | + configured service:</para> |
103 | 109 | <itemizedlist>
|
104 | 110 | <listitem>
|
105 |
| - <para><code>sudo systemctl start exist-db.service</code> - Enter command to start eXist-db</para> |
| 111 | + <para><code>sudo systemctl start exist-db.service</code> - Enter command to |
| 112 | + start eXist-db</para> |
106 | 113 | </listitem>
|
107 | 114 | <listitem>
|
108 |
| - <para><code>sudo systemctl stop exist-db.service</code> - Enter command to stop eXist-db</para> |
| 115 | + <para><code>sudo systemctl stop exist-db.service</code> - Enter command to stop |
| 116 | + eXist-db</para> |
109 | 117 | </listitem>
|
110 | 118 | <listitem>
|
111 |
| - <para><code>sudo systemctl enable exist-db.service</code> - Enter command to enable eXist-db to automatically start running after a reboot of your system</para> |
| 119 | + <para><code>sudo systemctl enable exist-db.service</code> - Enter command to |
| 120 | + enable eXist-db to automatically start running after a reboot of your |
| 121 | + system</para> |
112 | 122 | </listitem>
|
113 | 123 | <listitem>
|
114 |
| - <para><code>sudo systemctl disable exist-db.service</code> - Enter commande to disable eXist-db from automatically starting after a reboot of your system</para> |
| 124 | + <para><code>sudo systemctl disable exist-db.service</code> - Enter commande to |
| 125 | + disable eXist-db from automatically starting after a reboot of your |
| 126 | + system</para> |
115 | 127 | </listitem>
|
116 | 128 | <listitem>
|
117 |
| - <para><code>sudo systemctl restart exist-db.service</code> - Enter command to restart eXist-db</para> |
| 129 | + <para><code>sudo systemctl restart exist-db.service</code> - Enter command to |
| 130 | + restart eXist-db</para> |
118 | 131 | </listitem>
|
119 | 132 | <listitem>
|
120 |
| - <para><code>systemctl status exist-db</code> - Enter command to check the status of eXist-db</para> |
| 133 | + <para><code>systemctl status exist-db</code> - Enter command to check the status |
| 134 | + of eXist-db</para> |
121 | 135 | </listitem>
|
122 | 136 | <listitem>
|
123 |
| - <para><code>journalctl</code> - Run the following command to check systemd journal:</para> |
| 137 | + <para><code>journalctl</code> - Run the following command to check systemd |
| 138 | + journal:</para> |
124 | 139 | </listitem>
|
125 | 140 | </itemizedlist>
|
126 | 141 | </sect2>
|
|
133 | 148 |
|
134 | 149 | <para>Included in the distribution are a number of useful <literal>.sh</literal> (Unix
|
135 | 150 | Shell) and <literal>.bat</literal> (Windows batch) programs located in the
|
136 |
| - <literal>bin</literal> sub-directory. Their names speak for themselves.</para> |
| 151 | + <literal>bin</literal> sub-directory. Their names speak for themselves.</para> |
137 | 152 | <para>However, if you find that programs do not launch, you can try to manually launch them
|
138 | 153 | on the command-line without the scripting wrapper. This often provides useful debugging
|
139 | 154 | information.</para>
|
|
162 | 177 | <varlistentry>
|
163 | 178 | <term> <code>client.sh</code> (Unix) / <code>client.bat</code> (Windows)</term>
|
164 | 179 | <listitem>
|
165 |
| - <para>Use one of these scripts to launch the <link xlink:href="java-admin-client">Java Admin Client</link>.</para> |
| 180 | + <para>Use one of these scripts to launch the <link |
| 181 | + xlink:href="java-admin-client">Java Admin Client</link>.</para> |
166 | 182 | </listitem>
|
167 | 183 | </varlistentry>
|
168 | 184 | </variablelist>
|
|
0 commit comments