Running Zookeeper (Even multiple instances) in windows is made so easy that even grandma can do it.
After downloading the zip file, copy your zookeeper related jar files, and log4j.properties file to [RUNNER_HOME]/lib, based on your environment start the appropriate script, you are done.
Refer this blog post for more details.
Zookeeper Runner is based on Java Service Wrapper
-
data ==> Zookeeper data directory, contains the myid file as well
-
logs ==> this where Wrapper/Zookeeper will spit out logs
-
conf ==> contains wrapper and zookeeper configuration files
-
lib ==> this folder contains wrapper.jar and zookeeper related jars, and any other jars you want to make available to classpath
-
bin ==> binary executables are present here, based on you environment you have to execute one of the files in this directory
Modify the [RUNNER_HOME]/conf/zoo.cfg file (line number 14) as follows
clientPort=2182
Modify the [RUNNER_HOME]/conf/wrapper.conf file (line number 95) as follows
wrapper.ntservice.name=Zookeeper2
Modify the [RUNNER_HOME]/data/myid file to store the id you want
- uncomment line number 31-33, in [RUNNER_HOME]/conf/zoo.cfg file
- Make sure each instance has unique clientPort (Refer to FAQ#1)
- Make sure each instance has unique NtService Name (Refer to FAQ#2)
- Make sure each instance has unique myid (Refer to FAQ#3)