Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install stand-alone zookeeper for ubuntu

Shulou Source: shulou.com Published: 2022-06-01 01:46:06 10月03日 Update

This post is about how to install the standalone version of zookeeper on ubuntu. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

Download Zookeeper

Go to Apache and download Zookeeper. I downloaded Zookeeper-3.6.5.tar.gz.

Unpack installation

#Decompress

$sudo tar xzvf zookeeper-3.6.5.tar.gz

#Copy the extracted zookeeper-3.6.5 directory to/usr/local/lib

$sudo cp -r zookeeper-3.6.5 /usr/local/lib

Modify Zookeeper configuration

#Switch to the conf directory under the Zookeeper installation directory

$cd /usr/local/lib/zookeeper-3.6.5/conf

#Copy Sample Configuration as Profile

$cp zoo_sample.cfg zoo.cfg

###Modify zookeeper data storage directory to/var/local/zookeeper###

#New directory/usr/local/zookeeper

$sudo mkdir /var/local/zookeeper

#Modify zoo.cf file to dataDir =/var/local/zookeeper instead of dataDir=/tmp/zookeeper

$sed -i "s/dataDir=\/tmp\/zookeeper/dataDir=\/var\/local\/zookeeper/g" zoo.cfg

Starting and stopping Zookeeper

#Switch to bin directory

$cd /usr/local/lib/zookeeper-3.6.5/bin

#Start Zookeeper service

$./ zkServer.sh start

#Start Zookeeper client, if output sample content indicates success

$./ zkCli.sh

....

[zk: localhost:2181(CONNECTED) 0]

#Show root directory

$ [zk: localhost:2181(CONNECTED) 0] ls /

[zookeeper]

[zk: localhost:2181(CONNECTED) 1]

#Stop Zookeeper service

$./ zkServer.sh stop

Thank you for reading! About "ubuntu how to install stand-alone version of zookeeper" This article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Tags: Directories configuration content files stand-alone stand-alone more articles switching services good practical successful customer client copy data articles root directory check it out Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information Shulou Tech Info MariaDB Docker