# Create config files. % cat 0.conf tickTime=2000 clientPort=4000 initLimit=5 syncLimit=2 dataDir=/tmp/data0 server.0=localhost:2000:3000:participant;localhost:4000 server.1=localhost:2001:3001:participant;localhost:4001 server.2=localhost:2002:3002:participant;localhost:4002 % cat 1.conf tickTime=2000 clientPort=4001 initLimit=5 syncLimit=2 dataDir=/tmp/data1 server.0=localhost:2000:3000:participant;localhost:4000 server.1=localhost:2001:3001:participant;localhost:4001 server.2=localhost:2002:3002:participant;localhost:4002 % cat 2.conf tickTime=2000 clientPort=4002 initLimit=5 syncLimit=2 dataDir=/tmp/data2 server.0=localhost:2000:3000:participant;localhost:4000 server.1=localhost:2001:3001:participant;localhost:4001 server.2=localhost:2002:3002:participant;localhost:4002 # Create data directories with myid files. % mkdir /tmp/data0 % mkdir /tmp/data1 % mkdir /tmp/data2 % echo 0 > /tmp/data0/myid % echo 1 > /tmp/data1/myid % echo 2 > /tmp/data2/myid # Start servers. % ./bin/zkServer.sh start 0.conf % ./bin/zkServer.sh start 1.conf % ./bin/zkServer.sh start 2.conf