Setup
Solr supports both single and multi node installations:
- A single node installation is a single instance of Solr running on a server, with all indexing information maintained in the single instance.
- A multi node installation consists of two or more instances of Solr executing on different servers, with the indexing information spread across all instances.
The setup and maintenance of multi node installations is complex and time consuming and typically only required where the amount of data indexed is in the hundreds of gigabytes range. In most cases, the amount of indexing information required by EMu only requires a single node setup.
To keep things simple and to reduce network latency it is recommended that Solr runs on the same server as the EMu system. The following instructions describe how to setup such a system:
To setup Solr indexing support for EMu on FreeBSD:
- Login as
root
- Enter
pkg install apache-solr
- Enter
vi /etc/rc.conf
- Add
solr_enable="YES"
to the file and save it. - Run
grep emuadmin /etc/group
and note the group number. - Enter
vipw
and change the login group number for usersolr
to that ofemuadmin
. - Enter
vi /usr/local/etc/solr.in.sh
- Look for the setting for
SOLR_JAVA_MEM
.Uncomment it and change the amount of memory allocated to Solr to approximately 25% of the system memory.
For example, to allow 8GB of memory for Solr use the following setting:
SOLR_JAVA_MEM="-Xms8g -Xmx8g"
- Add the following line to the bottom of the file:
SOLR_OPTS="$SOLR_OPTS -Dsolr.max.booleanClauses=500000"
- Save the file and exit the editor.
- Enter
vi /var/db/solr/solr.xml
- Add the following line inside the
<solr>
tag:<str name="coreRootDirectory">/home/emu</str>
where the value of
coreRootDirectory
should be useremu
's home directory. - Save the file and exit the editor.
- Enter
service solr start
You can test whether Solr is operational by accessing the Solr Admin
site at http://localhost:8983/solr
. The hostname of the EMu server (or IP Address) can be used instead of
localhost
if you are browsing from another machine.
Solr is now operational and ready for use by EMu.
Note: Solr is not available on RedHat and CentOS upstream repositories; it is necessary to download it and install it manually.
To setup Solr indexing support for EMu on RedHat or CentOS:
- Browse to
https://solr.apache.org/downloads.html
and click the link for the latest Solr binary release.The release download page is displayed.
- Copy the URL for the suggested download site, e.g.:
https://dlcdn.apache.org/lucene/solr/{version}/solr-{version}.tgz
- Login as
root
- Enter
cd /tmp
- Enter
wget {URL of latest Solr binary download}
- Enter
tar xzf solr-{version}.tgz solr-{version}/bin/install_solr_service.sh --strip-components=2
- Enter
./install_solr_service.sh solr-{version}.tgz
Solr wll now install.
- Enter
chown -R solr:solr /opt/solr-{version}
- Enter
chmod 644 /etc/default/solr.in.sh
- Run
grep emuadmin /etc/group
and note the group number. - Enter
vipw
and change the login group number for usersolr
to that ofemuadmin
. - Enter
vi /etc/default/solr.in.sh
- Look for the setting for
SOLR_JAVA_MEM
.Uncomment it and change the amount of memory allocated to Solr to approximately 25% of the system memory.
For example, to allow 8GB of memory for Solr use the following setting:
SOLR_JAVA_MEM="-Xms8g -Xmx8g"
-
Add the following line to the bottom of the file:
SOLR_OPTS="$SOLR_OPTS -Dsolr.max.booleanClauses=500000"
- Save the file and exit the editor.
- Enter
vi /var/solr/data/solr.xml
- Add the following line inside the
<solr>
tag:<str name="coreRootDirectory">/home/emu</str>
where the value of
coreRootDirectory
should be useremu
's home directory. - Save the file and exit the editor.
- Enter
systemctl stop solr
- Enter
systemctl start solr
- Enter
systemctl status solr
You can test whether Solr is operational by accessing the Solr Admin
site at http://localhost:8983/solr
. The hostname of the EMu server (or IP Address) may be used instead of
localhost
if you are browsing from another machine.
Solr is now operational and ready for use by EMu.