Reorganize configuration directory.
[lui-solr.git] / dev-install.sh
1 #!/bin/bash
2
3 # Unpack the Solr archive in the working directory
4 # Set up solr.in.sh with reasonable defaults
5 # Link in the lui-solr configuration
6
7 SOLR_VERSION=5.5.1
8 SOLR_DIR=solr-$SOLR_VERSION
9
10 echo "Unpacking Solr $SOLR_VERSION archive..."
11 tar -xzf dist/solr-$SOLR_VERSION.tgz
12
13 echo "Creating solr.in.sh..."
14 cp $SOLR_DIR/bin/solr.in.sh $SOLR_DIR/bin/solr.in.sh.default
15 cat > $SOLR_DIR/bin/solr.in.sh <<EOF
16 SOLR_HEAP="512m"
17 GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails \
18 -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime"
19 GC_TUNE="-XX:NewRatio=3 \
20 -XX:SurvivorRatio=4 \
21 -XX:TargetSurvivorRatio=90 \
22 -XX:MaxTenuringThreshold=8 \
23 -XX:+UseConcMarkSweepGC \
24 -XX:+UseParNewGC \
25 -XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 \
26 -XX:+CMSScavengeBeforeRemark \
27 -XX:PretenureSizeThreshold=64m \
28 -XX:+UseCMSInitiatingOccupancyOnly \
29 -XX:CMSInitiatingOccupancyFraction=50 \
30 -XX:CMSMaxAbortablePrecleanTime=6000 \
31 -XX:+CMSParallelRemarkEnabled \
32 -XX:+ParallelRefProcEnabled"
33 ENABLE_REMOTE_JMX_OPTS="true"
34 SOLR_OPTS="$SOLR_OPTS -Xss256k"
35 SOLR_OPTS="$SOLR_OPTS -Dsolr.data.dir=solr/lui/data"
36 EOF
37
38 echo "Linking in lui-solr configuration..."
39 mkdir $SOLR_DIR/server/solr/lui
40 cd $SOLR_DIR/server/solr/lui
41 ln -s ../../../../conf/solr/solr-home/lui/conf conf
42 ln -s ../../../../conf/solr/solr-home/lui/core.properties core.properties
43
44 echo "You can launch solr with the command \"$SOLR_DIR/bin/solr start\""
45
46 exit 0