Developer installation script.
authorWayne Schneider <wayne@indexdata.com>
Fri, 15 Jul 2016 15:13:20 +0000 (10:13 -0500)
committerWayne Schneider <wayne@indexdata.com>
Fri, 15 Jul 2016 15:13:20 +0000 (10:13 -0500)
dev-install.sh [new file with mode: 0755]

diff --git a/dev-install.sh b/dev-install.sh
new file mode 100755 (executable)
index 0000000..fa92c62
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# Unpack the Solr archive in the working directory
+# Set up solr.in.sh with reasonable defaults
+# Link in the lui-solr configuration
+
+SOLR_VERSION=5.5.1
+SOLR_DIR=solr-$SOLR_VERSION
+
+echo "Unpacking Solr $SOLR_VERSION archive..."
+tar -xzf dist/solr-$SOLR_VERSION.tgz
+
+echo "Creating solr.in.sh..."
+cp $SOLR_DIR/bin/solr.in.sh $SOLR_DIR/bin/solr.in.sh.default
+cat > $SOLR_DIR/bin/solr.in.sh <<EOF
+SOLR_HEAP="512m"
+GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails \
+-XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime"
+GC_TUNE="-XX:NewRatio=3 \
+-XX:SurvivorRatio=4 \
+-XX:TargetSurvivorRatio=90 \
+-XX:MaxTenuringThreshold=8 \
+-XX:+UseConcMarkSweepGC \
+-XX:+UseParNewGC \
+-XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 \
+-XX:+CMSScavengeBeforeRemark \
+-XX:PretenureSizeThreshold=64m \
+-XX:+UseCMSInitiatingOccupancyOnly \
+-XX:CMSInitiatingOccupancyFraction=50 \
+-XX:CMSMaxAbortablePrecleanTime=6000 \
+-XX:+CMSParallelRemarkEnabled \
+-XX:+ParallelRefProcEnabled"
+ENABLE_REMOTE_JMX_OPTS="true"
+SOLR_OPTS="$SOLR_OPTS -Xss256k"
+SOLR_OPTS="$SOLR_OPTS -Dsolr.data.dir=solr/lui/data"
+EOF
+
+echo "Linking in lui-solr configuration..."
+mkdir $SOLR_DIR/server/solr/lui
+cd $SOLR_DIR/server/solr/lui
+ln -s ../../../../conf/solr-home/lui/conf conf
+ln -s ../../../../conf/solr-home/lui/core.properties core.properties
+
+echo "You can launch solr with the command \"$SOLR_DIR/bin/solr start\""
+
+exit 0