On 5/15/2024 15:37, Peter Johnson wrote:
Bottom-line, I want the bare minimum Zookeeper/Solr installation possible on 1 
server (and not really interested in learning too much about it), I just need 
it as a requirement for OT TeamSite.
With that in mind, I followed these basic steps (which had worked in the past, 
but maybe there is something new):

If you want a very simple SolrCloud install on a single server, I think you should run a single node with embedded ZK.

If you're on Linux or another similar OS, I think your best bet is to actually install Solr.

in some directory, like your downloads directory, with the tarball:

tar xzf solr-8.11.2.tgz solr-8.11.2/bin/install_solr_service.sh --strip-components=2

Then:

sudo bash ./install_solr_service.sh solr-8.11.2.tgz

Then edit /etc/default/solr.in.sh and add:

SOLR_MODE="solrcloud"

You might also want to change the heap size with something like this:

SOLR_HEAP="1g"

The default heap size is 512MB and it doesn't take a very big index for that to be too small.

Once you have solr.in.sh the way you want it, restart the Solr service.

sudo service solr restart

If you don't like the data in /var/solr, running under a user named solr, and the program in /opt/solr-8.11.2 with a symlink at /opt/solr, you can give the install script options to change this.

If you are running it on Windows, then there is no install script. You can edit bin/solr.in.cmd instead of /etc/default/solr.in.sh and you would use solr.cmd to start it.

This is the contents of my /etc/default/solr.in.sh file:

SOLR_PID_DIR="/var/solr"
SOLR_HOME="/var/solr/data"
LOG4J_PROPS="/var/solr/log4j2.xml"
SOLR_LOGS_DIR="/var/solr/logs"
SOLR_PORT="8983"
SOLR_HEAP="768m"
GC_TUNE=" \
  -XX:+UnlockExperimentalVMOptions \
  -XX:+UseZGC \
  -XX:+ParallelRefProcEnabled \
  -XX:+ExplicitGCInvokesConcurrent \
  -XX:+AlwaysPreTouch \
  -XX:+UseNUMA \
"
SOLR_SECURITY_MANAGER_ENABLED=false
SOLR_JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
SOLR_JAVA_STACK_SIZE="-Xss1m"
SOLR_ULIMIT_CHECKS=false
SOLR_GZIP_ENABLED=true
SOLR_JETTY_HOST=0.0.0.0
SOLR_MODE="solrcloud"
SOLR_MODULES="analysis-extras"
SOLR_HOST=solr.elyograg.org
SOLR_PORT_ADVERTISE=443
ENABLE_REMOTE_JMX_OPTS=true
RMI_PORT=18983

My Solr listens on the default port of 8983. The embedded ZK listen on port 1443 for some reason -- the advertised port plus 1000. I have this behind an haproxy install which does listen on 443. My install is version 9.7.0-SNAPSHOT which I compiled myself. On 8.x you won't need SOLR_JETTY_PORT ... but 9.x listens on localhost by default.

Doing it this way, a ZK server will be run in the same JVM as Solr and you won't have to worry about it.

Thanks,
Shawn

Reply via email to