Skip to content

Instantly share code, notes, and snippets.

@jaredgriffith
Created November 15, 2013 23:28
Show Gist options
  • Save jaredgriffith/7493462 to your computer and use it in GitHub Desktop.
Save jaredgriffith/7493462 to your computer and use it in GitHub Desktop.
Sysconfig File for Solr
# options that are commonly overridden
SOLRROOT=/usr/local/solr1
SOLRHOME=./solr/
SOLRLOG=/usr/local/solr1/logs
LISTENPORT=8983
JMINMEM=256M
JMAXMEM=1024M
JBIN=/usr/bin/java
FUSER=/sbin/fuser
STOPKEY=solrjunkies
STOPPORT=8078
JMXPORT=8686
STARTUSER=solr
# Log4j properties file (relative to your $SOLROOT)
LOG4J=etc/log4j.properties
# Directory must exist and the solr user must be able to write to it
PIDFILE=/var/run/solr/solr.pid
# less commonly overridden options
PROC_CHECK_ARG="start\.jar"
# Uncomment and make sure you adjust LOG4J option above if you want to specify where your Log4j properties file
LOG_OPTS="-Dlog4j.configuration=file:${LOG4J}"
# Uncomment and tune to your machine if you want more Java VM options
# Also, if you enable this, you need to enable hugtlbfs on your system, please see: https://wiki.debian.org/Hugepages (relevant to all *Nix systems
#JVM_OPTS="-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:NewRatio=3 -XX:MaxTenuringThreshold=8 -XX:+CMSParallelRemarkEnabled -XX:+ParallelRefProcEnabled -XX:+UseLargePages -XX:+AggressiveOpts"
# Uncomment if you want Java Garbage Collection options
#GCLOG_OPTS="-verbose:gc -Xloggc:logs/gc.log -XX:+PrintGCDateStamps -XX:+PrintGCDetails"
# Uncomment if you want JMX console options
#JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=${JMXPORT} -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
# Build required env variables.
STARTARGS="-Xms${JMINMEM} -Xmx${JMAXMEM} ${LOG_OPTS} ${JVM_OPTS} ${GCLOG_OPTS} ${JMX_OPTS} -Dsolr.solr.home=${SOLRHOME} -Djetty.port=${LISTENPORT} -DSTOP.PORT=${STOPPORT} -DSTOP.KEY=${STOPKEY}"
STOPARGS="-DSTOP.PORT=${STOPPORT} -DSTOP.KEY=${STOPKEY}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment