下载
https://archive.apache.org/dist/zookeeper/stable/
下载完成后解压
导入等idea编译与下载依赖
编译
复制配置文件
cd lib/zookeeper/conf/
cp zoo_sample.cfg zoo.cfg
配置启动类
org.apache.zookeeper.server.ZooKeeperServerMain
-Dlog4j.configuration=file:E:\sources\apache-zookeeper-3.5.8\conf\log4j.properties
E:\sources\apache-zookeeper-3.5.8\conf\zoo.cfg
启动
修改zookeeper-server里的pom.xml文件
jetty-server及jetty-servlet
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<!--<scope>provided</scope>-->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<!-- <scope>provided</scope>-->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<!-- <scope>provided</scope>-->
<scope>compile</scope>
</dependency>