Add support for Solr 6.1.0. Update dev deployment, documentation.
[lui-solr.git] / doc / debian-install.md
1 This document describes the installation of the Index Data Local
2 Unified Index (lui-solr) on Debian Linux
3
4 Prerequisites
5 =============
6
7 * masterkey-lui-solr5 is based on Solr 5.x, which requires Java 7. The package
8 depends on openjdk-7-jdk.
9
10 * masterkey-lui-solr6 is based on Solr 6.x, which requires Java 8. The package
11 depends on openjdk-8-jdk, available on backports for
12 jessie. openjdk-8-jdk is _not_ available for wheezy. To install
13 masterkey-lui-solr6 on wheezy is possible, bu it is outside the scope
14 of this document.
15
16 Pre-installation
17 ================
18
19 * Add the Index Data apt repository to your system.  Add the following
20 content to /etc/apt/sources.list.d/indexdata.list:
21
22 ```
23      deb http://ftp.indexdata.dk/debian jessie main restricted
24      deb-src http://ftp.indexdata.dk/debian jessie main restricted
25
26 ```
27
28 * The 'restricted' repo requires IP authentication.  Please send
29 access requests to 'support@indexdata.com' if necessary.
30
31 * Index Data packages are signed with a GPG key.  Add the key to your
32 apt keyring.
33
34 ```
35      wget http://ftp.indexdata.com/pub/debian/indexdata.asc -O - | sudo apt-key add -
36      sudo apt-get update
37
38 ```
39
40 * For masterkey-lui-solr6 on jessie: Add the backports apt
41 repository. Add the following content to /etc/apt/sources.list:
42
43 ```
44      deb http://ftp.debian.org/debian jessie-backports main
45
46 ```
47
48 And update your package list:
49
50 ```
51      sudo apt-get update
52
53 ```
54
55 * Masterkey LUI stores its Solr indexes by default in
56 /var/lib/masterkey/lui/solr.  Ensure this partition is large enough to
57 accomodate your Solr indexes.
58
59 Installation
60 ============
61
62 The lui-solr package installs a Solr binary installation in
63 /usr/share/masterkey/lui, a default configuration in
64 /etc/masterkey/lui/solr, a data directory in /var/lib/masterkey/lui/solr,
65 and logs in /var/log/masterkey/lui. It creates the "lui-solr" service
66 and installs an init script for startup. The Solr server runs by
67 default on port 8983, and processes and files are owned by the
68 "lui-solr" user.
69
70 * Install the masterkey-lui-solr5 or masterkey-lui-solr6 package:
71
72 ```
73      sudo apt-get install <masterkey-lui-solr5|masterkey-lui-solr6>
74
75 ```
76
77   This will install and start up the lui-solr service with the default
78   configuration.
79
80 * Increase the JVM heap size for Solr.  The ideal setting
81 depends on several factors, including the total amount of RAM
82 available on the system and the size of your indexes.  The default of
83 512m, however, is likely too low for production. Edit
84 /etc/masterkey/lui/solr/lui-solr.in.sh and increase 'SOLR_HEAP'.  Example:
85
86 ```
87      SOLR_HEAP="2048m"
88
89 ```
90
91   See the comments in lui-solr.in.sh for more examples of memory and
92   garbage collection fine-tuning.
93
94 * Restart the lui-solr service.
95
96 * Verify that Solr is running normally by connecting to the Solr Admin
97 console on port 8983:
98
99 ```
100      curl http://localhost:8983/solr
101
102 ```
103
104 * Solr logs are available at /var/log/masterkey/lui/solr.log.