* installjdk
* installZookeeper. In official websitehttp://zookeeper.apache.org/ <http://zookeeper.apache.org/>
downloadzookeeper. I downloadedzookeeper-3.4.6 Edition.
* decompressionzookeeper-3.4.6 toD:\machine\zookeeper-3.4.6.
* stayD:\machine Newly builddata andlog Catalog.
ZooKeeper There are three installation modes of, Respectively: standalone mode(stand-alone), Cluster mode and cluster pseudo distribution mode.ZooKeeper
The installation of stand-alone mode is relatively simple, If first contactZooKeeper Words, Proposed installationZooKeeper Single machine mode or cluster pseudo distribution mode.

Install click mode. toD:\machine\zookeeper-3.4.6\conf copy zoo_sample.cfg And paste it into the current directory, namezoo.cfg.

editzoo.cfg. Modify the following configuration 

cmd Enter under commandD:\machine\zookeeper-3.4.6\bin Run under directoryzkserver.cmd. As shown in the figure below: 

* After startupcmd Under command,netstat-ano View port listening service.
* cmd Lower entryD:\machine\zookeeper-3.4.6\bin Run under directoryzkcli.cmd. As shown in the figure below: 

* Install cluster pseudo distribution mode.
modify zoo.cfg file. As shown in the figure below: 

Save aszoo-1.cmd. 

Save aszoo-2.cmd. 

Save aszoo-3.cmd.

modifyzkserver.cmd file. As shown in the figure below: 

Save aszkserver-1.cmd 

Save aszkserver-2.cmd 

Save aszkserver-3.cmd.

cmd Run separatelyzkserver-1.cmd,zkserver-2.cmd,zkserver-3.cmd.

* cmd lowernetstar-ano View port monitoring.
cmd Run downzkcli.cmd -server:localhost:2181;zkcli.cmd
;-server:localhost:2182;zkcli.cmd -server:localhost:2183.

zookeeper Andjava Connection 

Standalone connection: 

Cluster connection: