Table of Contents

About

How to install Zookeeper from the original archive with a single instance.

Steps

The installation directories

  • The base installation directory
ZK_BASE_DIR=/opt
mkdir -p ${ZK_BASE_DIR}
  • The home directory
ZK_HOME_DIR=${ZK_BASE_DIR}/zookeeper

Download and unzip

  • Version and url
ZK_VERSION=3.4.14
ZK_PACKAGE_URL=https://archive.apache.org/dist/zookeeper/zookeeper-${ZK_VERSION}/zookeeper-${ZK_VERSION}.tar.gz
  • Download and unzip
ZK_DOWNLOAD_DIR=$HOME/.zookeeper/download
ZK_DOWNLOAD_FILE="$ZK_DOWNLOAD_DIR/$(basename $ZK_PACKAGE_URL)"
curl "$ZK_PACKAGE_URL" > "${ZK_DOWNLOAD_FILE}.tmp"
mv "${ZK_DOWNLOAD_FILE}.tmp" "${ZK_DOWNLOAD_FILE}"
tar -xf "${ZK_DOWNLOAD_FILE}" -C $ZK_DOWNLOAD_DIR

Install

mv "$ZK_PACKAGE_NAME" "$ZK_HOME_DIR" 

Start / Stop

See Zookeeper - Service / Server