Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2013
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.10 KB | None | 0 0
  1. # Create config files.
  2. % cat 0.conf
  3. tickTime=2000
  4. clientPort=4000
  5. initLimit=5
  6. syncLimit=2
  7. dataDir=/tmp/data0
  8. server.0=localhost:2000:3000:participant;localhost:4000
  9. server.1=localhost:2001:3001:participant;localhost:4001
  10. server.2=localhost:2002:3002:participant;localhost:4002
  11.  
  12. % cat 1.conf
  13. tickTime=2000
  14. clientPort=4001
  15. initLimit=5
  16. syncLimit=2
  17. dataDir=/tmp/data1
  18. server.0=localhost:2000:3000:participant;localhost:4000
  19. server.1=localhost:2001:3001:participant;localhost:4001
  20. server.2=localhost:2002:3002:participant;localhost:4002
  21.  
  22. % cat 2.conf
  23. tickTime=2000
  24. clientPort=4002
  25. initLimit=5
  26. syncLimit=2
  27. dataDir=/tmp/data2
  28. server.0=localhost:2000:3000:participant;localhost:4000
  29. server.1=localhost:2001:3001:participant;localhost:4001
  30. server.2=localhost:2002:3002:participant;localhost:4002
  31.  
  32. # Create data directories with myid files.
  33. % mkdir /tmp/data0
  34. % mkdir /tmp/data1
  35. % mkdir /tmp/data2
  36. % echo 0 > /tmp/data0/myid
  37. % echo 1 > /tmp/data1/myid
  38. % echo 2 > /tmp/data2/myid
  39.  
  40. # Start servers.
  41. % ./bin/zkServer.sh start 0.conf
  42. % ./bin/zkServer.sh start 1.conf
  43. % ./bin/zkServer.sh start 2.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement