zookeeper 配置
zoo.cfg, 在windows下注意目录路径必须是双反斜杠 \\
1 tickTime=2000 2 initLimit=5 3 syncLimit=2 4 dataDir=D:\\solr\\data\\zookeeper 5 dataLogDir=D:\\solr\\dataLog\\zookeeper 6 clientPort=2181 7 server.1=127.0.0.1:9881:9771 8 server.2=127.0.0.1:9882:9772 9 server.3=127.0.0.1:9883:9773
在dataDir 配置的目录下新建一个myid文件,分别指定节点1,2,3
1
启动集群脚本
1 start cmd /c "D:\developer\zookeeper-cluster\node1\zookeeper\bin\zkServer.cmd" 2 start cmd /c "D:\developer\zookeeper-cluster\node2\zookeeper\bin\zkServer.cmd" 3 start cmd /c "D:\developer\zookeeper-cluster\node3\zookeeper\bin\zkServer.cmd" 4 start cmd /c "D:\developer\zookeeper-cluster\node1\zookeeper\bin\zkCli.cmd" -server 127.0.0.1:2183
参考:
1、 http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
2、 http://www.cnblogs.com/xuliwen/archive/2012/03/15/2398318.html
3、 http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html