Website: http://zookeeper.apache.org/releases.html.
.
http://mirrors.hust.edu.cn/apache/zookeeper/
they are installing
Install the JDK
Upload JDK1.8 file to the Linux operating system in/SRC/usr/local/Java/file.
Unzip the files
tar XVF - the JDK 8 u51 - Linux - x64. Tar. Gz
Configure the environment variables
vim/etc/profile
Check whether the JDK installation success
source/etc/profile
Upload the installation file, after decompression.
tar XVF - they are - 3.4.8. Tar. Gz
Modify the configuration file
Create the folder under the root directory of the zk data/log
mkdir data log
Jump into the conf directory modify the configuration file
Copy the configuration file and modify the name
cp zoo_sample. CFG zoo. CFG

Startup/shutdown/check state command
sh zkServer. Sh start or./zkServer. Sh start
Sh zkServer. Sh stop
Sh zkServer. Sh status
Zookeeper cluster installation
Prepare the folder
The zookeeper zkCluster. Create a new folder in the root directory
Then create zk1 zkCluster zk2/zk3 folder.
In zk1/zk2/zk3 folder to create data and log
mkdir {zk1, zk2, zk3}/{data, log}
Add myid files
Respectively in zk1/zk2/zk3 data folder to create a new file myid. The content editor for 1/2/3, in turn with zk node number.
Edit the configuration file
Will zoo_sample. CFG copy for zoo1. Modify the configuration file after CFG.

Modify zoo1. CFG

After the completion of the configuration will be zoo1. 2 copies of CFG. Later need to modify the corresponding folder directory. And different port.
ZK cluster test
By using the following command startup/shutdown/check state zk cluster.
sh zkServer. Sh start zoo1. CFG
Sh zkServer. Sh stop zoo1. CFG
Sh zkServer. Sh status zoo1. CFG