jdk 설치 



zookeeper 설치 
# wget http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz

# tar zxvf zookeeper-3.4.5.tar.gz

# cp -Rf zookeeper-3.3.5 /usr/local/zookeeper

# cd /usr/local/zookeeper




# 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=/usr/data/zookeeper
# the port at which the clients will connect
clientPort=2181

server.1=175.207.8.151:2888:3888
server.2=175.207.8.152:2888:3888
server.3=175.207.8.153:2888:3888


기타 작업 
1. 디렉토리 생성 /usr/data/zookeeper 
2. 파일 생성  cat > /usr/data/zookeeper/myid  
3. myid파일에  멀티 서버 설정한 server.1  번호를 입력  .. ##문자 입력하니 java 숫자 변환 에러 발생 -_- 문자 된다고했는데 몬가 이상함 




 ip 포트 설정 

iptables -I OUTPUT 1 -p tcp --dport 2888 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 2888 -j ACCEPT
iptables -I OUTPUT 1 -p tcp --dport 3888 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 3888 -j ACCEPT
iptables -I OUTPUT 1 -p tcp --dport 2181 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 2181 -j ACCEPT
service iptables save
service iptables restart

 

log 4j 설정 
 Define some default values that can be overridden by system properties
zookeeper.root.logger=INFO, CONSOLE
zookeeper.console.threshold=INFO
zookeeper.log.dir=/usr/local/zookeeper/log
zookeeper.log.file=zookeeper.log
zookeeper.log.threshold=DEBUG
zookeeper.tracelog.dir=/usr/local/zookeeper/log
zookeeper.tracelog.file=zookeeper_trace.log

#
# ZooKeeper Logging Configuration
#

# Format is "<default threshold> (, <appender>)+

# DEFAULT: console appender only
#log4j.rootLogger=${zookeeper.root.logger}

# Example with rolling log file
#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE

# Example with rolling log file and tracing
log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE
"conf/log4j.properties" 58L, 2207C






path 설정 


# vi ~/.bash_profile

JAVA_HOME=/usr/local/java
ZOOKEEPER_HOME=/usr/local/zookeeper
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$ZOOKEEPER_HOME/bin

# source ~/.bash_profile




주키퍼 테스트 블로그 : 


이클립스 플러그인 

http://www.massedynamic.org/mediawiki/index.php?title=Eclipse_Plug-in_for_ZooKeeper