Skip to content

Instantly share code, notes, and snippets.

@Azariagmt
Created January 9, 2022 11:54
Show Gist options
  • Save Azariagmt/a4eb8dd9e8cf22f6c3d43499a5f9cb85 to your computer and use it in GitHub Desktop.
Save Azariagmt/a4eb8dd9e8cf22f6c3d43499a5f9cb85 to your computer and use it in GitHub Desktop.
Setup zookeeper
if [ ! -f /home/sem/Documents/Tenacious/kafka-local/apache-zookeeper-3.6.3-bin.tar.gz ]; then
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.6.3/apache-zookeeper-3.6.3-bin.tar.gz
fi
tar -xzf apache-zookeeper-3.6.3-bin.tar.gz
mv -r apache-zookeeper-3.6.3-bin /usr/local/zookeeper
mkdir -p /var/lib/zookeeper
cat > /usr/local/zookeeper/conf/zoo.cfg << EOF
> tickTime=2000
> dataDir=/var/lib/zookeeper
> clientPort=2181
> EOF
export JAVA_HOME=/usr/java/jdk1.8.0_51
/usr/local/zookeeper/bin/zkServer.sh start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment