forked from Princeton-CDH/mep-django
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_solr.sh
34 lines (29 loc) · 879 Bytes
/
config_solr.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Config variables local to the script
version=${SOLR_VERSION}
file="solr-${version}.tgz"
url="http://lib-solr-mirror.princeton.edu/dist/lucene/solr/${version}/${file}"
# Make a downloads dir to cache and change working dir to it
mkdir -p downloads
cd downloads
# Check if the file exists for some reason, shouldn't but out of parsimony
if [ -f $file ];
then
echo "File exists, skipping download..."
else
wget $url
fi
# Untar
tar xzf $file
# copy in local configset in before starting
mkdir solr-${SOLR_VERSION}/server/solr/configsets/sandco
cp -r ../solr_conf/* solr-${SOLR_VERSION}/server/solr/configsets/sandco/
# Start the solr instance with all default settings
echo "Starting solr..."
bin="solr-${version}/bin/solr"
if $bin start
then
echo "Solr appears to have started..."
else
exit 1
fi
echo "Solr running on default port of 8983..."