clone
git clone -b release-3.5.9 https://github.com/apache/zookeeper.git
compile
mvn clean compile -DskipTests
provided
zookeeper-server下面的pom的 provided都注释掉,应该有7处
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<!--<scope>provided</scope>-->
</dependency>
zoo.cfg
复制zoo_sample.cfg,取名zoo.cfg
单机版启动
单机版zookeeper的启动类为org.apache.zookeeper.server.ZooKeeperServerMain
启动配置
Program arguments : $ProjectFileDir$\conf\zoo.cfg
Main Class : org.apache.zookeeper.server.ZooKeeperServerMain
# -Dlog4j.configuration=file:E:/github_project/zookeeper/conf/log4j.properties
VM Options: -Dlog4j.configuration=file:$ProjectFileDir$\conf\log4j.properties
启动