1 Zookeeper 설치
설치 위치 : /service/workspace (각자 환경에 맞게 구성)
1 2 3 4 |
]$ wget http://ftp.daum.net/apache/zookeeper/zookeeper-3.3.4/zookeeper-3.3.4.tar.gz ]$ tar xvzf zookeeper-3.3.4.tar.gz ]$ ln -s zookeeper-3.3.4 zookeeper ]$ cd /service/workspace/zookeeper |
2 Zookeeper 설정
2.1 zoo.cfg 설정
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
]$ cp conf/zoo_sample.cfg conf/zoo.cfg ]$ vi conf/zoo.cfg # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. dataDir=/service/workspace/zookeeper_data # the port at which the clients will connect clientPort=2181 |
* 참고 : dataDir 는 서버를 구동하기 전에 미리 생성해야함(자동으로 생성되지 않음.)
3 Zookeeper 구동
1 |
]$ ./bin/zkServer.sh start |
4 Zookeeper 확인
1 |
]$ ./bin/zkCli.sh |
* Zookeeper 콘솔이 뜨는지 확인 ( [zk: localhost:2181(CONNECTED) 0] quit )
Zookeeper 설치 끝!