1. Download the installation package

To download website, pay attention to the zookeeper since version 2.6.2 will need to download the installation package with bin, otherwise you will quote org. Apache. Zookeeper. ZooKeeperMain error (I just because this cause to download the installation package to start from scratch again)

Address: archive.apache.org/dist/zookee…

2. Decompress the installation

Decompress the compressed package to the common directory, here directly downloaded to disk D, in the current folder new data and log folder

Then copy the zoo_sample. CFG file in the conf directory, rename it to zoo.cfg, and modify the configuration file. The data and log folders are located in the directory

DataDir = D: \ apache - they are - 3.5.7 \ data dataLogDir = D: \ apache - they are - 3.5.7 \ logCopy the code

The most important step: Modify JAVA_HOME

Use Notepad to open zkenv. CMD in the bin directory and add environment variables

Set the JAVA_HOME = "D: \ \ Program Files \ Java \ jdk1.8.0 _261"

Third, start the program

To prevent the rollback, enter CMD /k start zkserver. CMD in the CMD, then start zkcli. CMD and wait until “Welcome to Zookeeper” is displayed.