Creating Solr Cloud part 1 – zookeeper ensemble


Solr is a useful full text search tool. Think Google. It helps you to easily search for contents you want. Today I want to cover how to set up the zookeeper ensemble

  • Get 3 instances in AWS / GCE. for this example we use ubuntu OS
  • We are not using the ubuntu zookeeper, as i find out it is not working well. download the JDK file using this command
    1. wget
  • go to /etc/environment document and add in the new java bin
    1. PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/jdk1.8.0_91/bin”

  • ensure that your java version is 1.8 and above
  • download zookeeper
    1. wget
  • unzip it, and rename zoo_sample.cfg to zoo.cfg in the conf folder
  • copy / paste this. the dataDir can be the directory of your choice
  • at the  dataDir, create this file myid. Chmod it to 777. Key in one value called 1. Why 1? because of your zoo.cfg settings, which you set server.1 as your first server
  • do the same for the other 2 servers, except the myid file must change accordingly to 2 and 3
  • lastly run bin/ start

Once you run the zookeeper, you can tell that it is running by this command ps -ef | grep zoo

do note to tell iptables or security groups to keep port 2888 and 3888 open


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s