1, 安装完zookeeper后运行客户端:
root@MASTER opt]# zkCli.sh -server SLAVE:2181
Connecting to SLAVE:2181
2016-11-10 11:15:10,274 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.9-1757313, built on 08/23/2016 06:50 GMT
2016-11-10 11:15:10,279 [myid:] - INFO [main:Environment@100] - Client environment:host.name=MASTER
2016-11-10 11:15:10,279 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.8.0_111
2016-11-10 11:15:10,282 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2016-11-10 11:15:10,282 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.8.0_111/jre
2016-11-10 11:15:10,282 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/root/cluster/opt/zookeeper-3.4.9/bin/../build/classes:/root/cluster/opt/zookeeper-3.4.9/bin/../build/lib/*.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/slf4j-log4j12-1.6.1.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/slf4j-api-1.6.1.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/netty-3.10.5.Final.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/log4j-1.2.16.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/jline-0.9.94.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../zookeeper-3.4.9.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../src/java/lib/*.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../conf:/usr/java/jdk1.8.0_111/lib
2016-11-10 11:15:10,282 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/opt/STM/ST40R5.1.0/lib:/usr/java/packages/lib/i386:/lib:/usr/lib
2016-11-10 11:15:10,282 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2016-11-10 11:15:10,282 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=<NA>
2016-11-10 11:15:10,282 [myid:] - INFO [main:Environme