이야기박스

Hadoop 시리즈. Zookeeper 설치 본문

Computer & Data/Big Data

Hadoop 시리즈. Zookeeper 설치

박스님 2021. 4. 23. 19:33
반응형

 



주키퍼의 간단한 설치 과정을 정리한 포스팅입니다.

 

설치

wget downloads.apache.org/zookeeper/zookeeper-3.6.3/apache-zookeeper-3.6.3-bin.tar.gz

 

압축 해제

# 압축 해제
sudo tar -zxvf apache-zookeeper-3.6.3-bin.tar.gz -C /opt

# 권한
sudo chown -R deploy. /opt/apache-zookeeper-3.6.3-bin/

# symbolic link
sudo ln -s /opt/apache-zookeeper-3.6.3-bin/ /opt/zookeeper
sudo chown -R deploy. /opt/zookeeper

 

경로 생성

# 로그
sudo mkdir -p /var/log/zookeeper
sudo chown -R deploy:deploy /var/log/zookeeper

# 설정
sudo mkdir -p /etc/zookeeper
sudo ln -s /opt/zookeeper/conf /etc/zookeeper/conf
sudo chown -R deploy. /etc/zookeeper/conf

# pid ; (ex 1,2,3)
sudo mkdir -p /hadoop/zookeeper
sudo chown -R deploy:deploy /hadoop
echo {number} > /hadoop/zookeeper/myid

 

/etc/zookeeper/conf/zoo.cfg

clientPort=2181
initLimit=10
autopurge.purgeInterval=24
syncLimit=5
tickTime=3000
dataDir=/hadoop/zookeeper
autopurge.snapRetainCount=30
server.1={{ZOOKEEPER_HOST1}}:2888:3888
server.2={{ZOOKEEPER_HOST2}}:2888:3888
server.3={{ZOOKEEPER_HOST3}}:2888:3888
#jute.maxbuffer=4194304

 

/etc/zookeeper/conf/zookeeper-env.sh

export ZOOKEEPER_HOME=/opt/zookeeper
export ZOO_LOG_DIR=/var/log/zookeeper
export ZOOPIDFILE=/opt/zookeeper/conf/zookeeper_server.pid
export SERVER_JVMFLAGS=-Xmx1024m
export JAVA=$JAVA_HOME/bin/java
export CLASSPATH=$CLASSPATH:/opt/zookeeper/*

 

실행

/opt/zookeeper/bin/zkServer.sh start

 

확인

/opt/zookeeper/bin/zkServer.sh status

 

반응형