-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathrun-solr.sh
More file actions
executable file
·35 lines (32 loc) · 1.1 KB
/
run-solr.sh
File metadata and controls
executable file
·35 lines (32 loc) · 1.1 KB
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
35
####
#### Licensed to the Apache Software Foundation (ASF) http://www.apache.org/licenses/LICENSE-2.0
#### See http://www.cominvent.com/?p=576 for instructions
####
#!/bin/sh
echo "Running Solr AutoComplete example in Jetty."
echo "Syntax: ./run-solr.sh [<port>]"
if [ X$JETTY_HOME = X ] ; then
echo "Please set environment variable JETTY_HOME to point to your Solr example directory"
echo "Example: export JETTY_HOME=/home/john/solr-3.5.0/solr/example"
exit
fi
if [ X$1 != X ] ; then
PORT=$1
else
PORT=8983
fi
SOLR_HOME=`pwd`/solr-home
export JAVA_OPTIONS="-server \
-XX:+UseConcMarkSweepGC \
-XX:+CMSClassUnloadingEnabled \
-XX:-CMSParallelRemarkEnabled \
-XX:+UseCMSCompactAtFullCollection \
-XX:+UseParNewGC \
-XX:+PrintGCDetails \
-Xms512m -Xmx1024m \
-Dsolr.solr.home=$SOLR_HOME \
-Djetty.port=$PORT \
$JAVA_OPTIONS"
echo JAVA_OPTIONS is $JAVA_OPTIONS
cd $JETTY_HOME
java $JAVA_OPTIONS -jar start.jar