O'Reilly logo

Apache Solr Beginner's Guide by Alfredo Serafini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – testing SolrCloud and Zookeeper locally

Every Solr instance now also includes an embedded Zookeeper instance, so we can start our experimentation with that, and then move to a more robust configuration with an external Zookeeper server.

  1. We can start from the default example in the Solr distribution. We can write the following command:
    >> cd ~/SolrStarterBook/solr/example
    
  2. Then we can start the first SolrCore instance using the configuration for the arts core:
    >> java -DzkRun -DnumShards=2 -Dbootstrap_confdir=../../solr-app/chp07/arts/conf/ -jar start.jar
    
  3. We can then start two more instances, with a slightly different choice of parameters:
    >> java -Djetty.port=7777 -DzkHost=localhost:9983 -jar start.jar
    >> java -Djetty.port=8888 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required